iFrame issue

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • chaitanyadotcom@gmail.com

    iFrame issue

    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.getEle mentById("tabCo ntent").innerHT ML += "<div id =
    'frmContainer" + tabCounter + "'><iframe onload = " + frameOnload + "
    name = 'frame" + tabCounter + "' src = '" + this.url + "' width =
    '100%' height = '2000' scrolling = 'no'></iframe></div>" ;

    Thanks,
    Chaitanya
  • David Mark

    #2
    Re: iFrame issue

    On Nov 5, 4:01 pm, chaitanyadot... @gmail.com wrote:
    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.getEle mentById("tabCo ntent").innerHT ML += "<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.

    Comment

    • chaitanyadotcom@gmail.com

      #3
      Re: iFrame issue

      On Nov 5, 4:58 pm, David Mark <dmark.cins...@ gmail.comwrote:
      On Nov 5, 4:01 pm, chaitanyadot... @gmail.com wrote:
      >
      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.getEle mentById("tabCo ntent").innerHT ML += "<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).

      Comment

      • David Mark

        #4
        Re: iFrame issue

        On Nov 5, 5:11 pm, chaitanyadot... @gmail.com wrote:
        On Nov 5, 4:58 pm, David Mark <dmark.cins...@ gmail.comwrote:
        >
        >
        >
        On Nov 5, 4:01 pm, chaitanyadot... @gmail.com wrote:
        >
        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.getEle mentById("tabCo ntent").innerHT ML += "<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).
        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.

        Comment

        Working...