Simple but I can't figure it out

M

myleslawrence

<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?
 
I

IPGrunt

<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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,534
Members
45,007
Latest member
obedient dusk

Latest Threads

Top