Quick Javascript task
$5-10 USD
Betalt ved levering
Hi,
I need help of a Javascript expert to do something for me. I want to modify the dom tree like this:
**If orig html is:**
<html> <body> blah blah blah </body> </html>
**I want to modify it to:**
<html> <body>
<abc> blah blah blah </abc>
</html>
via javascript.
That is, the whole body contents should be put inside <abc> node. I am attaching the code snippet I am trying which does not work. Looking for an expert who can fix this quickly for me.
Thanks & Regards
JP
## Deliverables
* * *This broadcast message was sent to all bidders on Monday Apr 12, 2010 4:47:36 AM:
The code I am trying is this:
// Create an iframe
var orig_iframe = [url removed, login to view]('iframe');
// Copy body's content inside iframe (hopefully!)
orig_iframe.contentDocument.innerHTML= [url removed, login to view];
// Set document body to null
[url removed, login to view] = '';
// Add iframe to body
[url removed, login to view](orig_iframe);
This does not work! I am able to do other simple tasks like "appendChild" to the body without modifying the original content of the body.
Thanks!
JP
Projekt ID: #3337233