We help IT Professionals succeed at work.

Check out our new AWS podcast with Certified Expert, Phil Phillips! Listen to "How to Execute a Seamless AWS Migration" on EE or on your favorite podcast platform. Listen Now

x

iframe problem

fpoyavo
fpoyavo asked
on
Medium Priority
934 Views
Last Modified: 2007-12-19
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.


Comment
Watch Question

CERTIFIED EXPERT

Commented:
try

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

ShalomC

Author

Commented:
Did not help. :(

Commented:
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

Author

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

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

?
Unlock this solution with a free trial preview.
(No credit card required)
Get Preview

Author

Commented:
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.

Author

Commented:
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????
you can post a support request in:
https://www.experts-exchange.com/Community_Support/

Author

Commented:
Yep. That's OK. Thank you.
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a free trial preview!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.