houssam_ballout Posted February 9, 2007 Share Posted February 9, 2007 Hello all,Can someone helps me with the following idea:I've a page with input boxes on it,and beside each input box there is a link that will display a small help text, and that help text will be extracted from the xml file according to the id of the text box, so , I need more help on that , How could i extract data in HTML page from an xml page?Thanks Link to comment Share on other sites More sharing options...
jesh Posted February 9, 2007 Share Posted February 9, 2007 If you aren't using a server-side language, then you're probably stuck using AJAX. If the file from which you want to get the data is an XML file, you can use AJAX to send a GET request to your web server to get that XML file. Once the response comes back, the XMLHttpRequest will have two ways to get at the data: .responseText and .responseXML. .responseText returns the data as plain text whereas, if the content-type of the data is "text/xml", .responseXML returns an XML document. With that XML document, you can use your favorite means of getting the data - I have been typically using the XML DOM in my projects.AJAX TutorialXML DOM Tutorial Link to comment Share on other sites More sharing options...
jesh Posted February 9, 2007 Share Posted February 9, 2007 Just found this in the XML DOM tutorial. I believe it may answer your question perfectly:http://www.w3schools.com/xml/tryit.asp?fil...httprequest_js4 Link to comment Share on other sites More sharing options...
Lengo Posted February 28, 2007 Share Posted February 28, 2007 Jesh is right. But here's the short version:The short version is that you create a pop-up, and that pop-up includes the xml file: <xml id="note" src="note.xml"></xml> There are numerous types of pop ups. Look to javascripts to make the desired type.Bonus question: Are there ways to create popups in PHP? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now