473,395 Members | 1,539 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.

Can Someone Suggest An Example Online

....actually, not just for this specific request, but any place that has
examples would be great. I guess I need more Prototype AJAX resources.

I'm looking to do the following:

I have a one field form. Using an onChange, I want to trip an
ajax.updater. How do I do this? For the life of me, I can't get this
thing to work.

This is a prototype application:

function sendRequest(action) {
var myForm = document.forms[0];
var myProv = myForm.getElementByID('s_province').value;
alert("weee");
ajax = new Ajax.Updater(
'presentation',
'backComm.lasso?choice='+action'&s_province='+myPr ov,
{method:'post'});
}

<form method=post id="province_input"
onSubmit="javascript:sendRequest('form_provinces') ">
<input name='s_province' id='s_province' type=text size=20
onChange="javascript:sendRequest('form_provinces') ">
<input type=submit value=go>
</form>


Any suggestions appreciated.

Cheers

Apr 21 '06 #1
2 972
BeeRich wrote:
var myProv = myForm.getElementByID('s_province').value;
getElementById (_not_ ID) is a method of the document object, not of form
objects (although you could use the elements collection of the form).
'backComm.lasso?choice='+action'&s_province='+myPr ov, ^^^
something missing?
Any suggestions appreciated.


Turn on the JavaScript console in Firefox or Opera (other browsers may also
have reasonable JavaScript consoles, although I can't find one built into
IE). The error messages should have drawn your attention to these issues.

--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is
Apr 21 '06 #2
ok I fixed her up real good. I've always had FF's tools turned on,
plus 2 more I've installed.

I found that it was passing a strange parameter when I tried to grab
the value of the field in the form. So, I fixed it by submitting it
directly in the JS call with this.form.fieldname.value, or something
similar.

Cheers

Apr 22 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: santanu | last post by:
Hi all, I know a little python (not the OOP part) learnt by studying the online tutorial. Now I would like to learn it more thoroughly. I have access to 'Programming Python' which I liked...
4
by: Angela | last post by:
I guess I left out an important tidbit... I develop in C# I have tried to use VB .NET examples I found online, but since I do not know VB .NET I'm having a difficult time converting all of...
2
by: santa19992000 | last post by:
Guys: Can somebody suggest a "C lang" project with pointers and linked lits for beginner?. Also is there anywahere I can find some C projects?. Thanks in advance.
6
by: Jurjen de Groot | last post by:
I'm trying to get the TreeView control from the Microsoft.Web.UI.WebControls namespace to work but for some reason it won't render correctly. I've found some webpages on the MSDN site about this...
6
by: Smithers | last post by:
I am looking to implement a search feature into a Windows Forms MDI application. Specifically I plan to embed 3 textboxes into a toolbar; one for LastName, another for FirstName, and one for...
1
by: dev.amit | last post by:
Hello friends I have started learning vb.net I found many vb tutorial but anyone good one for vb.net If u can suggest a good one then i would be greatful to u? Thanks Amit
8
by: rAinDeEr | last post by:
Hi, I have a table with the following 2 Fields - one is the description name and the second is its description to be stored in a table. description name description...
19
by: Richard | last post by:
Hi All, I copied a script example from http://www.irt.org/script/640.htm into a local .html file. I opened that file first in HTML-kit, which hung (in an infinite loop, I think) when I...
7
by: coolsti | last post by:
Hi, this is quite a newby question. I have years of experiences with administering MySQL databases on Linux using the mysql console application, ini files, and other non-GUI tools. Now I am...
6
by: Peter | last post by:
I have a APS.NET 3.5 webpage which calls a web service. What I need is to update this page automatically when a value changes in the webservice, does anyone have an example? Thank You ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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.