Results 1 to 10 of 10

Thread: Resolved Little bug with window.open

Hybrid View

  1. #1

    Thread Starter
    Junior Member
    Join Date
    May 2003
    Posts
    27

    Re: Little bug with window.open

    Hi sciguyryan, the problem is that I want to reload the current page, I don't want to open a new one... I have a page with the identical function and it works perfectly, that's why I don't understand why this one won't reload with the _self target.... Any idea??

    Thanks

  2. #2
    Frenzied Member sciguyryan's Avatar
    Join Date
    Sep 2003
    Location
    Wales
    Posts
    1,763

    Re: Little bug with window.open

    Quote Originally Posted by Isengard
    Hi sciguyryan, the problem is that I want to reload the current page, I don't want to open a new one... I have a page with the identical function and it works perfectly, that's why I don't understand why this one won't reload with the _self target.... Any idea??

    Thanks

    Hmm, I see.

    Try this:

    Code:
    function Refreshpage(Type, StrTemp){
        if (!(window.location.href.indexOf("?type=") > 0)){
            window.location.href = window.location.href + "?type=" + Type + "&strtemp=" + StrTemp
        }
    }
    That should take the page location and then add ?type=something&strtemp=Something

    Cheers,

    RyanJ
    Last edited by sciguyryan; Jun 7th, 2005 at 04:13 PM.
    My Blog.

    Ryan Jones.

  3. #3

    Thread Starter
    Junior Member
    Join Date
    May 2003
    Posts
    27

    Re: Little bug with window.open

    I'm lost here, it doesn't work either, I tried this:



    Code:
    alert(window.location.href + "?type=" + Type + "&strtemp=" + StrTemp)
    I see the exact url as it should be but still, it won't reload.... And as I said, I have another page with the same function using different variables that work

    I'll have a look at the other page, just in case I'm missing something here!

    Thanks for your help!!

  4. #4
    Frenzied Member sciguyryan's Avatar
    Join Date
    Sep 2003
    Location
    Wales
    Posts
    1,763

    Re: Little bug with window.open

    Quote Originally Posted by Isengard
    I'm lost here, it doesn't work either, I tried this:



    Code:
    alert(window.location.href + "?type=" + Type + "&strtemp=" + StrTemp)
    I see the exact url as it should be but still, it won't reload.... And as I said, I have another page with the same function using different variables that work

    I'll have a look at the other page, just in case I'm missing something here!

    Thanks for your help!!
    Try the function that I posted.

    It does work because I just tested it

    Cheers,

    RyanJ
    My Blog.

    Ryan Jones.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width