472,805 Members | 1,362 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,805 software developers and data experts.

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 2363
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: AndiSmith | last post by:
Hi guys, I wondered if anyone could help me with this problem, or even shed some light on the direction I need to take to resolve it? I'm using .NET 2.0 (C# flavor) to build a large user-based...
5
by: lucyh3h | last post by:
Hi, I am trying to use XMLHttpRequest to do server side validation. I have several fields on a form and a submit button. The submit button has an event assocated with it when clicked. The...
3
by: nuchphasu | last post by:
Hi I have a problem on Dropdownlist that connect database and retrieve data by Ajax.I write javascript like this -------------------------------------------------------------------------...
3
by: =?Utf-8?B?RGVlcGE=?= | last post by:
Hi All, I have a webform in asp.net framework 1.1 where the dropdownlist is populated with list of locations from the database. The depending on the list selected, the user will be able to see...
5
by: steve.chambers | last post by:
I'm sure this q must have been asked before but I'm really struggling to find the answer anywhere so have finally given up and will consult the usenet community - hopefully there's someone out...
1
by: ariyasat | last post by:
Hi All, How to use OnChange event on file(Browse) Actually there is no file tag in ajax , then how to use OnChange event on file(Browse) . My requirement is that when i select a file from...
21
by: Leena P | last post by:
i want to basically take some information for the product and let the user enter the the material required to make this product 1.first page test.php which takes product code and displays...
4
by: Peter | last post by:
ASP.NET I have an application which use ASP.NET Autocomplete extender which works great. But I have a question how to update all the fields on the screen using Ajax. Users starts typing in a...
3
by: =?Utf-8?B?Y21lZWsxXzE5OTk=?= | last post by:
Hello, On a webpage, create an UpdatePanel with two DropDownLists. Set AutoPostBack of DropDownList1 to true. In the SelectedIndexChanged method, refill DropDownList2 and set the focus to...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 2 August 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
linyimin
by: linyimin | last post by:
Spring Startup Analyzer generates an interactive Spring application startup report that lets you understand what contributes to the application startup time and helps to optimize it. Support for...
0
by: kcodez | last post by:
As a H5 game development enthusiast, I recently wrote a very interesting little game - Toy Claw ((http://claw.kjeek.com/))。Here I will summarize and share the development experience here, and hope it...
0
by: Taofi | last post by:
I try to insert a new record but the error message says the number of query names and destination fields are not the same This are my field names ID, Budgeted, Actual, Status and Differences ...
14
DJRhino1175
by: DJRhino1175 | last post by:
When I run this code I get an error, its Run-time error# 424 Object required...This is my first attempt at doing something like this. I test the entire code and it worked until I added this - If...
5
by: DJRhino | last post by:
Private Sub CboDrawingID_BeforeUpdate(Cancel As Integer) If = 310029923 Or 310030138 Or 310030152 Or 310030346 Or 310030348 Or _ 310030356 Or 310030359 Or 310030362 Or...
0
by: lllomh | last post by:
How does React native implement an English player?
0
by: Mushico | last post by:
How to calculate date of retirement from date of birth
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.