JavaScript Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingJavaScript Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old August 8th, 2005, 03:37 PM
rcar121 rcar121 is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2005
Posts: 2 rcar121 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
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.

Reply With Quote
  #2  
Old August 8th, 2005, 04:48 PM
rcar121 rcar121 is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2005
Posts: 2 rcar121 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 45 m 26 sec
Reputation Power: 0
ASP in Javascript

I think I may have figured it out. I tried using a hidden field on the form and that seems to have done it. Is this an efficient way of doing this or are there better ideas out there?? Thanks.

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingJavaScript Development > ASP in Javascript


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway
Stay green...Green IT