|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
1200+ fellow developers rate and compare features of the top IDEs, like Visual Studio, Eclipse, RAD, Delphi and others, across 13 categories. Enjoy this FREE Download of the IDE User Satisfaction Study by Evans Data Corporation. Download Now!
|
|
#1
|
|||
|
|||
|
Below is an example of one of my FORM entry fields. I am using <CFINPUT> and when the web page is loaded the default javascript the the CFINPUT tag provides, but lets say the user doesn't enter a required entry, the javascript is not checking it in the browser but it does when I test locally. If you want go to this link to see the html code produced by the code below: http://blueflydatadesign.com/userRegistration.cfm
I know this code is right but why doesn't it work on a live server and only my local machine??? <cfform action="usrRegAct.cfm" > <tr bgcolor="CCCCCC"> <td><input type="hidden" name="UserID"></td> <td> </td> <td> </td> </tr> <tr bgcolor="CCCCCC"> <td><strong>First Name</strong>:</td> <td><cfinput type="text" name="FName" message="First Name is Required" required="YES" size="50" maxlength="50" ></td> <td> </td> </tr> <tr bgcolor="CCCCCC"> <td><strong>Last Name:</strong></td> <td><cfinput type="text" name="LName" message="Last Name is Required" required="YES" size="50" maxlength="50"> </td> <td> </td> </tr> <tr bgcolor="CCCCCC"> <td><strong>Address:</strong></td> <td><cfinput type="text" name="Address" message="Address is Required" required="YES" size="50" maxlength="50"> </td> <td> </td> </tr> <tr bgcolor="CCCCCC"> <td><strong>City:</strong></td> <td><cfinput type="text" name="City" message="City is Required" required="YES" size="50" maxlength="50"> </td> <td> </td> </tr> <tr bgcolor="CCCCCC"> <td><strong>State:</strong></td> <td><select name="State"> <option value="choose">[CHOOSE ONE]</option> <option value="AB">Alabama </option> ---rest of the states have been deleted for threads sake-- <option value="WY" >Wyoming </option> </select> </td> <td> </td> </tr> <tr bgcolor="CCCCCC"> <td><strong>Zip:</strong></td> <td><cfinput type="text" name="Zip" message="Zip Code is Required" required="YES" size="10" maxlength="50"> </td> <td> </td> </tr> <tr bgcolor="CCCCCC"> <td><strong>email address:</strong></td> <td><cfinput type="text" name="Email" message="Email address is Required" required="YES" size="50" maxlength="50" > </td> <td align="left" valign="middle"> <div align="left"><font color="#FF0000" size="-3" face="Geneva, Arial, Helvetica, sans-serif"><strong>***EMAIL ADDRESS WILL BE YOUR USER ID***</strong></font></div></td> </tr> <tr bgcolor="CCCCCC"> <td><strong>password:</strong></td> <td><cfinput type="password" name="Password" message="Password is Required" required="YES" size="50" maxlength="50"> </td> <td><div align="center"></div></td> </tr> <tr bgcolor="CCCCCC"> <td><strong>Gender:</strong></td> <td><select name="Gender"> <option value="M">Male </option> <option value="F">Female </option> </select> </td> <td><input type="hidden" name="UserID"> </td> </tr> <tr bgcolor="0066FF"> <td height="37" colspan="3" > <div align="center"> <input name="submit" type="submit" value="Submit" > <input name="reset" type="reset" value="Reset"> <br> </div></td> </tr> </cfform> ![]() |
|
#2
|
|||
|
|||
|
After reviewing all the "help" that was given on this one I went and found the answer, here goes.
My 'live' server is running MX which requires me to enter a "scriptSrc=" within your <cfform> tag. The script was found in my web root in "../cfide/scripts/cfform.js". When hosting on a shared server you may not have access to that particular folder... in that case, create your own folder within the structure of your own web site and just refer to it. I generally do this by adding an parameter in the 'application.cfm' file that refers to the script and then just use that variable in my <cfform> tag: <--------------------> application.cfm: <cfparam name="scriptsourcepath" value="http://www.yourdomain.com/scripts/cfform.js"> <----------------> <---------------> yourform.cfm <cfform method="post" action="action.cfm" "scriptSrc=#scriptsourcepath#"> <--------------> |
|
#3
|
|||
|
|||
|
Just to note, the reason I didn't post an answer here yet was due to the amount of code you posted. I'm trying to help a lot of people and I don't have time to wade through 100+ lines of code looking for your error. In the future, when you post to any type of forum I advise you to first write the shortest piece of code that you can that reproduces the error. You'll get much faster (and probably better) response that way. And you may even find that narrowing down the problem actually allows you to solve it yourself in many cases.
__________________
Ask if you have a question, but also help answer questions that you have knowledge of! Thanks, Brian. How to Post a Question in the Forums Last edited by kiteless : October 3rd, 2004 at 10:59 PM. |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ColdFusion Development > <CFINPUT> Blues..... |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|