473,396 Members | 1,748 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,396 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 2704
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...
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
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?
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
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
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,...

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.