Reply
javascript form validation
Old 05-08-2006, 10:52 AM javascript form validation
Novice Talker

Posts: 7
iv created a form and have used javascript behaviours to detect when the fields are correctly filled out. they work but is there any way of customising the message which appears in the pop up box when a field is not filled properly?
pellio is offline
Reply With Quote
View Public Profile
 
When You Register, These Ads Go Away!
     
Old 05-08-2006, 11:30 AM Re: javascript form validation
funkdaddu's Avatar
Web Design Snob

Posts: 636
Uh, we'd need to see the code... we can't suggest modifications to a script we can't see.
funkdaddu is offline
Reply With Quote
View Public Profile Visit funkdaddu's homepage!
 
Old 05-08-2006, 02:42 PM Re: javascript form validation
vangogh's Avatar
Post Impressionist

Posts: 8,420
Name: Steven Bradley
Location: Boulder, Colorado
The code would help. I'm guessing though since you mentioned a popup message that the code is using the alert() method. You should be able to change the messages there.
__________________
l Search Engine Friendly Web Design | Van SEO Design
l Tips On Marketing, SEO, Design, and Development | TheVanBlog
l Custom WordPress Themes
vangogh is offline
Reply With Quote
View Public Profile Visit vangogh's homepage!
 
Old 05-11-2006, 04:20 AM Re: javascript form validation
Novice Talker

Posts: 7
heres the code:

<input type="submit" name="Submit" value="Apply" onClick="MM_validateForm('name','','R','phone','', 'RisNum','email','','RisEmail','address','','R','a mount','','RisNum','purpose','','R');return document.MM_returnValue">

would the script fit in among this/before/after?
im pretty new to this and dont fully understand how it works.

the validation function wont validate for radio buttons,just the text fields.when a certian radio button has been selected and then the submit button is clicked i want the pop up to tell the user they cant go any further if its the wrong one.
pellio is offline
Reply With Quote
View Public Profile
 
Old 05-11-2006, 08:46 AM Re: javascript form validation
funkdaddu's Avatar
Web Design Snob

Posts: 636
You would have to find and modify the MM_validateForm function, find where the alert() is and modify the string in there.
funkdaddu is offline
Reply With Quote
View Public Profile Visit funkdaddu's homepage!
 
Old 05-11-2006, 11:48 PM Re: javascript form validation
vangogh's Avatar
Post Impressionist

Posts: 8,420
Name: Steven Bradley
Location: Boulder, Colorado
Like fundaddu mentioned the code that you would need to modify will be located in the MM_validateForm function. It's mostly like near the top of the page and should start with:

function MM_validateForm(){

or something very similar. There may be some stuff in between the parenthesis. Look for places where the alert() code appears. There will be text inside the parenthesis there as well which should be the text you see in the popup windows.

Feel free to post the code here and we can help. If the page is online posting the link to it will probably be enough.
__________________
l Search Engine Friendly Web Design | Van SEO Design
l Tips On Marketing, SEO, Design, and Development | TheVanBlog
l Custom WordPress Themes
vangogh is offline
Reply With Quote
View Public Profile Visit vangogh's homepage!
 
Reply     « Reply to javascript form validation
 

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.12983 seconds with 13 queries