iEntry 10th Anniversary Forum Rules Search
WebProWorld
Register FAQ Calendar Mark Forums Read
Web Programming Discussion Forum Working with an API? Developing a plugin? Writing a Mod or script for your favorite blog, Web 2.0 site or Forum? Welcome.

Share Thread: & Tags

Share Thread:

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 03-08-2004, 08:07 PM
WebProWorld Member
 
Join Date: Jan 2004
Location: NorCal
Posts: 65
MasterT RepRank 0
Default Form validation

i want to validate this form in this way

i have a select for them to select their contact preference one of them is Fax and i dont have a fax number required to be typed in

i want to to be required if they select fax how do i do this ?


this is what i have so far

Code:
function fax(formField,fieldLabel,required)
{	
	var result = true;
	if(!result) 
	{	
   alert("You have selected Fax as your contact preference please type in your fax number"); 
	

{
	return result;
}
i know no javascript this is all just stuff i copied and threw together

please help
__________________
http://mxtracks.us/images/MXTracksLogo.gif
California MX Tracks, Games, Photos, whatever you want its here
Reply With Quote
  #2 (permalink)  
Old 03-12-2004, 08:21 PM
httpman's Avatar
WebProWorld Pro
 
Join Date: Aug 2003
Location: France
Posts: 124
httpman RepRank 0
Default

Hi,

I try to answer : in a form, each element (radio button, input box, check boxes etc.) should have a name, which you tell via the 'name=xxxx' parameter within the HTML tag.

Now, once your tag has a name, you can address it via JavaScript, and then read its content and then verify it before sending the form on the web.

The bad new is that this check requires a few javascript code, hence if you don't know javascript it's hard to explain !...

Could sound like "MI-2" or more !!

JP
__________________
www.net-createurs.com [ french only website sorry ! ]
Reply With Quote
  #3 (permalink)  
Old 03-13-2004, 10:56 AM
WebProWorld Veteran
 
Join Date: Feb 2004
Location: Lodz, Poland
Posts: 328
adore RepRank 0
Default

And users must have Java enabled in their browsers as well.
__________________
http://www.twojecentrum.pl - Polish e-shopping center
http://dzwonki-loga.pl - Ringtones for mobile phones
Reply With Quote
  #4 (permalink)  
Old 03-13-2004, 03:28 PM
WebProWorld Member
 
Join Date: Jan 2004
Location: NorCal
Posts: 65
MasterT RepRank 0
Default

I figured it out guys
__________________
http://mxtracks.us/images/MXTracksLogo.gif
California MX Tracks, Games, Photos, whatever you want its here
Reply With Quote
  #5 (permalink)  
Old 03-20-2004, 11:37 AM
LjN's Avatar
LjN LjN is offline
WebProWorld New Member
 
Join Date: Mar 2004
Location: Notts, UK
Posts: 11
LjN RepRank 0
Default

Quote:
I figured it out guys
would you be willing to share it... i'm in need of something similar

Thanks!
Reply With Quote
Reply

  WebProWorld > Webmaster, IT and Security Discussion > Web Programming Discussion Forum

Thread Tools
Display Modes

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

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



All times are GMT -4. The time now is 05:07 PM.



Search Engine Optimization by vBSEO 3.3.0