I downloaded the Firefox hoping that I would get a better description of the "page error" for my Javascript code; but, IE at least gave a clue. The Firefox gave none.
I keep getting those are null or not object type. I do have two forms in my page. But, the form that I am trying to submit is the first one of those two forms. Please help me to spot the problems.
Here is my code:
Ulf Dittmer
Marshal
Joined: Mar 22, 2005
Posts: 35253
7
posted
0
Firefox is usually pretty good at flagging problems with JavaScript. Did you use the Tools -> JavaScript Console?
As to the code, more interesting than the source would be the resulting HTML. Then we could see which HTML elements get created, and which names/IDs they have.
Can you post the source? Not the JSP but the source you get with View Source on the browser?
Natalie Kopple
Ranch Hand
Joined: May 06, 2003
Posts: 320
posted
0
Thanks to all for your continuing and strong support. I really appreciate your help. I am simply working on what clients want to have in the web page although I do not quite agree on the page design.
The error message given by the Firefox has been identified. The error message means that I have to specify the 'sortKey' and 'orderKey' as properties inside the <html:form ....> tag.
Because I have multiple forms in my web page, I have also given an ID to the form that I intend to use the Javascript to submit.
But, while the values entered in text fields inside the form get submitted when any of the links are clicked, the constants for the sortKey and orderKey defined inside the Javascript using those "if" statements do "not" get submitted when the corresponding link is clicked. Therefore, there are still problems with the Javascript. I wonder if you could help in spotting my mistake(s).
Here is the code:
[ July 25, 2006: Message edited by: Natalie Kopple ]
[ July 25, 2006: Message edited by: Natalie Kopple ]
[ July 25, 2006: Message edited by: Natalie Kopple ] [ July 25, 2006: Message edited by: Natalie Kopple ]
Eric Pascarello
author
Rancher
Joined: Nov 08, 2001
Posts: 15357
6
posted
0
well if you use an ID you need to use getElementById().
Also you need to make sure that your element names are correct.