Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 272
  • Last Modified:

Parameters in flash

I have flash-button that on click navigates to some url. But I want to pass a parameter (like user id, for example) to the url. How can I do it?
0
jalonsoa
Asked:
jalonsoa
2 Solutions
 
negatyveCommented:
getURL("page.asp?userID=" + variable, "_self");

for example..
0
 
zakazCommented:
getURL("PAGE.ASP", "_self", "GET");
0
 
zakazCommented:
So if you pass a var:

var ID="ID22";

the url would be .... http://www.yoursite.com/PAGE.asp?ID=ID22

hope this helps
0
 
RohitmrCommented:
With the      getURL("page.asp", "_self", "GET")

All the form fields in the browser get sent. Be careful not to send unwanted data along with the userid. GET is also important as some browsers do not send data via the POST property properly. Flash plugin goof up.

If you have multiple variables in the form use

getURL("page.asp?" add variablename, "_self");
0
 
abdulqabizCommented:
Hi,

getURL(..) is ofcourse is mostly used method. But Flash MX has easier to do with LoadVars. We have control over the way we send data. We can choose which varaibles to send or not...


<code>

form_lv = new LoadVars();

//variables and their values to be sent to server
form_lv.variable1 = "somevalue";
form_lv.variable2 = "somevalue2";

//Use GET if you want to send it as query string..  
form_lv.send("http://your-site/script.asp", "_self", "POST");  
</code>

more help on this can be found at http://livedocs.macromedia.com/flash/mx2004/main/12_as301.htm#236883


Hope it helps,

Regards,
Abdul

0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now