PDA

View Full Version : passing HTML form and hidden variables from flash to html page



vask
December 3rd, 2003, 02:36 AM
Hi,

I have a html/flash site now, http://www.zachariack.com.

i access email from my site itself by giving the userid and pwd text box which i copied from the actual website hosting my email access. i copied the entire
<form...></form> tag to my page and thus was able to put the name and pwd in my home page only and access the email in a separate window.

now i have redesigned my webpage using only flash. i would like to know how i can implement the same using flash. as i have not much experience using action scripting i am a bit stuck about how you pass the hidden form variables. the below is the the exact form syntax:

<form name="form1" action="http://www.accudatanet.com/mail/msglist.php" method=post>
<input type="hidden" name=sid value="E9697301F704A0CE947DEF42CF86636A">
<input type=text size=15 name=f_user value="">
<input type=hidden name=six value=0>
<input type=password size=15 name="f_pass">
<input type=submit name=submit value="Login >>" class="button">
</form>

how do i implement the above using action scripting. thanks.

regards,
vasant

norie
December 3rd, 2003, 04:18 AM
sendVars = new LoadVars();
sendVars.sid ="E9697301F704A0CE947DEF42CF86636A";
sendVars.f_user = "USERNAMEHERE";
sendVars.six = 0;
sendVars.f_pass = "Password";
sendVars.send("http://www.accudatanet.com/mail/msglist.php", "POST");




...i think should do the trick.

yestom
April 10th, 2008, 08:44 AM
sendVars = new LoadVars();
sendVars.sid ="E9697301F704A0CE947DEF42CF86636A";
sendVars.f_user = "USERNAMEHERE";
sendVars.six = 0;
sendVars.f_pass = "Password";
sendVars.send("http://www.accudatanet.com/mail/msglist.php", "POST");




...i think should do the trick.

Works great. Thanks!

emix2006
February 24th, 2009, 03:34 PM
Works great. Thanks!


i know this thread is old, but i was using it and have a little inconvenient:

everything seems to work fine, but i have one html field that i dont know how to send it from flash

here it is

<input type="hidden" name="FormValue_MailListIDs[]" value="1" />ive tried lot of combinations with out results:


sendVars.FormValue_MailListIDs[] ="1";
sendVars.FormValue_MailListIDs ="1";
sendVars.FormValue_MailListIDs[1] ="1";
sendVars.FormValue_MailListIDs["1"] ="1";
sendVars.FormValue_MailListIDs[1];
sendVars.FormValue_MailListIDs["1"];


so the thing is that flash doesnt allow me to use the [ ]
any ideas??

can somebody please help me? thats all i need to make it work!

thanks in advance!