dcsimg
A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: flash forms screwed up by "_self"

  1. #1

    flash forms screwed up by "_self"

    whenever i use "_self", it automatically throws in all my variables for the form, in whatever order it seems to feel like. when i leave out "_self" it pops up a new window, but it gets it all just fine. that would be fine, but I do not want it to pop up a new window, nor does my client.

    getURL("http://thesite.com/search/X?SEARCH=" + [SEARCH] + "&b=" + [b] + "&SORT=" + [SORT] + "&m=" + [m], "_self", "GET");

    it looks complicated, but it's really not. I'm putting in the information exactly how this crappy search engine wants it (they give us a lot of limitations, so i'm just working around them) so i put in all the little parts like &SORT= and then insert one of my variables [SORT].

    this all works just fine whenever I leave out "_self". if I put it in, I end up getting the correct string PLUS whatever flash feels like throwing in, so it gets like twice the variables that it really needs.

    what is up with that??

    thanks for your help!
    -
    Jake

  2. #2
    general rule bender Gloomycus's Avatar
    Join Date
    Nov 2000
    Location
    ontario canada
    Posts
    1,538
    do you actually have all your variables in square brackets like that?

  3. #3
    nope. i tried it with the square brackets too, but it didn't change anything.

    but for some reason, it's bringing up the pages ok now. maybe my browser was jacked or something.

    But i still haven't figured out why the "_self" command basically repeats all my variables in the URL. guess it doesn't matter that much as long as it works, but if anyone knows why this happens, please let me know for future use!

    thanks!
    -
    Jake

  4. #4
    I take that back. It brings up the page originally, but when you click on something, because it has double the variables and such, it screws up the links. I need it to appear exactly like this in the URL:

    http://thesite.com/search/?searchtype=X&searcharg=williams&SORT=A

    where searchtype, searcharg and SORT are my variables.
    "williams" is a test search

    flash, doing the same search, comes out like this:
    http://thesite.com/search/?Xwilliams&searchtype=X&searcharg=williams&SORT=A

    notice how it puts Xwilliams before the question mark and all my variables.
    this is my code:
    getURL("http://thesite.com/search/?" + searchtype + searcharg, "_self", "GET");

    so you'd think it'd come out exactly in the order I told it. NOPE. it throws my searchtype and searcharg variables together right after the ? mark, AND then puts them in the way they are supposed to be, separated by ampersands.

    please help! I just want to be able to keep the thing in the same window, but "_self" jacks the string! does this happen to anybody else?
    Last edited by graffxguy; 02-17-2003 at 03:11 PM.
    -
    Jake

  5. #5
    well, i wish someone could have told me this earlier. it's a really REALLY simple fix. But i thought i'd post it so that it will help anyone who had the same thought process as me.

    all you do is leave out the "GET" method from the the GET URL function.
    i.e.:
    URLstring = "SEARCH="+input+"&SORT="+SORT+"&m="+m;
    getURL("http://thesite/search/X?"+URLstring, "_self");

    rather than:
    getURL("http://thesite/search/X?"+URLstring, "_self", "GET");

    the reason is that you're telling flash to add on all the variables IN ADDITION to the variables that you put in the URL (i.e. URLstring variable that I made)

    so anyways, just leave out the GET method if you are already placing variables into the URL.

    don't u just love it when you solve something yourself and it turns out to be the dumbest thing you were overlooking?!
    Last edited by graffxguy; 03-17-2003 at 06:13 PM.
    -
    Jake

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

HTML5 Development Center