View Single Post
Old 12-09-2012, 12:59 PM   PM User | #2
AndrewGSW
Senior Coder

 
Join Date: Apr 2011
Location: London, England
Posts: 2,120
Thanks: 15
Thanked 354 Times in 353 Posts
AndrewGSW will become famous soon enough
Code:
var zip = zipfx();
This executes the function zipfx and assigns the return result to the variable zip. But it runs straight-away, before the form exists, so it returns an error as it cannot refer to forms['zipSearch'].

Code:
var zip = zipfx;
Assigns the function to the variable, so that it could be executed later by calling

Code:
zip();
FYI It is preferable and more modern to use IDs rather than names. In particular, form-names are deprecated/discouraged.
__________________
"I'm here to save your life. But if I'm going to do that, I'll need total uninanonynymity." Me Myself & Irene.
Validate your HTML and CSS
AndrewGSW is offline   Reply With Quote