MySpace Open Platform

A Place For Developers

Welcome Developers!

in

Welcome!

in

Can I get url parameters?

Last post 03-11-2008 4:27 PM by jbum. 7 replies.
Page 1 of 1 (8 items)
Sort Posts: Previous Next
  • 02-07-2008 11:40 AM

    • Robby
    • Top 500 Contributor
    • Joined on 02-05-2008
    • Posts 12

    Can I get url parameters?

    I tried writing a function to access the main url of the application page that is being viewed. i tried several javascript implementations of getting the window.location.href and parsing through but the problem is that the entire script is in an iframe of the main window. i tried 50 different variations of window.top.location.href and nothing seems to be able to get the url of the main page.

    is there an opensocial or myopenspace implementation of getting url parameter? 

     

     

    Filed under: , ,
  • 02-07-2008 7:10 PM In reply to

    • Henry
    • Not Ranked
    • Joined on 12-21-2007
    • Posts 2

    Re: Can I get url parameters?

    What's the specific parameter you're trying to get? Maybe I can help...

  • 02-08-2008 6:00 AM In reply to

    • Robby
    • Top 500 Contributor
    • Joined on 02-05-2008
    • Posts 12

    Re: Can I get url parameters?

     well i'm redirecting the page back to itself with a parameter that i've put into the url, but i can't seem to access the main url from javascript.

  • 02-11-2008 12:53 PM In reply to

    Re: Can I get url parameters?

    As far as I know, browser domain policy will prevent you from reading the top window's url.

    We'll be providing a requestNavigateTo(surface, params) function that will allow you to easily pass parameters and navigate between surfaces (as well as refreshing the current surface). Expect this within the next 2 weeks. 

    Thanks, Chris 

  • 02-13-2008 6:52 PM In reply to

    Re: Can I get url parameters?

    how can't I change the URL in myspace

  • 03-11-2008 12:05 PM In reply to

    • jbum
    • Top 500 Contributor
    • Joined on 02-05-2008
    • Posts 21

    Re: Can I get url parameters?

    I see that requestNavigateTo is documented now.  Is it working?  If so, can you provide a working example of it's use?

     

  • 03-11-2008 2:12 PM In reply to

    • Egg
    • Top 50 Contributor
    • Joined on 02-05-2008
    • Posts 73

    Re: Can I get url parameters?

    Chris:

    As far as I know, browser domain policy will prevent you from reading the top window's url.

    We'll be providing a requestNavigateTo(surface, params) function that will allow you to easily pass parameters and navigate between surfaces (as well as refreshing the current surface). Expect this within the next 2 weeks. 

    Thanks, Chris 

    Two weeks!

    This was working just a couple of days ago and your soft launching Thursday!

    Filed under:
  • 03-11-2008 4:27 PM In reply to

    • jbum
    • Top 500 Contributor
    • Joined on 02-05-2008
    • Posts 21

    Re: Can I get url parameters?

    This is still not working 100%, as far as I can tell.  I can use requestNavigateTo to go to my canvas page now, but I can't seem to retrieve the parameters I pass to it, via getParams(). 

     Could be operator error though, as I still haven't seen working example code.

Page 1 of 1 (8 items)