
August 8th, 2005, 03:37 PM
|
|
Registered User
|
|
Join Date: Aug 2005
Posts: 2
Time spent in forums: 45 m 26 sec
Reputation Power: 0
|
|
|
ASP in Javascript
I have an .ASP program which calls a Stored Procedure to get data from a DB2 table. This data is then displayed on the screen for the user and they can make any changes they want. When the user hits the Update button, the same .ASP program is called and there is 1 field where I would like to be able to check the original value based on what the user modifies the field to. I know the ASP logic is processed first and all I can see if the HTML code, but when I do a View Source I am not seeing the field value in the variable I have created. This is the code I am using. I am new to ASP and Javascript and from what I have seen in some postings this seems to be what I need to do.
In the ASP logic, I perform the following after the call to the Stored Procedure is made to assign the original value to a variable. This is done before the screen originally displays.
ReasonCd = Trim(cmdODBC.Parameters("OUTPUT").Value)
In the Update function, which is Javascript, I have the following and it is called from the user hitting a button on the screen after making changes:
var OrigValue = "<%=ReasonCd%>"
And then I do a check to see what the OrigValue is so I can see if the changes should be allowed, I see nothing. The variable ReasonCd is blank so the compare I am trying to do can never work correctly.
Any help would be greatly appreciated. Thanks.
|