Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

filling textarea with data

Status
Not open for further replies.

lynchpin

Programmer
Sep 12, 2005
3
IE
Hi all,
I'm having trouble getting my head around a problem.
I have a page with a blank text area. Below this text area is a link to an xml file. When the user clicks on this link i want the xml to be written to the text area without having to reload the page.

Does anyone have any idea how i can do this using javascript?

thanks in advance,
colm
 
You will have to do an XMLHTTP request to retrieve the page containing the XML you want displayed, then write that text to the textarea with something like.
document.formname.fieldname.value = myxmltext;

The link to the xml should be changed into an onclick so that it executes the function to do the XMLHTTP request to retrieve the page rather than a standard link which would cause the page to change to the linked page.

You will have to read up on XMLHTTP requests.


Stamp out, eliminate and abolish redundancy!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top