Link to home
Start Free TrialLog in
Avatar of fpoyavo
fpoyavoFlag for United States of America

asked on

iframe problem

Hi Experts,

I have JSP page inside of IFRAME
I also have javascript within this JSP like this : document.getElementById('ID').src = tempID;
where I am assigning value that was populated within JSP to outside of IFRAME source attribute of another IFRAME. Here 'ID' is id of another IFRAME in my main page.

What I am doing wrong ?

Thank you.


Avatar of Shalom Carmel
Shalom Carmel
Flag of Israel image

try

top.getElementById('ID').src = tempID;

ShalomC
Avatar of fpoyavo

ASKER

Did not help. :(
I guess that they should not be called ID try to change the name of one of them.

But anyway you should post the code to see it better.

Javier
Avatar of fpoyavo

ASKER

I was trying other names and methods to get value of that field but all in vain :(
Avatar of gagaliya
gagaliya

parent.document.getElementById('ID').src = tempID;

?
ASKER CERTIFIED SOLUTION
Avatar of Kuldeepchaturvedi
Kuldeepchaturvedi
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of fpoyavo

ASKER

Hi guys,

gagaliya was closer then anybody else. I actually found the answer before and it does have parent.....hmmm but worked only
when I used parent.framename.formname.elements[0].value.

Thank to all.
Avatar of fpoyavo

ASKER

How come point went to Kuldeep.....

I said to GAGALIYA. PLEASE CORRECT IT.
Hmm.... you must have clicked it wrongly...!!!
I do not know if admin can re assign them...
I will open up a points question for Gagaliya.. so that he can collect them..
Is that okay????
Avatar of fpoyavo

ASKER

Yep. That's OK. Thank you.