SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  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)

    changing state works in IE but not FF?

    i have this script that whenever the state of the page changes it updates the browser location by and id number like .html#id=3 for different states. it works fine and when in IE i go to a different page and then hit the back button and the URL contains the #id=3 and it goes to the proper state but when in FF i hit the back button and the #id=3 is not there.

    anyone know why it does that in firefox?


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

  2. #2
    SitePoint Wizard Pepejeria's Avatar
    Join Date
    Jan 2005
    Location
    Too far up north
    Posts
    1,566
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What does the JavaScript console in Firefox tell you?

  3. #3
    SitePoint Enthusiast
    Join Date
    Nov 2005
    Location
    London, UK
    Posts
    81
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    How do you change the URL with location object exactly?

    I fear that the location object is proprietary which might immediately lead to some difficulties across browsers.

  4. #4
    SitePoint Wizard Pepejeria's Avatar
    Join Date
    Jan 2005
    Location
    Too far up north
    Posts
    1,566
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by peterbe
    I fear that the location object is proprietary which might immediately lead to some difficulties across browsers.
    All browsers (even really old ones) support window.location

  5. #5
    Pragmatic Programmer halfasleeps's Avatar
    Join Date
    Feb 2006
    Location
    Altoona, PA. USA
    Posts
    1,945
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Pepejeria
    What does the JavaScript console in Firefox tell you?

    like the actual URL in FF will add the #id=3 but when i change the page and hit the back button it wont still be there

    if you go to this page:
    https://www.kranichs.com/category.php?cid=39

    and select a different page (in the flash) in both IE and firefox and you can see the browser update the #id=x in the location bar but when you leave and hit back-button in IE the #id=x will still be there but in FF it disapears.

    this is the javascript used:
    Code:
    <script language="VBScript">
    <!-- 
    Sub flashapp_FSCommand(ByVal command, ByVal args)
    	select case command
    		case "putHREF"  location.href = args
    		case "putTitle" document.title = args
    	end select
    end sub
    -->
    </script>
    <script language="JavaScript">
    <!-- 
    	function flashPutHref(href) { location.href = href; }
    	function flashPutTitle(title) { document.title = title; }
    -->
    </script>
    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
  •