Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

flash and asp question thanks

Status
Not open for further replies.

melnet

Programmer
Jul 8, 2003
77
HK
Hello
the problem is when i type the button, it will pop up IE and IE's url is 127.0.0.1/store_data.asp
however i can store data to db.

Frame1:
stop();
asp = new LoadVars();

input box's var:
asp.productname

button:
on (release) {
asp.send("store_data.asp","POST");
//asp.sendAndLoad("store_data.asp", "POST");
}

store_data.asp:
<%
'Myself = Request.ServerVariables(&quot;PATH_INFO&quot;)
Set kc = Server.CreateObject(&quot;ADODB.Connection&quot;)
dsn = &quot;Driver={Microsoft Access Driver (*.mdb)}&quot; &_
&quot;;Dbq=&quot; & Server.MapPath(&quot;db/flash.mdb&quot;)
kc.open dsn

if (Request.Form(&quot;productname&quot;)<>empty) then
sql=&quot;Insert Into product (product_name) values ( '&quot;& request(&quot;productname&quot;) &&quot;')&quot;
set rs=kc.execute(sql)
else
response.write &quot;&error=not success&quot;
end if

'rs.close
kc.close
Set rs=Nothing
Set kc=Nothing
%>

thanks for help
 
the problem is when i click the button in flash. i dont know why it will pop up the browser.in gernal case, i click the button, the data is stored to db, right?
the browser's url is store_data.asp

thanks for help

ps inputing value on box is asp.productname
 
send will always open a new browser window sendandload wont as it works behind the scenes

asp.sendAndLoad(&quot;store_data.asp&quot;, asp,&quot;POST&quot;);
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top