0

I am creating an application with JQuery as the UI. The current, what I have now is using simple xml as the Select Menu options.
http://www.globalvirtualairlines.com/MyPages/jquerytestingapp.php

What I am wanting to do is, when the user selects the Hub they want, use simple xml to get the data for that hub.

The xml file I am getting from is http://www.vafinancials.com/web/hubs_xml.php?id=18686

They do have Hub Id's but I am unsure of how to distribute out the data when the user chooses a hub.

I am using this.... for Simple_Xml

<?php if($xml === false)
	{
	   echo "There was an error opening the xml file.";
		 exit;
		   }
		else
		 {
		foreach($xml as $hubname)
		 {
		echo "<option value='option_Hubname'>" . $hubname->name . "</option>";
		 }
	}
?>

That is for the options. But for the data for each hub I am guessing I will have to use a different simple xml method?

I need some help.. .. .. Thanks in advance.

Edited by Ezzaral: Fixed broken copied link

3
Contributors
5
Replies
6
Views
6 Years
Discussion Span
Last Post by twiss
1

I'm not really sure what's in $xml, but you'll need to put something in the value attribute, some id or that name. Then get the data that matches that.

0

hey Dude. I saw the leakage here right now.... you cannot just set XML on just a server side script. u need also the client side script. Twiss was Right. I have already coded the right AUTO POST BACK function of PHP using XML, HTML and AJAX. You Have to Code HTML and inside HTML there was an AJAX or a JavaScript code then inside of that function... you'll have to construct a code of XML. the key here is this what you have to do... XMLHttpRequest() <---( this XML special function is where you will request your own php file without any button click events )... to know more about this... try to read and understand it your self in searching online. :)

1

That's true, you could use ajax, but you don't have to. A normal form would in this case be appropriate, I think.

0

That's true, you could use ajax, but you don't have to. A normal form would in this case be appropriate, I think.

Sometimes it is done with AJAX or JavaScript or JQuery. even if it is in a normal form but it seems to be he want's an auto post back similar to ASP.net :)


Anyway twiss can you help me out in this... I posted it here in Daniweb PHP forum

http://www.daniweb.com/web-development/php/threads/364934

Edited by masterjiraya: I have inputted a wrong link forum

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.