JavaScript Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsWeb DesignJavaScript Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old May 30th, 2001, 08:35 AM
craig34's Avatar
craig34 craig34 is offline
Webmaster Extraordinaire
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2000
Location: Woburn, MA
Posts: 126 craig34 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 18 m 39 sec
Reputation Power: 14
Problem with NS and Javascript

Alright, I'm sure this is a simple answer, but since I can't figure it out, I'm hoping someone else can. I'm writing a script to make sure that certain parts of this form have been filled out. The important part of my code is the following:

if (document.forms.date.begday.value != 'dd')
{
/* do nothing */
}
else
{
error = error + "- Please choose a beginning day.\n";
verdict = "false";
}


I believe that my reference to the element "begday" in the form "date" is not working correctly. It's fine in IE (of course), but will not work in NS. Thanks for all help.
__________________
Craig Anderson

Reply With Quote
  #2  
Old May 30th, 2001, 08:54 AM
epl epl is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2001
Location: Dublin
Posts: 413 epl User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 18 m 18 sec
Reputation Power: 13
You could try alert()ing the object, building up one step at a time and see what kind of results you get:

alert (document.forms.date);
alert (document.forms.date.begday);

etc..

also: correct syntax is document.forms.date.elements.begday.value - that might solve your problem.

Also sometimes helpful to try alerting or document.writing all (exposed) properties for an object (such as the form / element) using a for .. in loop.

Maybe you could put up your form html (or the relevant section of) as an example of what's not working.

Ed.

Reply With Quote
  #3  
Old May 31st, 2001, 03:39 AM
Havasen Havasen is offline
Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2001
Location: durban south africa
Posts: 29 Havasen User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
What version of nestcape are u using ?
Please don't say 6....

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignJavaScript Development > Problem with NS and Javascript

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap