Hi,
I'm having severe problems adding a <tag> (the TAG is my own tag) but at runtime. I only want the tag to be inserted depending on some condition.
Basically, what i want to do is, insert the <tag> part into a certain place in the BODY..
in my debugging i found that the innerHTML bit didnt like me using the '<' or '>' which i had to replace with the HTML code &lt; and &gt; respectively - but this still didn't work !!
the code i have in my jscript is :
-----------------------
var a = "<experian_process_point type=Nav value=CPP_Nav_BurSearch>"
pos = document.body.innerHTML.indexOf("experian_process_point"
body = document.body.innerHTML;
newbody = body.slice(0,pos-1) + a + body.slice(pos-1)
document.body.innerHTML = newbody;
---------------------------------
when i query newbody, the string i inserted, isnt there !! and i dont understand why its not being inserted.
Any help please ?
I need help ASAP - as its urgent !
Thanks
I'm having severe problems adding a <tag> (the TAG is my own tag) but at runtime. I only want the tag to be inserted depending on some condition.
Basically, what i want to do is, insert the <tag> part into a certain place in the BODY..
in my debugging i found that the innerHTML bit didnt like me using the '<' or '>' which i had to replace with the HTML code &lt; and &gt; respectively - but this still didn't work !!
the code i have in my jscript is :
-----------------------
var a = "<experian_process_point type=Nav value=CPP_Nav_BurSearch>"
pos = document.body.innerHTML.indexOf("experian_process_point"
body = document.body.innerHTML;
newbody = body.slice(0,pos-1) + a + body.slice(pos-1)
document.body.innerHTML = newbody;
---------------------------------
when i query newbody, the string i inserted, isnt there !! and i dont understand why its not being inserted.
Any help please ?
I need help ASAP - as its urgent !
Thanks