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.

Recommended Answers

All 5 Replies

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.

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. :)

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

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

Ehm, that's a link to this thread?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.