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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help with ASP + JVS

Status
Not open for further replies.

111101101

Programmer
Oct 16, 2003
39
0
0
US
Okay, i have some code like this...

<html>
<head>
<title></title>
<script language=&quot;JavaScript&quot; src=&quot;../lib/functions.js&quot;>
</head>

<body>
<%
Response.Redirect(&quot;../index&quot;)
%>
</body>
</html>


HERE IS THE DILEMMA... I need the javascript code to execute BEFORE the ASP code, meaning the users client browser must have already taken the code to execute my javascripts. After that, they will be redirected to another page. However, ASP codes are serverside and they ALWAYS execute before javascript code. So even with the code up there, ASP executes first, but the javascript never executes on the client side.

So my question is, how do i program it so that i can execute the javascript code. and then follow by the ASP code?

I have tried this using the Response.Buffer=TRUE and Response.Flush() around the JS code, but ASP gave me an error. I just need their clients to execute the JS code before i redirect them to another page.

How would i do that?

Thanks,
755
 
What is your client-side script supposed to do? Why don't you run your script in the Body OnLoad event and redirect using the javascript (window.location)?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top