Hello all,
I am having a problem with inter-frame communication. I am copying a value from iframe to the parent frame. It is working fine with Firefox, it does copy the value to the parent frame. but in IE or Konqueror it doesnt work. any idea? i am a newbie...
yes you are right!
but the question remains. even i am accessing 'socre' i am still getting desired string in html tags by using innerHTML. i have tried different combination with getElementById and getElementByTagName but nothing works for me. i dont know what i am missing.
the 'score' div tag is in the iframe, this div tag is cloned and appended to the parent div tag 'para1' as a child. so the tree in the parent window is
-DIV (para1)
-DIV (score)
-NAME
#text
i hope it is clear now.
no, i am accessing it in the parent window.
var t = document.getElementById('para1').lastChild
var p_value = t.innerHTML;
this code returns the desired string but with the HTML tags
<result> value </result>
how can i just get the VALUE without the HTML tags?
i checked from the DOM inspector the para1 div tag contains another div tag after cloned. the dom tree is like
-DIV
-DIV
-NAME
-#text (<-- this value is what i need to extract)
i tried the way you said, it returns [object HTMLDivElement]. i think i am missing something here.
I am using this javascript function in php to copy a DIV value from inside the inframe to the DIV in parent window.
<?php
echo "<script language=\"JavaScript\">\n";
echo "function test() {";
echo "var y=document.getElementById('score').cloneNode(true); ";
echo...
Hello all,
i am new to JavaScript, I am trying to get a div tag value using javascript. i have a div tag in html like this
<div id="para1"> </div>
there is another javascript that do some calculation and sets the result to para1 tag to display.
now i want to use this value somewhere else, I...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.