HighDots Forums  

Object scoping issue

Javascript JavaScript language (comp.lang.javascript)


Discuss Object scoping issue in the Javascript forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
macrom75
 
Posts: n/a

Default Object scoping issue - 09-24-2003 , 09:44 PM






I have a script that I found online to do dynamic checking of passwords (for
verifying that the re-typed password matches the original). This code works
great in a basic HTML document, but when I try to incorporate the script
into a more complex document that uses lots of nested tables, I get scoping
errors (presumably) when I type in my input field.

Rather than post huge amounts of HTML here, I've linked 2 documents. The
first behaves correctly, the second pops an alert when the function is
entered, and this only happens when the page is first loaded. Can anyone
help show how I should reference the functions to scope them correctly?

First document : http://www.norz.net/example.html
Second, error-prone document : http://www.norz.net/example2.html

Thanks!




----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---

Reply With Quote
  #2  
Old   
Alexander Ignatyev
 
Posts: n/a

Default Re: Object scoping issue - 09-25-2003 , 05:41 AM







"macrom75" <macrom75 (AT) hotmail (DOT) com> wrote :
Quote:
I have a script that I found online to do dynamic checking of passwords
(for
verifying that the re-typed password matches the original). This code
works
great in a basic HTML document, but when I try to incorporate the script
into a more complex document that uses lots of nested tables, I get
scoping
errors (presumably) when I type in my input field.

Rather than post huge amounts of HTML here, I've linked 2 documents. The
first behaves correctly, the second pops an alert when the function is
entered, and this only happens when the page is first loaded. Can anyone
help show how I should reference the functions to scope them correctly?

First document : http://www.norz.net/example.html
Second, error-prone document : http://www.norz.net/example2.html

Hello !

In second document the same name "verify" used for object and input.
That's the only problem.

HTH.






Reply With Quote
  #3  
Old   
Greg Norz
 
Posts: n/a

Default Re: Object scoping issue - 09-25-2003 , 09:49 AM



Quote:
Hello !

In second document the same name "verify" used for object and input.
That's the only problem.

HTH.
Thank you, Alexander. I can't believe I didn't see that myself!



----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---


Reply With Quote
Reply




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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.