sawtontape
01-30-2007, 06:30 AM
Hello,
I am trying to load variables using LoadVars() in my login page; if the only thing I am doing inside of my asp code is loading and sending variables to and from flash then everything is working, but as soon as I add any html tags into my asp code the variables return 'undefined'.... to me that is really strange, I've tried searching this online for about 2 hours now with different search words and nothing regarding this issue comes up...
Has anyone had that problem before?
I can actually take out most of the html tags from my asp file except the #include lines, well I guess I can copy pastethe functions that I need from included files too but there is got to be a better way of doing this, I'd really hate to break up all of my include files and copy paste separate functions everywhere, thatsredundant..
Here's the code that I am usingin flash:
submit.onPress = function(){
var Login:Number;
result_login.Login = 1;
result_login.UserName = UserName;
result_login.Password = Password;
result_login.sendAndLoad("login.asp", result_login, "POST")
}
var result_login = new LoadVars();
result_login.onLoad = function() {
alert = result_login.R;
};
stop();
And here isour ASP code:
<%
Option Explicit
Dim UserName
Dim Password
Dim Login
Dim ReturnString
UserName = Trim(Request.Form("UserName"))
Password = Trim(Request.Form("Password"))
Login = Trim(Request.Form("Login"))
ReturnString = "R=this works!!! " & UserName & Password & Login
response.Write(ReturnString)
%>
now the code above works perfectly! but as soon as I add more things to my asp file any HTML tags or include, the variables in flash return 'undefined'... :
Example of ASP code thatDOESNT work:
<% Option Explicit %>
<!-- #include file = "../dbfunctions2.asp" -->
<!-- #include file = "/includes/newarticle.asp" -->
<%
Option Explicit
Dim UserName
Dim Password
Dim Login
Dim ReturnString
UserName = Trim(Request.Form("UserName"))
Password = Trim(Request.Form("Password"))
Login = Trim(Request.Form("Login"))
ReturnString = "R=this works!!! " & UserName & Password & Login
response.Write(ReturnString)
%>
Please help me out if you know what could be wrong, I dont know what internal processes flash goes to when it sends things to asp or how long it waits for the response from ASP but it seems to me like as soon as flash sees HTML tags it doesn't look any further to see if there is anything returned back and sets the vars to undefined or maybe it just times out, I guess I just dont know...
Thanks in Advance,
Post Edited (sawtontape) : 1/31/2007 12:56:45 AM GMT
I am trying to load variables using LoadVars() in my login page; if the only thing I am doing inside of my asp code is loading and sending variables to and from flash then everything is working, but as soon as I add any html tags into my asp code the variables return 'undefined'.... to me that is really strange, I've tried searching this online for about 2 hours now with different search words and nothing regarding this issue comes up...
Has anyone had that problem before?
I can actually take out most of the html tags from my asp file except the #include lines, well I guess I can copy pastethe functions that I need from included files too but there is got to be a better way of doing this, I'd really hate to break up all of my include files and copy paste separate functions everywhere, thatsredundant..
Here's the code that I am usingin flash:
submit.onPress = function(){
var Login:Number;
result_login.Login = 1;
result_login.UserName = UserName;
result_login.Password = Password;
result_login.sendAndLoad("login.asp", result_login, "POST")
}
var result_login = new LoadVars();
result_login.onLoad = function() {
alert = result_login.R;
};
stop();
And here isour ASP code:
<%
Option Explicit
Dim UserName
Dim Password
Dim Login
Dim ReturnString
UserName = Trim(Request.Form("UserName"))
Password = Trim(Request.Form("Password"))
Login = Trim(Request.Form("Login"))
ReturnString = "R=this works!!! " & UserName & Password & Login
response.Write(ReturnString)
%>
now the code above works perfectly! but as soon as I add more things to my asp file any HTML tags or include, the variables in flash return 'undefined'... :
Example of ASP code thatDOESNT work:
<% Option Explicit %>
<!-- #include file = "../dbfunctions2.asp" -->
<!-- #include file = "/includes/newarticle.asp" -->
<%
Option Explicit
Dim UserName
Dim Password
Dim Login
Dim ReturnString
UserName = Trim(Request.Form("UserName"))
Password = Trim(Request.Form("Password"))
Login = Trim(Request.Form("Login"))
ReturnString = "R=this works!!! " & UserName & Password & Login
response.Write(ReturnString)
%>
Please help me out if you know what could be wrong, I dont know what internal processes flash goes to when it sends things to asp or how long it waits for the response from ASP but it seems to me like as soon as flash sees HTML tags it doesn't look any further to see if there is anything returned back and sets the vars to undefined or maybe it just times out, I guess I just dont know...
Thanks in Advance,
Post Edited (sawtontape) : 1/31/2007 12:56:45 AM GMT