
Originally Posted by
wwb_99
AJ just isn't sexy.
I have to disagree with you there.

Originally Posted by
wwb_99
You just can't do that inside classic ASP without getting into building C++-based COM DLLs.
Do you not mean I? I have been playing with asyncronous javascript for 9 years, before Ajax and jQuery.
You just can't send the requests asyncronously through the same script element.
db.asp
Code:
<%
Response.ContentType="application/x-javascript"
Response.AddHeader "Content-Type", "application/x-javascript"
'do your database query here
%>
o=document.createElement("<h1>");
o.innerHTML="db Loaded";
document.getElementsByTagName("div")[0].appendChild(o);
remote.asp
Code:
<%
Response.ContentType="application/x-javascript"
Response.AddHeader "Content-Type", "application/x-javascript"
'do your remote query here
%>
o=document.createElement("<h1>");
o.innerHTML="remote Loaded";
document.getElementsByTagName("div")[0].appendChild(o);
default.asp
Code:
<head>
<script type="text/javascript">
function changeScript(s){
o=document.getElementsByTagName("head")[0];
n=document.createElement('script');
n.setAttribute('type', 'text/javascript');
n.setAttribute('src',s);
o.appendChild(n);
delete n;delete o;
}
// asyncronous javascript (both requests leaving at same time)
window.onload=function(){
changeScript("/remote.asp");
changeScript("/db.asp");
}
</script>
</head>
<div>
<h1>Default Loaded</h1>
</div>
The only benefit I can see in .NET is if the postback thing works without javascript. Can I do interactive stuff between client and server without js using .NET?
Bookmarks