473,395 Members | 1,418 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 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 2391
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...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.