Monday, March 26, 2012

Simple but I cant figure it out

<input type="text" value="1234" onblur="<% some_asp(value) %>"
How do I pass the changed value of this input text box to the asp function?"myleslawrence" <myleslawrence@.msn.com> confessed in news:u76cYyd$EHA.3592
@.TK2MSFTNGP09.phx.gbl:

> <input type="text" value="1234" onblur="<% some_asp(value) %>" >
> How do I pass the changed value of this input text box to the asp
function?

There's only 2 ways with HTTP:

1. In the URL
2. In the Headers

You control this with the method property of the Form tag.

-- method="post" passes your control values in the html headers
-- method="get" passes your control values in the URI query string.

<form method='post' action='processForm.asp'
<input type='text' name='UserID'
<input type='Submit' VALUE='Submit'>
</form
In processForm.asp, you get the value like this:

<%theValue = Request("UserID") %
If you use a method=get, then you get it in the query string:

<%theValue = Request.QueryString("UserID") %
But first I must ask: Do you understand HTTP and the concept of round
trips? It is essential.

Also, I see you are trying to set the onblur method of the control. Looks
like you want to write a clientside script that does something when the
user moves his mouse? Then you need to write either client-side function in
vbscript (works only with IE) or javascript.

Perhaps it's time to get a Beginning Web Programming with ASP book? Try
reading Wrox's "Professional ASP 2.0" for starters.

-- ipgrunt

0 comments:

Post a Comment