[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 886
  • Last Modified:

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.


0
fpoyavo
Asked:
fpoyavo
1 Solution
 
shalomcCommented:
try

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

ShalomC
0
 
fpoyavoAuthor Commented:
Did not help. :(
0
 
jarasaCommented:
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
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
fpoyavoAuthor Commented:
I was trying other names and methods to get value of that field but all in vain :(
0
 
gagaliyaCommented:
parent.document.getElementById('ID').src = tempID;

?
0
 
KuldeepchaturvediCommented:
whats the name of your another IFRAME????
try doing

top.IframeName.document.getElementById('ID')
here iframeName is the actual name of the Iframe that contains ID
or try simply
top.document.getElementById('ID');
0
 
fpoyavoAuthor 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.
0
 
fpoyavoAuthor Commented:
How come point went to Kuldeep.....

I said to GAGALIYA. PLEASE CORRECT IT.
0
 
KuldeepchaturvediCommented:
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????
0
 
kennethxuCommented:
you can post a support request in:
http://www.experts-exchange.com/Community_Support/
0
 
fpoyavoAuthor Commented:
Yep. That's OK. Thank you.
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now