Solved

iframe problem

Posted on 2004-03-30
11
860 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.


0
Comment
Question by:fpoyavo
11 Comments
 
LVL 33

Expert Comment

by:shalomc
ID: 10715502
try

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

ShalomC
0
 
LVL 1

Author Comment

by:fpoyavo
ID: 10715818
Did not help. :(
0
 
LVL 6

Expert Comment

by:jarasa
ID: 10716081
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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 1

Author Comment

by:fpoyavo
ID: 10716651
I was trying other names and methods to get value of that field but all in vain :(
0
 
LVL 1

Expert Comment

by:gagaliya
ID: 10717340
parent.document.getElementById('ID').src = tempID;

?
0
 
LVL 19

Accepted Solution

by:
Kuldeepchaturvedi earned 500 total points
ID: 10717418
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
 
LVL 1

Author Comment

by:fpoyavo
ID: 10742059
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
 
LVL 1

Author Comment

by:fpoyavo
ID: 10742075
How come point went to Kuldeep.....

I said to GAGALIYA. PLEASE CORRECT IT.
0
 
LVL 19

Expert Comment

by:Kuldeepchaturvedi
ID: 10742098
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
 
LVL 14

Expert Comment

by:kennethxu
ID: 10743652
you can post a support request in:
http://www.experts-exchange.com/Community_Support/
0
 
LVL 1

Author Comment

by:fpoyavo
ID: 10745296
Yep. That's OK. Thank you.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Original post  on Monitis Blog. Web performance monitoring is broken into two camps: passive and active. Passive monitoring is defined as looking at real-world historical performance by monitoring actual log-ins, site hits, clicks, requests for…
Originally, this post was published on Monitis Blog, you can check it here . Websites are getting bigger and more complicated by the day. Video, images and custom fonts are all great for showcasing your product or service. But the price to pay in…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question