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:
Webmerchant quitting (1998)
Getting Total Quantity (1997)
Bug Report, maybe (1997)
list items (1998)
Authenticate v6 (2004)
Searching Multiple DBs (1997)
ODBC-Interface (2000)
typhoon... (1997)
FYI: virus alert (1996)
Extended [ConvertChars] (1997)
DataBaseHelper Flawed (1997)
[WebDNA] Web Hosting (2008)
Help! WebCat2 bug (1997)
Ken's Data Manager (finally available I think ...) (2005)
security (1997)
[SQL] on MacOs to SQL Server ... HOW TO? (2000)
Re:no template caching (1997)
Webcatalog/Butler (1998)
Running 2 two WebCatalog.acgi's (1996)
AppleScript: Tell application:app location? (1998)