OZONE Asylum
Forums
DHTML/Javascript
Get the html code inside an xml tag
This page's ID:
30388
Search
QuickChanges
Forums
FAQ
Archives
Register
Edit Post
Who can edit a post?
The poster and administrators may edit a post. The poster can only edit it for a short while after the initial post.
Your User Name:
Your Password:
Login Options:
Remember Me On This Computer
Your Text:
Insert Slimies »
Insert UBB Code »
Close
Last Tag
|
All Tags
UBB Help
We are creating several widgets using the html (xml) that we get from the server, and we need to operate on the html that we thus get. We need to extract out the title and make it as the title of the tool and also we need to extract out the <id> and <dropdowntitle> tag. I tried doing it in html, but then I could not get the innerHTML for the code tag. The ending tag corresponding to the opening code tag moves up and comes right before the first div. To get rid of this we thought of working in xml. e.g. If I use this <item> <id>test</id> <title>test</title> <dropdowntitle>test</dropdowntitle> <code> <div>askjhfsejhvdjh <input type="text" /></div> </code> </item> var tempdiv = document.createElement('div'); tempdiv.innerHTML = removeInitialLineBreak(removeAmp(searchObject.responseText)); alert(tempdiv.innerHTML); gives me <item> <id>test</id> <title>test</title> <dropdowntitle>test</dropdowntitle> <code> [i]</code>[/i] <div>askjhfsejhvdjh <input type="text" /></div> </item> Also we are using the xml to give out the list of all the items using another xslt, so she is thinking that we can shot two birds in one stone. ankit
Loading...
Options:
Enable Slimies
Enable Linkwords
« Backwards
—
Onwards »