• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 897
  • 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
 
shalomcCTOCommented:
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
Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

 
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Introducing Cloud Class® training courses

Tech changes fast. You can learn faster. That’s why we’re bringing professional training courses to Experts Exchange. With a subscription, you can access all the Cloud Class® courses to expand your education, prep for certifications, and get top-notch instructions.

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