Not sure what the error you are getting is... also, if you are running
win9x, this can happen, especially on a low-end system.. Would need
a bit more information on when you get this error, it *is* a server-side
error? when do you get the error in question, also, what os, and version
of iis/asp are you running on the system in question, what is the db?
Do you have caching enabled for asp pages on the server?
if IIS4(NT4), do you have it set at page level? also, try to break
your display code, into separate functions, that get called with page
logic.. this may help to track things down, running it in-line like
you have is a bit difficult to follow, having "clean code" as far as
your HTML, and your ASP, is a good idea, I have a LOT of trouble
reading your html tags, and the intersperced asp...
Also, have you tried adding error checking..? if you break your code
up into separate functions, it may be easier to track down...
Beyond this, there are a few things you can do to optimize code a bit...
A client-side JS example.. (16 lines, not 75) ...arrays our your friend,
you don't need to initializing empty String()'s in JS does NO GOOD!, in
fact it will slow things down.. beyond that, JS will auto-typecast under
use... So, if you add a string + number, it will become a string.
function formatDT(dt) {
var months,y,m,d,h,n,s,xm;
months = new Array("January","February","March","April","May",
"June","July","August","September","October","November","December");
y = (dt.getYear() < 1000)?(dt.getYear()+1900):dt.getYear();
m = months[dt.getMonth()];
d = dt.getDate();
h = dt.getHours();
h = (h > 12)?(h-12):((h==0)?"12":h);
n = (dt.getMinutes() < 10)?("0"+dt.getMinutes()):dt.getMinutes();
xm = (dt.getHours() < 12)?"AM":"PM";
return m + " " + d + ", " + y + "  | " + h + ":" + n + xm;
}
document.write(formatDT(new Date()));
P.S. I LOVE JAVASCRIPT!!!! CLIENT/SERVER, WHEREVER!!! :D
=======================================================================
Michael J. Ryan - tracker1 at theroughnecks dot com
Roughneck BBS: http://www.theroughnecks.net telnet://theroughnecks.net
=======================================================================
Y!: aztracker1 - aim: azTracker1 - icq: 4935386 - msn: see email
One program for aim/icq/yahoo/msn/irc - http://www.trillian.cc/
----- Original Message -----
From: "Babiker" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, August 28, 2002 6:15 PM
Subject: Re: The requested resource is in use.
> Actually has nothing to do with my code.IT HAPPENS TO MANNY FILES IN THE
> MY SITE .
>
> this is the url of the page which suppose to be displayed
>
>
> http://www.tfxpress.com/ShopingCart/YourBasket.Asp?CartId=336
>
>
> THIS IS THE FULL CODE FOR THAT FILE
>
>
>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
> <HTML><HEAD>
> <TITLE>TFXpress</TITLE>
> <META content="text/html; charset=windows-1252" http-equiv=Content-Type>
> <META content="MSHTML 5.00.2314.1000" name=GENERATOR>
> <script language="JavaScript">
> <!--
> <!--
> function MM_reloadPage(init) { //reloads the window if Nav4 resized
> if (init==true) with (navigator) {if
> ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
> document.MM_pgW=innerWidth; document.MM_pgH=innerHeight;
> onresize=MM_reloadPage; }}
> else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH)
> location.reload();
> }
> MM_reloadPage(true);
> // -->
>
> function MM_openBrWindow(theURL,winName,features) { //v2.0
> window.open(theURL,winName,features);
> }
>
> function MM_preloadImages() { //v3.0
> var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
> var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0;
> i<a.length; i++)
> if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image;
> d.MM_p[j++].src=a[i];}}
> }
>
> function MM_swapImgRestore() { //v3.0
> var i,x,a=document.MM_sr;
> for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
> }
>
> function MM_findObj(n, d) { //v4.0
> var p,i,x; if(!d) d=document;
> if((p=n.indexOf("?"))>0&&parent.frames.length) {
> d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
> if(!(x=d[n])&&d.all) x=d.all[n]; for
> (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
>
> for(i=0;!x&&d.layers&&i
> <d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
> if(!x && document.getElementById) x=document.getElementById(n); return
> x;
> }
>
> function MM_swapImage() { //v3.0
> var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array;
> for(i=0;i<(a.length-2);i+=3)
> if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc)
> x.oSrc=x.src; x.src=a[i+2];}
> }
> //-->
> </script>
> </HEAD>
> <BODY
onLoad="MM_preloadImages('../images/contact_on.gif','../images/cards-on.gif','
../images/rates_on.gif','../images/policy-on.gif','../images/faq_on.gif','../i
mages/home_on.gif')" bgcolor="#FFFFFF">
> <!-- #BeginLibraryItem "/Library/header.lbi" -->
> <TABLE align=center border=0 cellPadding=0 cellSpacing=0 width=620><TR><TD>
>
>
> <TABLE align=center border=0 cellPadding=0 cellSpacing=0 width=620>
> <TBODY>
> <TR bgColor=#000000>
> <TD height=81 width=15> </TD>
> <TD align=left vAlign=center width=474 height="81">
> <div align="center"><IMG alt="TF Xpress Online" height=54
> src="../images/mainmast2a.gif" width=395></div>
> </TD>
> <TD align=right vAlign=top height="81" width="104"> <IMG
> alt="TFxpress Logo" border=0
> src="../images/logo4.jpg" width="91" height="91"><br>
> </TD>
> <TD height=81 width=27> </TD>
> </TR>
> <TR bgColor=#99ccff>
> <TD height=20 width=15> </TD>
> <TD align=left colSpan=2 height=20 vAlign=center>
> <TABLE border=0 cellPadding=0 cellSpacing=0 width="100%">
> <TBODY>
> <TR>
> <TD align=left height=20 width="60%"><font face="Verdana, Arial,
Helvetica, sans-serif" size="-1">Simple
> Convienient Calling Anytime, Anywhere</font></TD>
> <TD align=right height=20 width="40%"><FONT face=Arial,Helvetica
> size=-1>
> <SCRIPT language=JavaScript>
> date = new Date();
> hour = new String;
> minute = new String;
> moniker = new String;
> month = new String;
> day = new String;
> year = new String;
>
> if (date.getHours() >= 11) {
> hour = (date.getHours() - 12);
> if ((date.getHours() - 12) == 0)
> hour = 12;
> moniker = " PM";
> }
>
> if (date.getHours() < 12) {
> hour = (date.getHours() );
> if (date.getHours() == 0)
> hour = 12;
>
> moniker = " AM";
> }
>
> if ((date.getMinutes() ) < 10 )
> minute = "0" + (date.getMinutes() );
>
> if ((date.getMinutes() ) > 10 )
> minute = (date.getMinutes() );
>
> function y2k(number) { return (number
> < 1000) ? number + 1900 : number; }
>
> month = date.getMonth()
> day = date.getDate()
> year = y2k(date.getYear())
>
> if (month == "0")
> month = "January";
> else
> if (month == "1")
> month = "February";
> else
> if (month == "2")
> month = "March";
> else
> if (month == "3")
> month = "April";
> else
> if (month == "4")
> month = "May";
> else
> if (month == "5")
> month = "June";
> else
> if (month == "6")
> month = "July";
> else
> if (month == "7")
> month = "August";
> else
> if (month == "8")
> month = "September";
> else
> if (month == "9")
> month = "October";
> else
> if (month == "10")
> month = "November";
> else
> if (month == "11")
> month = "December";
>
> document.write ( month + " " + day + ", " + year + " | " + hour
+ ":" +
> minute + moniker );
>
> </SCRIPT>
> </FONT></TD></TR></TBODY></TABLE></TD>
> <TD bgColor=#99ccff height=20 width=27> </TD>
> </TR>
> <TR>
> <TD width=15>
> <div align="right"><IMG alt="" border=0 height=8
> src="../images/shade_middle.gif" width=15></div>
> </TD>
> <TD colSpan=2><IMG alt="" border=0 height=8
> src="../images/shade_middle.gif" width=575></TD>
> <TD width=27><IMG alt="" border=0 height=8
> src="../images/shade_middle.gif" width=33></TD>
> </TR>
> <TR>
> <TD bgColor=white colSpan=4 vAlign=top><IMG alt="" border=0 height=12
> src="files/spacer.gif" width=2></TD></TR></TBODY></TABLE><!--
#EndLibraryItem --><!-- End Header Block Table -->
> <!-- Start Body Block Table -->
>
>
>
> <TABLE>
> <TBODY>
> <TR align=left vAlign=top>
> <TD align=right height="78" width="11"></TD>
> <TD height="78" width="490">
> <p><font face="Geneva, Arial, Helvetica"><font color="#FFFFFF"
size="2" face="Verdana, Arial, Helvetica, sans-serif"><font
color="#000000">Thankyou
> for selecting cards from TFxpress, the best deals on phone
> cards
> available on line. </font></font></font></p>
> <p><font face="Geneva, Arial, Helvetica"><font color="#FFFFFF"
size="2" face="Verdana, Arial, Helvetica, sans-serif"><font
color="#000000">Your
> selection is shown below. Please check your selection below
> and
> proceed with checkout. If you have any questions please feel
> free
> to contact us.<br>
> </font></font></font></p>
>
> <br>
> <IMG alt=Selection border=0
> height=22 src="../images/select.gif"
> width=463></p>
> </TD>
> </TR>
> </TBODY>
> </TABLE>
>
> <%Call Refresh()
> 'to reidirect to first paege in cse session expired%>
> <%
> If Session("IdUpatThUpdTE") <> "" Then
> 'Response.Write FindCardId(Session("IdUpatThUpdTE")) & " Babier"
> '''''Call PutPinHoldOrSold(FindCardId(Session("IdUpatThUpdTE")) ,
> "Hold")
> Session("IdUpatThUpdTE") = ""
> End If
> Dim Count
> Count = 1
> Set objRecYourBasket = Server.CreateObject ("ADODB.Recordset")
> strSQLFindUserType = "Select* From BasketContent Where BasketId=" &
> Session("BaskitId") '& " And CountryID_From='" & CountryFrom & "' Order By
> RatePerMinute "
> 'Response.Write strSQLFindUserType
> objRecYourBasket.Open strSQLFindUserType , strConn , adOpenForwardOnly,
> _
> adLockReadOnly, adCmdText
> If Not objRecYourBasket.EOF Then%>
> <table border="0">
> <tr>
> <td><font color="#FF0000">
> <%'''If Request.QueryString("Taken") <> "" Then
> ''' Response.Write "This Card " & Request.QueryString("Taken")
> & " $ Is Taken A Second Ago"
> '''End If
> %></Font>
> </td>
> </tr>
> <tr>
> <td>
>
> </td>
> </tr>
> </table>
> <table border="0" cellspacing="1" bordercolor="#C0C0C0">
> <tr>
> <td align="center" nowrap bgcolor="#99ccff" >
> <p align="center"><font color="#FFFFFF"><b> No </b></font></td>
> <td align="center" nowrap bgcolor="#99ccff" ><font
color="#FFFFFF"><b> Company </b></font></td>
> <td align="center" nowrap bgcolor="#99ccff" ><font color="#FFFFFF"><b>
Minutes </b></font></td>
> <td align="center" nowrap bgcolor="#99ccff" ><font
color="#FFFFFF"><b> Card Amount $ </b></font></td>
> <td align="center" nowrap bgcolor="#99ccff" ><font
color="#FFFFFF"><b> Quantity </b></font></td>
> <td align="center" nowrap bgcolor="#99ccff" ><font
color="#FFFFFF"><b>Update</b></font></td>
> <td align="center" nowrap bgcolor="#99ccff" ><font
color="#FFFFFF"><b> Remove </b></font></td>
> </tr>
> <%While not objRecYourBasket.EOF
> IF (PreviousAmount <> objRecYourBasket("CardvalueId") or
> PreviousCompany <> objRecYourBasket("CompanyID")) Then
> %>
> <form action="Bascket.asp" method="post" id="<%="Id" & Count%>"
name="<%="FormNumber" & Count%>">
> <tr>
> <td align="center" nowrap bgcolor="#C0C0C0" >
> <p align="center"><font color="#000000"><b><%=Count%></b></font></td>
> <td align="center" nowrap bgcolor="#C0C0C0"><font
color="#000000"> <%=FindCompanyName(objRecYourBasket("CompanyID"))%> 
;</b></font></td>
> <td align="center" nowrap bgcolor="#C0C0C0"><font
color="#000000"> <%=TotalMinute(objRecYourBasket("BasketContentId"),
BasketId)%> </b></font></td>
> <td align="center" nowrap bgcolor="#C0C0C0"><font color="#000000">
> <INPUT id=Text34 type=Text value="<%=objRecYourBasket("CardvalueId")%>"
name="CardValue" READONLY size=3>
>
> </b></font></td>
> </b></font>
> <td align="center" nowrap bgcolor="#C0C0C0"><font color="#000000">
> <select size="1" name="Quantity">
> <Option
Selected><%=FindNoOfCardsInBasketForCompany(objRecYourBasket("CompanyID"),
objRecYourBasket("CardvalueId"), Session("BaskitId"))%>
> <% Call
QuantityList(FindNoOfCardsAvailabeCountriesTotal(objRecYourBasket("CardvalueId
"), Session("BaskitId"), objRecYourBasket("CompanyID")))%>
> </select>
> </b></font></td>
> </b></font>
>
>
>
> <INPUT id=button1 type=Hidden
value="<%=objRecYourBasket("BasketContentId")%>" name=BasketContentIdUpate>
> <INPUT id=button1 type=Hidden
value="<%=objRecYourBasket("CompanyID")%>" name=CompanyID>
> <INPUT id=button1 type=Hidden
value="<%=objRecYourBasket("Id_Of_Card")%>" name=CartId>
> <td align="center" nowrap bgcolor="#C0C0C0"><font color="#000000">
> <INPUT id=button1 type=submit value="Upate" name=button1>
> </b></font></td> </form>
> <td align="center" nowrap bgcolor="#99ccff" ><font
color="#FFFFFF"><b> <a
href="Bascket.Asp?BaskitIdDelete=<%=Session("BaskitId") & "&Companyd=" &
objRecYourBasket("CompanyID")& "&CardvalueId=" &
objRecYourBasket("CardvalueId")%>">Remove</a> </b></font></td>
> </tr>
> <%
> end if
> PreviousAmount = objRecYourBasket("CardvalueId")
> PreviousCompany = objRecYourBasket("CompanyID")
> objRecYourBasket.MoveNext
> Count = Count + 1
> 'Session("BasketContentId") = objRecYourBasket("BasketContentId")
> Wend%>
> <tr>
> <td align="center" nowrap ><font
color="#FFFFFF"><b> </b></font></td>
> </tr>
> <tr>
> <td align="Left" nowrap colspan=5 ><a
href="Bascket.Asp?EmptyBasketId=<%=Session("BaskitId")%>">Empty
Basket</a></td><td align="center" nowrap><font color="#000000"><b>Total
=<%=Total(Session("BaskitId"))%> $</b></font></td>
> </tr>
> </table>
> <table border="0">
> <tr>
> <td colspan="3">
> <hr>
> </td>
> </tr>
> <tr>
> <Td nowrap><a href="../Default.asp">
> Back To Shopping</a>
> </td>
> <Td nowrap>
> <a href="../CheckOut/CheckOutFirst.asp">Check
> Out</a>
> </td>
> <Td>
> </td>
> </tr>
> </table>
> <%
> objRecYourBasket.Close
> Set objRecYourBasket = Nothing
> Else
> Response.Redirect "../Default.Asp"
> End If
> %>
>
> ---
> You are currently subscribed to activeserverpages as:
[EMAIL PROTECTED]
> To unsubscribe send a blank email to
%%email.unsub%%
>
---
You are currently subscribed to activeserverpages as: [email protected]
To unsubscribe send a blank email to [EMAIL PROTECTED]