473,405 Members | 2,261 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,405 software developers and data experts.

prototype.js and Ajax.Updater

hi,

i am trying to make the contents of one drop-down box dependent on the
contents of another using AJAX (prototype.js) and PHP

I have it working so that a new dropdown appears when i select a value
in the first dropdown:

<?php echo $html->selectTag('Review/cruiseline', $cruise_lines, null,
array('onchange'=>'new Ajax.Updater(\'test\', \'ships?variable=12\',
{ method: \'get\' }, {asynchronous:true, evalScripts:true});'), null,
true, false);?>

In my php script (which is located at URL 'ships'), I am just getting
the value of 'variable' from the $_GET super global but I obviously
want that value to be dynamic and equal to the value selected in the
dropdown.

So the missing piece is passing the selected dropdown value from
HTML / Javascript to PHP. Anyone know how to do that?

thanks,

lukemack.

Mar 5 '07 #1
2 2705
On Mar 5, 11:25 pm, "lukemack" <lukemst...@gmail.comwrote:
hi,

i am trying to make the contents of one drop-down box dependent on the
contents of another using AJAX (prototype.js) and PHP
Prototype.js is a rather large library to be using just for AJAX
support. Consider:

<URL: http://www.ajaxtoolbox.com/ >
Prototype.js support is here:

<URL: http://groups.google.com/group/rubyonrails-spinoffs >
--
Rob

Mar 5 '07 #2
thanks - i found my answers here:

http://groups.google.co.uk/group/rub...9ca66e/?hl=en#
On 5 Mar, 14:25, "RobG" <r...@iinet.net.auwrote:
On Mar 5, 11:25 pm, "lukemack" <lukemst...@gmail.comwrote:
hi,
i am trying to make the contents of one drop-down box dependent on the
contents of another using AJAX (prototype.js) and PHP

Prototype.js is a rather large library to be using just for AJAX
support. Consider:

<URL:http://www.ajaxtoolbox.com/>

Prototype.js support is here:

<URL:http://groups.google.com/group/rubyonrails-spinoffs>

--
Rob

Mar 5 '07 #3

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

Similar topics

2
by: chuck | last post by:
Hello, I am using the prototype.js http://prototype.conio.net library for a project and so wanted to use the Insertion function to replace text within a table. I want to simply replace what is...
1
by: Jake Barnes | last post by:
I was reading the article over 24 Ways (http://24ways.org/advent/easy-ajax-with-prototype) and saw this example of using Prototype: function greet(){ var url = 'greeting.php'; var pars =...
2
by: hardrock | last post by:
Hello! I'm working with the prototype library version 1.4.0 and having a strange error lately. When I want to make an Ajax.Updater call, it basically works. But as soon as I put the call into...
7
by: BeeRich | last post by:
Hi folks. I built an ajax.updater reply in a website on a Mac, and she works fine. It's a simple reply, the html supplied is correct, and I also supply the target DIV as well. Just wondering...
1
by: gzerphey | last post by:
I hope you guys can help me on this. I have two functions. The first calls a periodical updater and does it quite successfully. The second is meant to stop said updater. It however fails when I...
1
by: lukemack | last post by:
hi, i am trying to make the contents of one drop-down box dependent on the contents of another using AJAX (prototype.js) and PHP I have it working so that a new dropdown appears when i select...
2
by: Paul Czubilinski | last post by:
Hello, Do you maybe know how to replace all the object content (with its <div id="x"and </div>) using Ajax.Updater class instead of inserting request inside it? Best regards, Paul Czubilinski
2
by: chrissi | last post by:
Hello Everyone, altought by English is not so ggod, I try to explain my problem... With the prototype ajax.updater it's possible to update a div trough a given url. Is there any possibility...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
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
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
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.