If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ASP > help me in getting a value from testbox before submiting the form

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-14-05, 02:45
shaluajit shaluajit is offline
Registered User
 
Join Date: Jan 2005
Posts: 1
help me in getting a value from textbox before submiting the form

i used javascript function to get the value but how will i receive the value in the asp. txtto is the name of the textbox
<script>
function disp()
{
a= document.form1.txtto.value;
alert(a);
return a ;
}
</script>

<%
<a href= "email_1.asp?id=<%=response.write(value)%> " onClick="disp();">
%>

but how will i receive the value returned from disp function

Last edited by shaluajit; 01-14-05 at 04:25.
Reply With Quote
  #2 (permalink)  
Old 01-14-05, 11:18
rweide rweide is offline
Registered User
 
Join Date: Aug 2004
Location: USA
Posts: 54
you are trying to pass variable data between server and client codes.

one way to do this is to use an HTML <Input type="hidden"> text box as an intermediate holding place and refer to your data by using this text box's value in either the client or server codes.
Reply With Quote
  #3 (permalink)  
Old 01-17-05, 06:16
pal19 pal19 is offline
Registered User
 
Join Date: Feb 2003
Location: @ home
Posts: 163
You may also use session variables, that are more safe to store the variable value.

Paulo
Reply With Quote
  #4 (permalink)  
Old 01-17-05, 14:13
gyuan gyuan is offline
Registered User
 
Join Date: Dec 2003
Posts: 454
In your case, I think it is better to use the form instead of the link. When the form is submited, you still can pop up an ALERT window to the user.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On