Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Value of Session Parameter is not Correct  RSS feed

 
Steve Dyke
Ranch Hand
Posts: 1739
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I hope this is not considered a double post.

I am running some connection code that gets data for a user input number, the previous record data and the next record data. This is to produce an affect of backward and forward functions.

Every thing works fine for the data result. I store these values to session parameters. Just for testing I assign the values to a couple of button labels and the values are correct.

However, when I try to use these values in my backward and forward buttons on my HTML page it does not always work. I have onclick functions assigned to the buttons which use the following script. On simple numbers like 817739, 861250 etc. it works fine, but if I type in 861027-403 I gives strange results. For some reason it dose not know what to do with the "-".

The following script using(861027-403) produces an output of:
prevdwgno = "860262"
nextdwgno = "860622"

Should be(this is what my test button lables have which is correct):
prevdwgno = "861027-401"
prevdwgno = "861027-405"

 
Keth Yan
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am quite sure all your values are correct.
One thing that I will try is putting quotes (') around the values:

document.getdrawingnumber.dwgno.value = '${prevdwgno}';

making sure JavaScript takes it as a string.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65825
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The first step to diagnosing problems like this is to look at the rendered HTML that is sent to the browser. It would have become quite apparent that your JavaScript was malformed.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!