Re: [OT] javascript field validation with encoded forms

This WebDNA talk-list message is from

2004


It keeps the original formatting.
numero = 57595
interpreted = N
texte = This works for me: if (document[frm].first_name.value == "") { alert("Please enter your first name"); document[frm].first_name.focus(); return (false); } However it's your enctype I'm sure. Are you doing a file upload with this form? I had all kinds of problems getting anything to work on a multipart/form-data so I went to two forms, info which is sent/appended and then a select file page. Not a great answer any of this, so hopefully someone has a better one. GK At 10:21 AM 4/29/2004, you wrote: >I've been using some "borrowed" javascript to validate submitted forms >before they reach the browser.. something like: > >if (document[frm].first_name.value=="") { > alert('Please enter your first name') > document[frm].first_name.focus(); > return false;} > >But as soon as I put this into my forms, the javascript no longer works. > >enctype="multipart/form-data" > >Any ideas? > >Thanks, >~joe ------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. Re: [OT] javascript field validation with encoded forms ( Gary Krockover 2004)
  2. [OT] javascript field validation with encoded forms ( Joe D'Andrea 2004)
This works for me: if (document[frm].first_name.value == "") { alert("Please enter your first name"); document[frm].first_name.focus(); return (false); } However it's your enctype I'm sure. Are you doing a file upload with this form? I had all kinds of problems getting anything to work on a multipart/form-data so I went to two forms, info which is sent/appended and then a select file page. Not a great answer any of this, so hopefully someone has a better one. GK At 10:21 AM 4/29/2004, you wrote: >I've been using some "borrowed" javascript to validate submitted forms >before they reach the browser.. something like: > >if (document[frm].first_name.value=="") { > alert('Please enter your first name') > document[frm].first_name.focus(); > return false;} > >But as soon as I put this into my forms, the javascript no longer works. > >enctype="multipart/form-data" > >Any ideas? > >Thanks, >~joe ------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/ Gary Krockover

DOWNLOAD WEBDNA NOW!

Top Articles:

Talk List

The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...

Related Readings:

Beta 3.0.3 fix for serial# problem (Mac) (1998) Date search - yes or no (1997) BW in a search (2007) searching results (1999) Trouble with formula.db (1997) Help with Shipping Costs (1997) [BULK] [WebDNA] PayPal Integration (2017) Here we go again...WebDNA - SQL- Clustering (2006) GuestBook example (1997) The BUG is BACK -- leading < character (1998) Layers,Dreamweaver and WebCat Code (2000) WebCat b13 CGI -shownext- (1997) Snake Bites (1997) search results not sorted with 'cl' (1998) [WebDNA] ww- whole word in search tag (2013) Bugs in IE 6.0 ? (2003) Help name our technology! I found it (1997) syntax for contains a word (2002) PCS Frames (1997) GuestBook example (1997)