Linking to "home.htm?id=1" ?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • spoken
    New Member
    • Oct 2007
    • 15

    Linking to "home.htm?id=1" ?

    Hi,

    How can I link to "home.htm?i d=1" ? I have tried to use
    getURL("home.ht m%3Fid-=1") and getURL("home.ht m?id-=1")
    but it doesn't work because flash looks for the physical file which doesn't exist because I'm using the parameter id=1 to generate some values in my page.

    Thanks in advance.

    Gordon
  • xNephilimx
    Recognized Expert New Member
    • Jun 2007
    • 213

    #2
    Hi spoken.
    I don't know what you're trying to do exactly, but
    getURL("home.ht m?id=1");
    should work without any problem

    This way:
    getURL("home.ht m?id-=1")

    maybe didn't work for you because of that - (dash) before the =

    Kind regards,
    The_Nephilim

    Originally posted by spoken
    Hi,

    How can I link to "home.htm?i d=1" ? I have tried to use
    getURL("home.ht m%3Fid-=1") and getURL("home.ht m?id-=1")
    but it doesn't work because flash looks for the physical file which doesn't exist because I'm using the parameter id=1 to generate some values in my page.

    Thanks in advance.

    Gordon

    Comment

    • spoken
      New Member
      • Oct 2007
      • 15

      #3
      Originally posted by xNephilimx
      Hi spoken.
      I don't know what you're trying to do exactly, but
      getURL("home.ht m?id=1");
      should work without any problem

      This way:
      getURL("home.ht m?id-=1")

      maybe didn't work for you because of that - (dash) before the =

      Kind regards,
      The_Nephilim
      Hi,

      What I'm doing is that I have created 1 page, home.htm. And based on the id, I will populate different data in that page from my XML. So home.htm?id=1 gets a different set of data from home.htm?id=2.

      So, basically there is no physical page call "home.htm?id=1" , hence when I do getURL("home.ht m%3Fid=1"), flash cannot find the file and give me a "404-page not found" error.

      Btw, I use "%3F" in place of "?" because it doesn't recognize "?" in the parameters of getURL()

      Thanks.
      Gordon

      Comment

      • spoken
        New Member
        • Oct 2007
        • 15

        #4
        Yes, you were right.
        I could just use getURL("home.ht m?id=1")

        The problem was that that didn't work when I tried to run it on my computer but it works when put it up in the web server.

        Thanks.
        Gordon

        Comment

        • xNephilimx
          Recognized Expert New Member
          • Jun 2007
          • 213

          #5
          Hi
          The url you are passing to getURL is just a string, and you should pass it the exact same way you would write it on the address bar.
          If you write home.htm?id=1 in the address bar and it works, the same must work with getURL. Don't replace the "?" with %3F, because it will be parsed by the bowser as part of the name of the file, not the actual question mark to pass parameters.
          I suppose your flash movie is in an html too. If not, it wil not work because of security issues that flash has.

          Best regards
          The_Nephilim

          Originally posted by spoken
          Hi,

          What I'm doing is that I have created 1 page, home.htm. And based on the id, I will populate different data in that page from my XML. So home.htm?id=1 gets a different set of data from home.htm?id=2.

          So, basically there is no physical page call "home.htm?id=1" , hence when I do getURL("home.ht m%3Fid=1"), flash cannot find the file and give me a "404-page not found" error.

          Btw, I use "%3F" in place of "?" because it doesn't recognize "?" in the parameters of getURL()

          Thanks.
          Gordon

          Comment

          Working...