Ooops the title: Accessing IFRAME from the same page with JavaScript ?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Tom Szabo

    #1

    Ooops the title: Accessing IFRAME from the same page with JavaScript ?


    "Tom Szabo" <tom@intersoft. net.au> wrote in message
    news:419fe530$1 @dnews.tpgi.com .au...[color=blue]
    > Hi All,
    >
    > I have a page and inside the page I have an IFRAME. From the page I like[/color]
    to[color=blue]
    > change the content of the IFRAME (that is inside the same page) depending
    > on which control the user presses. The chage would be triggered by the
    > control using a JavaScript.
    >
    > My primary problem is to access the IFrame of the page.
    >
    > I have tried to access the IFRAME and change the content, but no luck so
    > far:
    >
    > function Load_Detail_For m(cURL){
    > document.getEle mentById("Detai l_Form_Frame"). src = cURL;
    > }
    >
    > Can someone help me with this?
    >
    > TIA,
    >
    > Tom
    >
    >[/color]


  • J. J. Cale

    #2
    Re: Ooops the title: Accessing IFRAME from the same page with JavaScript ?


    "Tom Szabo" <tom@intersoft. net.au> wrote in message
    news:419fe7a1$1 @dnews.tpgi.com .au...[color=blue]
    >
    > "Tom Szabo" <tom@intersoft. net.au> wrote in message
    > news:419fe530$1 @dnews.tpgi.com .au...[color=green]
    > > Hi All,
    > >
    > > I have a page and inside the page I have an IFRAME. From the page I like[/color]
    > to[color=green]
    > > change the content of the IFRAME (that is inside the same page)[/color][/color]
    depending[color=blue][color=green]
    > > on which control the user presses. The chage would be triggered by the
    > > control using a JavaScript.
    > >
    > > My primary problem is to access the IFrame of the page.
    > >
    > > I have tried to access the IFRAME and change the content, but no luck so
    > > far:
    > >
    > > function Load_Detail_For m(cURL){
    > > document.getEle mentById("Detai l_Form_Frame"). src = cURL;
    > > }[/color][/color]

    you may be testing in a browser that doesn't support the gEBI feature or
    alternatively you may be passing a broken url. Hard to say from your
    snippet. Try testing first for the feature.
    if(document.get ElementById)
    document.getEle mentById("Detai l_Form_Frame"). src = cURL;

    and you might want to make sure you get back a proper reference.

    if(document.get ElementById)
    var oRef = document.getEle mentById("Detai l_Form_Frame");
    if (oRef) oRef.src = cURL;

    and make sure that cURL contains a valid path to the file I assume you are
    trying to load.
    HTH
    Jimbo
    [color=blue][color=green]
    > > Can someone help me with this?
    > >
    > > TIA,
    > >
    > > Tom
    > >
    > >[/color]
    >
    >[/color]


    Comment

    • Tom Szabo

      #3
      Re: Ooops the title: Accessing IFRAME from the same page with JavaScript ?

      Thanks, it is working now



      "J. J. Cale" <photom@netvisi on.net.il> wrote in message
      news:41a02aee$1 @news.012.net.i l...[color=blue]
      >
      > "Tom Szabo" <tom@intersoft. net.au> wrote in message
      > news:419fe7a1$1 @dnews.tpgi.com .au...[color=green]
      > >
      > > "Tom Szabo" <tom@intersoft. net.au> wrote in message
      > > news:419fe530$1 @dnews.tpgi.com .au...[color=darkred]
      > > > Hi All,
      > > >
      > > > I have a page and inside the page I have an IFRAME. From the page I[/color][/color][/color]
      like[color=blue][color=green]
      > > to[color=darkred]
      > > > change the content of the IFRAME (that is inside the same page)[/color][/color]
      > depending[color=green][color=darkred]
      > > > on which control the user presses. The chage would be triggered by the
      > > > control using a JavaScript.
      > > >
      > > > My primary problem is to access the IFrame of the page.
      > > >
      > > > I have tried to access the IFRAME and change the content, but no luck[/color][/color][/color]
      so[color=blue][color=green][color=darkred]
      > > > far:
      > > >
      > > > function Load_Detail_For m(cURL){
      > > > document.getEle mentById("Detai l_Form_Frame"). src = cURL;
      > > > }[/color][/color]
      >
      > you may be testing in a browser that doesn't support the gEBI feature or
      > alternatively you may be passing a broken url. Hard to say from your
      > snippet. Try testing first for the feature.
      > if(document.get ElementById)
      > document.getEle mentById("Detai l_Form_Frame"). src = cURL;
      >
      > and you might want to make sure you get back a proper reference.
      >
      > if(document.get ElementById)
      > var oRef = document.getEle mentById("Detai l_Form_Frame");
      > if (oRef) oRef.src = cURL;
      >
      > and make sure that cURL contains a valid path to the file I assume you are
      > trying to load.
      > HTH
      > Jimbo
      >[color=green][color=darkred]
      > > > Can someone help me with this?
      > > >
      > > > TIA,
      > > >
      > > > Tom
      > > >
      > > >[/color]
      > >
      > >[/color]
      >
      >[/color]


      Comment

      Working...