PDA

View Full Version : running asp between script



hantz
10-30-2007, 03:40 PM
i got this code:

<script type="text/javascript">
function displayContent(){
newwin=window.open('','win','left=100,top=100,widt h=250,height=180')
newwin.document.write('<HTML>\n<HEAD>\n')
newwin.document.write('<TITLE>Pddsd sdsddsds rint Page</TITLE>\n')
newwin.document.write('</HEAD>\n')
newwin.document.write('<BODY><center>\n')
newwin.document.write('?')
newwin.document.write('</BODY>\n')
newwin.document.write('</HTML>\n')
newwin.document.close()
}
</script>

how can i make it run asp code while the js running?


<%
dim mysqlm, connasa, connstringasa, vabo, namo
vabo = request.cookies("devUserName")
Set connasa = Server.CreateObject("ADODB.Connection")
ConnStringasa =SQL STRING
Connasa.Open ConnStringasa

namo=Time()
mySQLm="UPDATE crmagents SET online='" & namo & "' WHERE username='" & vabo & "'"
connasa.execute(mySQLm)
Connasa.close
set Connasa=nothing
%>

hantz
10-30-2007, 03:41 PM
if i will use


str=document.getElementById(id).innerHTML
</script>
and add the asp code into
<DIV id="d1" style="visibility:hidden; position: absolute;">

this won't work cause the code is in the header...and the header got to be before </head>
and i do not want to use another include...