470,618 Members | 1,723 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,618 developers. It's quick & easy.

Strange error

PW

I have an ASP that is gathering values (Activities) from the previous ASP.
Depending on what Activities the user selects, dictates what will be
displayed by the subsequent ASP.

If you notice in the below code segment, if the response.end is commented
then the javascript does not get processed and the program fails later on
when DB selects are performed.

If the response.end is not commented, then the javascript is processed and
the appropriate error ("You must select 2 activities") is displayed.

I cant figure out whats going on. Is it some kind of timing issue ?

Thanks in advance,
PW

-------------------------------------------------------

myAct1 = Request.QueryString("cbAct1")
myAct2 = Request.QueryString("cbAct2")
myAct3 = Request.QueryString("cbAct3")
myAct4 = Request.QueryString("cbAct4")
myActs = myAct1 & myAct2 & myAct3 & myAct4

if len(myActs) <> 4 then
%>
<script language="Javascript">
alert("You must select 2 activities")
history.go(-1)
</script>
<%
end if

response.write myActs
response.write len(myActs)
response.end


May 23 '06 #1
2 1222
Have you tried doing a response.flush?

if len(myActs) <> 4 then
%>
<script language="Javascript">
alert("You must select 2 activities")
history.go(-1)
</script>
<%
response.flush
end if

Earl
www.jhdesigninc.com

May 23 '06 #2
PW

"surf_doggie" <ea*******@gmail.com> wrote in message
news:11********************@38g2000cwa.googlegroup s.com...
Have you tried doing a response.flush?

if len(myActs) <> 4 then
%>
<script language="Javascript">
alert("You must select 2 activities")
history.go(-1)
</script>
<%
response.flush
end if

Earl
www.jhdesigninc.com

DUDE, you are my hero!!! Thats fixed it. Its been driving me mad. Thank
you so much. :-)

May 23 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

25 posts views Thread by Neil Ginsberg | last post: by
reply views Thread by Kris Vanherck | last post: by
6 posts views Thread by Gary | last post: by
5 posts views Thread by Nathan Sokalski | last post: by
reply views Thread by ivb | last post: by
11 posts views Thread by Martin Joergensen | last post: by
1 post views Thread by JoReiners | last post: by
11 posts views Thread by Mike C# | last post: by
3 posts views Thread by Shelly | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.