Re: OT: Javascript Alert SOLVED
This WebDNA talk-list message is from 2004
It keeps the original formatting.
numero = 57972
interpreted = N
texte = The alert should read as follows:alert ("Banner ads must keep the original file name:\n" + oldBanner);On 5/21/04 11:36 AM, "Clint Davis"
wrote:> I want to compare an existing file name to the filename of a pulldown menu> selection of file upload. If they don't match, the alert should be> activated.> > Here's my code as it stands now. The +oldBanner+ appears in the alert as> text instead of substituting the variable name.> > > for(i=0;i {> var oldBanner = 'BannerAd-1.gif';> var elem = document.forms[0].elements[i];> if (elem.name == "theFile1")> {> if (elem.value == "" && theForm.____BANNERIMG.value == "")> {> alert ("Please select banner.");> theForm.____BANNERIMG.focus();> return (false);> }> if (elem.value != 'oldBanner' && theForm.____BANNERIMG.value != 'oldBanner')> {> alert ("Banner ads must keep the original file name.\n+oldBanner+");> theForm.____BANNERIMG.focus();> return (false);> }> }> }-------------------------------------------------------------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:
|
- Re: OT: Javascript Alert SOLVED ( Clint Davis 2004)
|
The alert should read as follows:alert ("Banner ads must keep the original file name:\n" + oldBanner);On 5/21/04 11:36 AM, "Clint Davis" wrote:> I want to compare an existing file name to the filename of a pulldown menu> selection of file upload. If they don't match, the alert should be> activated.> > Here's my code as it stands now. The +oldBanner+ appears in the alert as> text instead of substituting the variable name.> > > for(i=0;i {> var oldBanner = 'BannerAd-1.gif';> var elem = document.forms[0].elements[i];> if (elem.name == "theFile1")> {> if (elem.value == "" && theForm.____BANNERIMG.value == "")> {> alert ("Please select banner.");> theForm.____BANNERIMG.focus();> return (false);> }> if (elem.value != 'oldBanner' && theForm.____BANNERIMG.value != 'oldBanner')> {> alert ("Banner ads must keep the original file name.\n+oldBanner+");> theForm.____BANNERIMG.focus();> return (false);> }> }> }-------------------------------------------------------------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/
Clint Davis
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:
is [math] busted somehow in 3.05b10? (1999)
OFF-TOPIC: Stop reloading SRC page from cache ... (2003)
Plugin vs. CGI (1998)
[math date]: Arrrggh! (2003)
WebDNA 5.0 Questions (2003)
Multiple Pulldowns/Gary (1997)
WCS Newbie question (1997)
2nd WebCatalog2 Feature Request (1996)
[WebDNA] Crashing Database (2011)
[WebDNA] Forum using Webdna (2009)
Printing a final order (1997)
Talk List Suggestions (1997)
emailer (1997)
Hummm .... (2002)
Next (1997)
WC1.6 to WC2 date formatting (1997)
Which beta for w* 4.1 and a problem w/b12 (1999)
japanese characters (1997)
Viewing Changes (1998)
[TaxableTotal] - not working with AOL and IE (1997)