Load on Parent Frame

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Rose Girl

    #1

    Load on Parent Frame


    Hi,

    I have a frame set with 3 windows. (top,left and center). My main
    webpages are loaded in the center frame. What i want is really quite
    simple (But no idea how to do ??).

    When a certain page is loaded to the center frame, instead i want that
    page to replace the whole frameset and get loaded fully in the window.
    Can i use an onload to call a javascript to say that this page needs to
    be loaded in the parent window.

    Thanks for the trouble
    Rose

  • Daniel Kirsch

    #2
    Re: Load on Parent Frame

    Rose Girl wrote:[color=blue]
    > When a certain page is loaded to the center frame, instead i want that
    > page to replace the whole frameset and get loaded fully in the window.
    > Can i use an onload to call a javascript to say that this page needs to
    > be loaded in the parent window.[/color]

    onload = function() {
    if (top.location != self.location)
    top.location = self.location;
    };

    [color=blue]
    > Thanks for the trouble[/color]

    Want some more? ;-)

    Daniel

    Comment

    • Rose Girl

      #3
      Re: Load on Parent Frame

      Thanks. It worked

      Comment

      • Rose Girl

        #4
        Re: Load on Parent Frame

        Hi, can you figure out this problem for me too
        (It might be a struts or jsp problem)

        I need some help on this. My application is based on Struts.
        I have a jsp page. I have a button (normal html button)

        <input name="button" type="button" value="Save"
        onclick="javasc ript:validate() ;" />

        The onclick event calls a javascript function. If there are errors the
        script returns false; I submit the page using like this.

        document.forms['forgotPassword Form'].submit();

        The problem is when the focus is on a text field, and when i press the
        enter key, the page gets submits.
        (There are no coding for keyboard entries)

        I want to stop this as non validated data is passed to the struts
        action classes.

        What may be the reason. Does it has anything to do with Struts.

        Thanks for your time
        Rose Girl

        Comment

        • Daniel Kirsch

          #5
          Re: Load on Parent Frame

          Rose Girl wrote:[color=blue]
          > <input name="button" type="button" value="Save"
          > onclick="javasc ript:validate() ;" />[/color]

          Content of the onclick attribut is allready defined as script. So using
          the pseudo-protokoll "javascript :" isn't necessary (or even wrong).

          onclick="valida te()"

          [color=blue]
          > The problem is when the focus is on a text field, and when i press the
          > enter key, the page gets submits.
          > (There are no coding for keyboard entries)
          >
          > I want to stop this as non validated data is passed to the struts
          > action classes.[/color]

          You may use onsubmit
          http://msdn.microsoft.com/workshop/a...s/onsubmit.asp

          Daniel

          Comment

          Working...