469,903 Members | 2,145 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,903 developers. It's quick & easy.

Ajax Toolbox - using onchange event

itp
I have moved to Matt Kruse's Javascript Toolbox. It has some great
examples to get you going quickly!

Unfortunately all the examples are based on a form/submit model. I
would like to try using the onchange event ot submit a request. Has
anyone tried this and could maybe provide an example?

ref: http://www.ajaxtoolbox.com/about/

Oct 23 '06 #1
3 2260
itp wrote:
I would like to try using the onchange event ot submit a request. Has
anyone tried this and could maybe provide an example?
What kind of example would you like?

Most of the examples aren't actually based on form submittal. They just use
form buttons to trigger code. You could trigger the same code via an
element's onchange event.

--
Matt Kruse
http://www.JavascriptToolbox.com
http://www.AjaxToolbox.com
Oct 23 '06 #2
itp
Hi Matt:

I would like to reproduce this page using your toolbox.
ref: http://tinyurl.com/n4pp2

I realize that the submit button only triggers a script, however the
<form action=program_name is used to determine what program to run. I
cannot figure out how to do this using an onchange.

By the way your stuff is great!!!

itp

Matt Kruse wrote:
itp wrote:
I would like to try using the onchange event ot submit a request. Has
anyone tried this and could maybe provide an example?

What kind of example would you like?

Most of the examples aren't actually based on form submittal. They just use
form buttons to trigger code. You could trigger the same code via an
element's onchange event.

--
Matt Kruse
http://www.JavascriptToolbox.com
http://www.AjaxToolbox.com
Oct 23 '06 #3
itp
OK. I am making progress. I can now trigger the form from an onblur
event, however my XMLHttpRequest is showing up in a new browser
instance.

code extract..
------------------------------------------------------------------------------------------------------------
<form name="form2" action="/mycgilibp/AJAX43.pgm"
method="post" target="_blank" onSubmit="submitForm(this);return
false;">

<script type="text/javascript">

function submitForm(theform) {
var status = AjaxRequest.submit(theform,
//alert("hello");
{
'onSuccess':function(req){
document.forms['form2'].submitResults.value = req.responseText; }
}
);
return status;
}</script>

value1
<INPUT TYPE="text"
value="Tabbing out of this text box should trigger a submit and
display values below. "
NAME="value1" size="80"
maxlength="80"
target="_blank"
onBlur= "document.form2.submit()">
---------------------------------------------------------------------------------------------------------------------------------------

try it:
http://tinyurl.com/u3am7

itp wrote:
Hi Matt:

I would like to reproduce this page using your toolbox.
ref: http://tinyurl.com/n4pp2

I realize that the submit button only triggers a script, however the
<form action=program_name is used to determine what program to run. I
cannot figure out how to do this using an onchange.

By the way your stuff is great!!!

itp

Matt Kruse wrote:
itp wrote:
I would like to try using the onchange event ot submit a request. Has
anyone tried this and could maybe provide an example?
What kind of example would you like?

Most of the examples aren't actually based on form submittal. They just use
form buttons to trigger code. You could trigger the same code via an
element's onchange event.

--
Matt Kruse
http://www.JavascriptToolbox.com
http://www.AjaxToolbox.com
Nov 26 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by lucyh3h | last post: by
3 posts views Thread by =?Utf-8?B?RGVlcGE=?= | last post: by
4 posts views Thread by Peter | last post: by
3 posts views Thread by =?Utf-8?B?Y21lZWsxXzE5OTk=?= | last post: by
reply views Thread by Salome Sato | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.