iFrame issue

  • Thread starter chaitanyadotcom
  • Start date
C

chaitanyadotcom

I was trying to dynamically generate iFrame. There are 3 href and when
you click on the first href, iFrame is populated in new Tab. And i
made respective changes to href i opened. Now i tried to open 2nd
href, and suprisingly the first href is also reloaded with the second
one.

Could anybody help me out in this issue,

document.getElementById("tabContent").innerHTML += "<div id =
'frmContainer" + tabCounter + "'><iframe onload = " + frameOnload + "
name = 'frame" + tabCounter + "' src = '" + this.url + "' width =
'100%' height = '2000' scrolling = 'no'></iframe></div>" ;

Thanks,
Chaitanya
 
D

David Mark

I was trying to dynamically generate iFrame. There are 3 href and when
you click on the first href, iFrame is populated in new Tab. And i
made respective changes to href i opened. Now i tried to open 2nd
href, and suprisingly the first href is also reloaded with the second
one.

This should not have been a surprise.
Could anybody help me out in this issue,

document.getElementById("tabContent").innerHTML += "<div id =
^
[snip]

And where did you find such code? Delete the bookmark and add some to
MSDN, Mozilla's documentation, etc. Then you won't be so surprised
when things go awry.
 
C

chaitanyadotcom

I was trying to dynamically generate iFrame. There are 3 href and when
you click on the first href, iFrame is populated in new Tab. And i
made respective changes to href i opened. Now i tried to open 2nd
href, and suprisingly the first href is also reloaded with the second
one.

This should not have been a surprise.


Could anybody help me out in this issue,
document.getElementById("tabContent").innerHTML += "<div id =

                                                  ^
[snip]

And where did you find such code?  Delete the bookmark and add some to
MSDN, Mozilla's documentation, etc.  Then you won't be so surprised
when things go awry.

if i try to remove that + sign then the previous opened tab will be
diabled (i.e, will not work or we cannot even close it).
 
D

David Mark

On Nov 5, 4:01 pm, (e-mail address removed) wrote:
This should not have been a surprise.
                                                 ^
[snip]
And where did you find such code?  Delete the bookmark and add some to
MSDN, Mozilla's documentation, etc.  Then you won't be so surprised
when things go awry.

if i try to remove that + sign then the previous opened tab will be
diabled (i.e, will not work or we cannot even close it).

How about implementing this site in HTML first? Post a link to a
working example and indicate how you would like to enhance it with
script. At the moment, script is just a liability for your users.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,070
Latest member
BiogenixGummies

Latest Threads

Top