|
Dreamweaver CS3,,,Help Needed
I have created a form using Dreamweaver's Spry widgets. Does any anyone know how to change the color and format during the initial state? I can change the change Valid State, Required State, and InValid State.n But i cannot find a way to change the initial state....here is a copy of my sprytext...
- Code: Select all
@charset "UTF-8";
/* SpryFormValidation.css - Revision: Spry Preview Release 1.4 */
/* Copyright (c) 2006. Adobe Systems Incorporated. All rights reserved. */
/* These are the classes applied on the error messages
* which prevent them from being displayed by default.
*/
.textfieldRequiredMsg,
.textfieldInvalidFormatMsg,
.textfieldMinValueMsg,
.textfieldMaxValueMsg,
.textfieldMinCharsMsg,
.textfieldMaxCharsMsg,
.textfieldValidMsg {
display: none;
}
/* These selectors change the way messages look when the widget is in one of the error states.
* These classes set a default red border and color for the error text.
* The state class (e.g. .textfieldRequiredState) is applied on the top-level container for the widget,
* and this way only the specific error message can be shown by setting the display property to "inline".
*/
.textfieldRequiredState .textfieldRequiredMsg,
.textfieldInvalidFormatState .textfieldInvalidFormatMsg,
.textfieldMinValueState .textfieldMinValueMsg,
.textfieldMaxValueState .textfieldMaxValueMsg,
.textfieldMinCharsState .textfieldMinCharsMsg,
.textfieldMaxCharsState .textfieldMaxCharsMsg
{
display: inline;
color: #cc6600;
border: 0px solid #CC3333;
}
/* The next three group selectors control the way the core element (INPUT) looks like when the widget is in one of the states: * focus, required / invalid / minValue / maxValue / minChars / maxChars , valid
* There are two selectors for each state, to cover the two main usecases for the widget:
* - the widget id is placed on the top level container for the INPUT
* - the widget id is placed on the INPUT element itself (there are no error messages)
*/
/* When the widget is in the valid state the INPUT has a green background applied on it. */
.textfieldValidState input, input.textfieldValidState {
background-color: #B8F5B1;
}
/* When the widget is in an invalid state the INPUT has a red background applied on it. */
input.textfieldRequiredState, .textfieldRequiredState input,
input.textfieldInvalidFormatState, .textfieldInvalidFormatState input,
input.textfieldMinValueState, .textfieldMinValueState input,
input.textfieldMaxValueState, .textfieldMaxValueState input,
input.textfieldMinCharsState, .textfieldMinCharsState input,
input.textfieldMaxCharsState, .textfieldMaxCharsState input {
background-color: #FF9F9F;
}
/* When the widget has received focus, the INPUT has a yellow background applied on it. */
.textfieldFocusState input, input.textfieldFocusState {
background-color: #FFFFCC;
color: #000000;
}
/* This class applies only for a short period of time and changes the way the text in the textbox looks like.
* It applies only when the widget has character masking enabled and the user tries to type in an invalid character.
*/
.textfieldFlashText input, input.textfieldFlashText{
color: red !important;
}
and here is my code for my actual web page..
- Code: Select all
<<A href="mailto:%@LANGUAGE="VBSCRIPT">%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<!--#include file="Connections/Registry.asp" -->
<%
Dim MM_editAction
MM_editAction = CStr(Request.ServerVariables("SCRIPT_NAME"))
If (Request.QueryString <> "") Then
MM_editAction = MM_editAction & "?" & Server.HTMLEncode(Request.QueryString)
End If
' boolean to abort record edit
Dim MM_abortEdit
MM_abortEdit = false
%>
<%
' IIf implementation
Function MM_IIf(condition, ifTrue, ifFalse)
If condition = "" Then
MM_IIf = ifFalse
Else
MM_IIf = ifTrue
End If
End Function
%>
<%
If (CStr(Request("MM_insert")) = "form1") Then
If (Not MM_abortEdit) Then
' execute the insert
Dim MM_editCmd
Set MM_editCmd = Server.CreateObject ("ADODB.Command")
MM_editCmd.ActiveConnection = MM_Registry_STRING
MM_editCmd.CommandText = "INSERT INTO TB_RegisteredGuests ([First Name], [Last Name], [E-Mail Address], [Phone Number], [MrGlassHQ Updates]) VALUES (?, ?, ?, ?, ?)"
MM_editCmd.Prepared = true
MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param1", 202, 1, 255, Request.Form("First Name")) ' adVarWChar
MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param2", 202, 1, 255, Request.Form("Last Name")) ' adVarWChar
MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param3", 202, 1, 255, Request.Form("E-Mail Address")) ' adVarWChar
MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param4", 202, 1, 255, Request.Form("Phone Number")) ' adVarWChar
MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param5", 202, 1, 255, MM_IIF(Request.Form("checkbox"), "Y", "N")) ' adVarWChar
MM_editCmd.Execute
MM_editCmd.ActiveConnection.Close
' append the query string to the redirect URL
Dim MM_editRedirectUrl
MM_editRedirectUrl = "GuestRegistered.html"
If (Request.QueryString <> "") Then
If (InStr(1, MM_editRedirectUrl, "?", vbTextCompare) = 0) Then
MM_editRedirectUrl = MM_editRedirectUrl & "?" & Request.QueryString
Else
MM_editRedirectUrl = MM_editRedirectUrl & "&" & Request.QueryString
End If
End If
Response.Redirect(MM_editRedirectUrl)
End If
End If
%><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Mr. Glass HQ Home</title>
<style type="text/css">
<!--
.style2 {color: #0099FF}
body {
background-color: #FFFFFF;
background-image: url(../Images/CarbonFiber.jpg);
}
.style3 {color: #CC6600}
.style4 {color: #000000}
.style5 {font-size: 16px}
.style6 {font-size: 16px; color: #0099FF; }
-->
</style>
<script src="../SpryAssets/SpryValidationTextField.js" type="text/javascript"></script>
<link href="../SpryAssets/SpryValidationTextField.css" rel="stylesheet" type="text/css" />
</head>
<body>
<table width="1024" border="0" align="center">
<tr>
<td width="1019" bgcolor="#666600">
<div align="center">
<p><img src="../Images/MrGlass.jpg" width="717" height="74" /><br />
</p>
<table width="450" border="0" align="center">
<tr>
<td height="25" align="center" valign="bottom"><span class="style6">Home</span></td>
<td width="8" height="25" align="center" valign="bottom"><img src="../Images/MrGlassBorder.jpg" width="2" height="20" /></td>
<td height="25" align="center" valign="bottom"><a href="FAQ.html" class="style2">FAQ's</a></td>
<td width="8" height="25" align="center" valign="bottom"><img src="../Images/MrGlassBorder.jpg" width="2" height="20" /></td>
<td height="25" align="center" valign="bottom"><a href="Glossary.html" class="style2">Glossary</a></td>
<td width="8" height="25" align="center" valign="bottom"><img src="../Images/MrGlassBorder.jpg" width="2" height="20" /></td>
<td height="25" align="center" valign="bottom"><span class="style5 style2">Step-by-Step Instructions</span></td>
<td width="8" height="25" align="center" valign="bottom"><img src="../Images/MrGlassBorder.jpg" width="2" height="20" /></td>
<td height="25" align="center" valign="bottom"><span class="style6">Tool Specifics</span></td>
</tr>
</table>
</div>
<img src="../Images/MrGlassBorder.jpg" width="1018" height="2" />
<table width="1020" border="0">
<tr>
<td width="175" height="550" valign="top"><p align="left">Please help support us by visiting our sponsors!</p>
<p align="left">We are constantly updating our databases, so please check back often.</p></td>
<td width="10" align="center" valign="middle"><p><img src="../Images/mrglassborder.jpg" width="2" height="775" /></p>
</td>
<td width="645" height="550" valign="top"><p>Welcome to MrGLassHQ.com. </p>
<p>If you are looking for the do-it-yourself instructions to repair damage done to your auto or marine's fiberglass, plastic, and carbon fiber parts (aka Graphite); then you have come to the right place. Why pay those high repair costs, when you can easily fix it yourself for less than 1/3 of the cost? Here at Mr. Glass HQ, we are dedicated to saving you money on repairs by giving you the confidence and the knowledge to do-it-yourself. On our site you will find <span class="style2">step-by-step instructions</span> to cover almost any damage imaginable, including repairs to those aftermarket parts for your car, such as carbon fiber hoods, body kits, interior panels etc. Before trying to follow our step-by-step guides, please read over our <a href="Glossary.html" class="style2">glossary</a> first so that you will understand each step.<br />
<br />
Along with <span class="style2">our step-by-step instructions</span>, we have a list of material suppliers to acquire everything you will need to perform the repairs. Also, we are adding a database to include repair facilities in different areas so that you may seek their help if you feel that you cannot finish the job.<br />
<br />
If you have any questions, comments, or suggestions regarding our web site please let us know by emailing us at <span class="style2">suggestions@mrglasshq.com</span>. <br />
<br />
Also if you have a specific repair that is not listed on our site, feel free to email us at <span class="style2">repairs@mrglasshq.com</span> and we will get the answer in a step-by-step procedure to you as soon as possible.</p>
<p class="style3">Please register with our site, doing so will allow us to email you regarding new offers from our vendors.<br />
Also, if you elect to do so, we will send you an E-mail every time new information is added to our<br />
web site.</p>
<form ACTION="<%=MM_editAction%>" METHOD="POST" id="form1" name="form1">
<table width="468" border="0" bgcolor="#666600">
<tr>
<td colspan="2"><div align="left">First Name: <span class="style3">*</span></div>
<label for="First Name">
<div align="left"><span id="sprytextfield1">
<input type="text" name="First Name" id="First Name" />
<span class="textfieldRequiredMsg">Field is required!!!</span></span></div>
</label></td>
</tr>
<tr>
<td colspan="2"><div align="left">Last Name: <span class="style3">*</span></div>
<label for="Last Name">
<div align="left"><span id="sprytextfield2">
<input type="text" name="Last Name" id="Last Name" />
<span class="textfieldRequiredMsg">Field is required!!!</span></span></div>
</label></td>
</tr>
<tr>
<td colspan="2"><div align="left">E-Mail Address: <span class="style3">*</span></div> <label for="Email">
<div align="left"><span id="sprytextfield3">
<input name="E-Mail Address" type="text" id="E-Mail Address" />
<span class="textfieldRequiredMsg">Field is required!!!</span><span class="textfieldInvalidFormatMsg">Sorry, Invalid Format!</span>
</span> </div>
</label></td>
</tr>
<tr>
<td colspan="2"><div align="left">Phone Number</div> <label for="Phone">
<div align="left"><span id="sprytextfield4">
<input name="Phone Number" type="text" id="Phone Number" size="10" />
<span class="textfieldInvalidFormatMsg">Sorry, Invalid Format!</span> </span></div>
</label></td>
</tr>
<tr>
<td colspan="2"><label for="register">
<input name="checkbox" type="checkbox" id="checkbox" value="Yes" />
Please send me E-mails regarding any new info about MrGlassHQ.com</label></td>
</tr>
<tr>
<td width="135"> </td>
<td width="323"><label for="Register"></label>
<label for="Register"></label>
<input type="submit" name="Register" id="Register" value="Register" /> <label for="Clear Form"></label>
<input type="reset" name="Clear Form" id="Clear Form" value="Clear Form" /></td>
</tr>
</table>
<p class="style3">* Denotes a Required Field! </p>
<p>
<input type="hidden" name="MM_insert" value="form1" />
</p>
</form>
<p></p></td>
<td width="10" align="center" valign="middle"><img src="../Images/mrglassborder.jpg" width="2" height="775" /></td>
<td width="175" height="550" valign="top"><p>Helpful Links...</p>
<p class="style2"><a href="FAQ.html" class="style2">FAQ's</a></p>
<p class="style2"><a href="Glossary.html" class="style2">Glossary</a></p>
<p class="style2">Step-by-Step Instructions</p>
<p class="style2">Tool Specifics</p>
<p class="style2"><br />
<img src="../Images/mrglassborder.jpg" width="165" height="2" /></p>
<p class="style2"><span class="style4">If you have questions about a specific repair, or one that is not listed, please feel free to email us at</span> repairs@mrglasshq.com.</p>
<p class="style2"><img src="../Images/mrglassborder.jpg" width="165" height="2" /></p>
<p>Search our registry for....</p>
<p class="style2">Suppliers</p>
<p class="style2">Repair Facilities</p>
<p class="style2"><img src="../Images/mrglassborder.jpg" width="165" height="2" /></p>
<p class="style2"><span class="style4">If you would like to add your business to our registry, please </span><a href="BusinessRegistry.asp" class="style2">click here</a>.</p>
</td>
</tr>
</table>
<p> </p>
</td>
</tr>
</table>
<script type="text/javascript">
<!--
var sprytextfield1 = new Spry.Widget.ValidationTextField("sprytextfield1", "none", {validateOn:["blur"]});
var sprytextfield2 = new Spry.Widget.ValidationTextField("sprytextfield2", "none", {validateOn:["blur"]});
var sprytextfield3 = new Spry.Widget.ValidationTextField("sprytextfield3", "email", {validateOn:["blur"]});
var sprytextfield4 = new Spry.Widget.ValidationTextField("sprytextfield4", "phone_number", {isRequired:false, format:"phone_custom", pattern:"000-000-0000", useCharacterMasking:true, validateOn:["blur"]});
//-->
</script>
</body>
</html>
anyone got any ideas?
thanks
|