I hope anyone can guide me here on AS3 loading ASP file in a textfield.
I am new to AS3 and ASP. I just need to load the list of Doctors name in the textfield on AS3
Hoping anyone here can help a poor fellow
below is my AS3 code:
//Create the URLLOader instance
var myLoader:URLLoader = new URLLoader()
//the data will come as URL-encoded variables
myLoader.dataFormat = URLLoaderDataFormat.TEXT;
//Load using an URLRequest, even beeing local
myLoader.load(new URLRequest("../doctors/thisdoctor.asp"))
//onload handler listener
myLoader.addEventListener(Event.COMPLETE, onDataLoad)
//add a listener for the complete event
function onDataLoad(evt:Event){
for(var i:uint=0; i<evt.target.data.cant; i++){
this["docname"+i].htmlText = "<b>"+evt.target.data["Doctors Name"+i]+"</b>"
this["docdesignation"+i].text = evt.target.data["Doctors Designation"+i]
var loader:Loader = new Loader()
this["holder_mc"+i].addChild(loader)
loader.load(new URLRequest(evt.target.data["Image"+i]))
}
}
and below my ASP code:
<%
sub displaydoctorprofile(doctorname)
doctorname = StripHTML(TRIM(Request.QueryString("doctorname")))
set rs = server.CreateObject("ADODB.recordset")
rs.CursorLocation = adUseClient
strQuery = ""
strQuery = "SELECT * FROM tbl_website_doctors " &_
" INNER JOIN tbl_website_master " &_
" ON tbl_website_doctors.DoctorDept = tbl_website_master.ID " &_
" WHERE tbl_website_doctors.DoctorName = '" & doctorname & "' AND tbl_website_doctors.Active = '1'"
rs.Open strQuery, conn, adOpenStatic, adLockOptimistic
if rs.RecordCount = 0 then
response.redirect BaseURL
else
docname = TRIM(rs("DoctorName"))
docdesignation = TRIM(rs("doctordesignations"))
docdept = TRIM(rs("description"))
'active
end if
rs.Close
set rs = nothing
set conn = nothing
if docspecialinterest <> "" then
ShowDocSpecialty = "Dr. " & docname & " has clinical interests in " & docspecialinterest & "."
else
ShowDocSpecialty = "<strong style=""color:#ff0000;"">Profile Being Updated</strong>"
end if
</span>
<%
Response.Write "</div>"
end sub
%>
All the best,
BB

New Topic/Question
Reply


MultiQuote



|