-
javascript: assign textbox value to variable
I have a javascript function where I assign the value of a textbox to a variable.
I have no problem in IE 4 but Nescape 4.x says there is a javascript error.
The line is:
my_parm = thisForm.txtNDC.value;
But if I place the literal like this, it works:
my_parm = "7007";
What am I doing wrong?
-
Re: javascript: assign textbox value to variable
It makes a different where in the page your trying to assign that variable
in relation to where the form itself is (on the same page, in a different
frame, etc).
In general though, Netscape likes to see the document. qualifier before the
form name. So try my_parm=document.thisForm.txtNDC.value;
If this doesn't work, then provide some more details about how the page and
form are setup or the actual code from the page.
-carl
"Jeff" <jeffm@earthlink.net> wrote:
>
>I have a javascript function where I assign the value of a textbox to a
variable.
>I have no problem in IE 4 but Nescape 4.x says there is a javascript error.
>
>
>The line is:
>
>my_parm = thisForm.txtNDC.value;
>
>But if I place the literal like this, it works:
>
>my_parm = "7007";
>
>
>What am I doing wrong?
>
>
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks