Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old May 23rd, 2006, 02:15 PM
PW
Guest
 
Posts: n/a
Default Strange error


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






  #2  
Old May 23rd, 2006, 09:55 PM
surf_doggie
Guest
 
Posts: n/a
Default Re: Strange error

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

  #3  
Old May 24th, 2006, 12:05 AM
PW
Guest
 
Posts: n/a
Default Re: Strange error


"surf_doggie" <earl.robb@gmail.com> wrote in message
news:1148417285.409388.6280@38g2000cwa.googlegroup s.com...[color=blue]
> 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
>[/color]


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



 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles