redirect

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

    redirect

    I am using this code to redirect to another page


    <body>
    <script language="javas cript">
    window.location ="index2.php?ui =0&ua=0&opt=for um"
    </script>
    </body>


    the problem is that in one place this code is inside a floating frame
    <iframe src="processing .page.php"></iframe>

    the script does some stuff and if successful it redirects to index2.php


    and everything works but i want it to redirect out of frame in the same
    window.


    how can i direct it out of frame?


    thanks
  • Peter

    #2
    Re: redirect

    "sentinel" wrote[color=blue]
    > I am using this code to redirect to another page
    >
    > <script language="javas cript">[/color]

    Drop the language. It is of no use and deprecated. Use type:
    <script type="text/javascript">
    [color=blue]
    > window.location ="index2.php?ui =0&ua=0&opt=for um"
    >
    > the problem is that in one place this code is inside a floating frame
    > and everything works but i want it to redirect out of frame in the same
    > window.
    >[/color]

    You mean
    parent.location = ...
    or even
    top.location = ...

    hth
    Ivo



    Comment

    • alu

      #3
      Re: redirect


      "sentinel" <postmaster@elm a.hr> wrote[color=blue]
      > I am using this code to redirect to another page
      >
      >
      > <body>
      > <script language="javas cript">
      > window.location ="index2.php?ui =0&ua=0&opt=for um"
      > </script>
      > </body>
      >
      >
      > the problem is that in one place this code is inside a floating frame
      > <iframe src="processing .page.php"></iframe>
      >
      > the script does some stuff and if successful it redirects to index2.php
      >
      >
      > and everything works but i want it to redirect out of frame in the same
      > window.
      >
      >
      > how can i direct it out of frame?
      >
      >
      > thanks[/color]


      ------------------------------

      parent.location =.......

      -alu


      Comment

      • alu

        #4
        Re: redirect

        > "sentinel" <postmaster@elm a.hr> wrote[color=blue][color=green]
        > > I am using this code to redirect to another page
        > >
        > >
        > > <body>
        > > <script language="javas cript">
        > > window.location ="index2.php?ui =0&ua=0&opt=for um"
        > > </script>
        > > </body>
        > >
        > >
        > > the problem is that in one place this code is inside a floating frame
        > > <iframe src="processing .page.php"></iframe>
        > >
        > > the script does some stuff and if successful it redirects to index2.php
        > >
        > >
        > > and everything works but i want it to redirect out of frame in the same
        > > window.
        > >
        > >
        > > how can i direct it out of frame?
        > >
        > >
        > > thanks[/color][/color]

        ------------------------------
        and you should use <script type="text/javascript">, not language=

        -alu



        Comment

        • Jedi Fans

          #5
          Re: redirect

          sentinel wrote:[color=blue]
          > I am using this code to redirect to another page
          >
          >
          > <body>
          > <script language="javas cript">
          > window.location ="index2.php?ui =0&ua=0&opt=for um"
          > </script>
          > </body>
          >
          >
          > the problem is that in one place this code is inside a floating frame
          > <iframe src="processing .page.php"></iframe>
          >
          > the script does some stuff and if successful it redirects to index2.php
          >
          >
          > and everything works but i want it to redirect out of frame in the same
          > window.
          >
          >
          > how can i direct it out of frame?
          >
          >
          > thanks[/color]
          top.location="i ndex2.php?ui=0& ua=0&opt=forum"

          Comment

          • alu

            #6
            Re: redirect


            "Jedi Fans" <"news[at]jedifans[--=dot==-]com"> wrote[color=blue]
            > sentinel wrote:[color=green]
            > > I am using this code to redirect to another page
            > >
            > >
            > > <body>
            > > <script language="javas cript">
            > > window.location ="index2.php?ui =0&ua=0&opt=for um"
            > > </script>
            > > </body>
            > >
            > >
            > > the problem is that in one place this code is inside a floating frame
            > > <iframe src="processing .page.php"></iframe>
            > >
            > > the script does some stuff and if successful it redirects to index2.php
            > >
            > >
            > > and everything works but i want it to redirect out of frame in the same
            > > window.
            > >
            > >
            > > how can i direct it out of frame?
            > >
            > >
            > > thanks[/color]
            > top.location="i ndex2.php?ui=0& ua=0&opt=forum"[/color]

            'top' may not be the parent of the iframe.
            just curious - why choose this over parent.location ?
            -alu


            Comment

            • sentinel

              #7
              Re: redirect

              alu wrote:
              [color=blue]
              > ------------------------------
              > and you should use <script type="text/javascript">, not language=
              >
              > -alu[/color]

              thanks

              Comment

              Working...