SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    Pragmatic Programmer halfasleeps's Avatar
    Join Date
    Feb 2006
    Location
    Altoona, PA. USA
    Posts
    1,945
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    how to change url in browser?

    i know i can get it like this
    var site_location = document.location.href;

    but i want to change it but just change the variables

    like if its https://www.domain.com/some_page.php

    change it to https://www.domain.com/some_page.php?page=34

    but i want to do this WITHOUT causing the page to refresh.

    the reason i want to do this is because the page contains a flash movie and it has different pages and when you leave the page and hit the back button it takes you back to the flash page1 ...i want to make it so flash sends a variable to javascript telling it which page it is on and change the variable in the browser so that when they hit the back button it takes you back to the right flash page as well.

    Thanks
    Altoona Design
    Freelance Flex developer for hire.
    ActionScript Programmer with 8 Years Experience.

  2. #2
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,862
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    It isn't the address bar you need to change it is the browser history. To do this would require some manipulation of hidden iframes.
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">

  3. #3
    Pragmatic Programmer halfasleeps's Avatar
    Join Date
    Feb 2006
    Location
    Altoona, PA. USA
    Posts
    1,945
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanks, for your reply

    How would i do that?
    Altoona Design
    Freelance Flex developer for hire.
    ActionScript Programmer with 8 Years Experience.


Bookmarks

Posting Permissions

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