iframe.src reload ?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Alexandre Jaquet

    #1

    iframe.src reload ?

    Hi I wanna know how can I reload an iframe does I've to move my iframe
    into another form an do a submit or may I can do it by another way

    rigth now I'm been doing :

    my form name is mainform and my iframe name is preview
    function urlRewrite () {
    ...
    this.document.m ainform.preview .src = 'xxxx';
    }
    thx in advance
  • Phlip

    #2
    Re: iframe.src reload ?

    Alexandre Jaquet wrote:
    [color=blue]
    > Hi I wanna know how can I reload an iframe does I've to move my iframe
    > into another form an do a submit or may I can do it by another way
    >
    > rigth now I'm been doing :
    >
    > my form name is mainform and my iframe name is preview
    > function urlRewrite () {
    > ..
    > this.document.m ainform.preview .src = 'xxxx';
    > }[/color]

    I suspect I just asked that. The best answer was:

    Richard Cornford wrote:[color=blue]
    > Phlip wrote:[color=green]
    > > JavaScripties:
    > >
    > > On the HTML side, we load an IFRAME with a blank page:
    > >
    > > <iframe frameborder="0" marginwidth="0" marginheight="0 "
    > > scrolling="off" src="about:blan k" id="iframe_xml1 !format_text"
    > > name="iframe_xm l1!format_text" width="90%" height=" 180 ">My
    > > site is inferior and doesn't deserve your support.</iframe>
    > >
    > > Later, a button click populates this frame:
    > >
    > > var iframe = window.frames[iframeName];
    > > iframe.src = outputUrl;
    > >
    > > That works on IE but not FireFox. Any tips?[/color]
    >
    > The object returned by references via the - frames - collection are
    > window/frame object, while the object representing the HTML IFRAME
    > element would be found in the DOM of the document in the window/frame
    > object containing the - frames - collection. The - src - property is
    > expected to be on the IFRAME element (though frequently read only) not
    > the window object within the IFRAME.
    >
    > To navigate window/frame object the normal practice is to assign a URL
    > to the location property of the frame in question (or assign a URL to
    > the - href - property of the object already referred to by the location
    > property):-
    >
    > iframe.location = outputUrl;[/color]

    If that didn't help, say what you are trying to do with pseudocode.

    --
    Phlip



    Comment

    • nutso fasst

      #3
      Re: iframe.src reload ?


      "Alexandre Jaquet" <alexj@floor.ch > wrote in message
      news:d2u6kd$eud $1@news.hispeed .ch...[color=blue]
      > Hi I wanna know how can I reload an iframe does I've to move my iframe
      > into another form an do a submit or may I can do it by another way[/color]

      Iframe isn't a form element.

      You give your iframe an ID, e.g.:
      <iframe id="myif" src="[initialURL]"></iframe>

      This ECMA script changes src property:

      document.getEle mentById("myif" ).src = "[newURL]"

      nf




      Comment

      • Alexandre Jaquet

        #4
        Re: iframe.src reload ?

        nutso fasst a écrit :[color=blue]
        > "Alexandre Jaquet" <alexj@floor.ch > wrote in message
        > news:d2u6kd$eud $1@news.hispeed .ch...
        >[color=green]
        >>Hi I wanna know how can I reload an iframe does I've to move my iframe
        >>into another form an do a submit or may I can do it by another way[/color]
        >
        >
        > Iframe isn't a form element.
        >
        > You give your iframe an ID, e.g.:
        > <iframe id="myif" src="[initialURL]"></iframe>
        >
        > This ECMA script changes src property:
        >
        > document.getEle mentById("myif" ).src = "[newURL]"
        >
        > nf
        >
        >
        >
        >[/color]

        yep thanks :)

        Comment

        Working...