Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

iframe problem

Posted on 2004-03-30
11
859 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
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

Is your phone running out of space to hold pictures?  This article will show you quick tips on how to solve this problem.
Starting your own business is always a daunting process, and for most people it is brand new experience. Avoid the common pitfalls by following these tips to start on the road to success.
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

840 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