Ensure page is reused

Results 1 to 2 of 2

Thread: Ensure page is reused

  1. #1
    Join Date
    Dec 1969

    Default Ensure page is reused

    I have a page that creates some rather intensive javascript (about 600 options), i have posted the code below. What i want to know is once a person has used this page is there a way to ensure that it is reused each time they view that page and not called again, assuming of course they havent cleared their cache ?<BR><BR>Secondly, is there any way to speed up the process i have or have a progress bar ? I have some scripts for a progress bar but was interested if anyone had any pointers<BR><BR>thanks alot<BR><BR>**********code*********<BR><BR> dim rs,cat,url,count,x,y,subcat,subcatagorys,subcatago ryof,subcatagoryid &#039; variables used in Javascript %&#062;<BR> &#060;%<BR>sqlstring = "SELECT * FROM resorts ORDER BY RESORT_NAME"<BR>set rs = db.execute(sqlstring)<BR>x=0<BR>%&#062;<BR> &#060;SCRIPT language=JavaScript&#062;<BR> function subcat()<BR> {<BR> cat = document.subad.catagory[document.subad.catagory.selectedIndex].value;<BR> url = "submitad.asp?cat=";<BR> url = url + cat;<BR> window.location.href = url;<BR> }<BR><BR> function sublist(inform, selecteditem)<BR> {<BR> inform.subcatagory.length = 0<BR>&#060;% <BR>count=0<BR>y=0<BR>do while not rs.eof <BR>%&#062;<BR>x = &#060;%= trim(y) %&#062;<BR>subcat = new Array();<BR>subcatagorys = "&#060;%= trim(rs("RESORT_NAME"))%&#062;"<BR>subcatagoryof = "&#060;%= trim(rs("COUNTRY_ID"))%&#062;"<BR>subcatagoryid = "&#060;%= trim(rs("RESORT_ID"))%&#062;"<BR>subcat[x,0] = subcatagorys;<BR>subcat[x,1] = subcatagoryof;<BR>subcat[x,2] = subcatagoryid;<BR><BR>if (subcat[x,1] == selecteditem){ <BR> var option&#060;%= trim(count) %&#062; = new Option(subcat[x,0], subcat[x,2])<BR> inform.subcatagory.options[inform.subcatagory.length]=option&#060;%= trim(count)%&#062;<BR> } <BR>&#060;%<BR>count = count + 1<BR>y = y + 1<BR>rs.movenext<BR>loop<BR>%&#062;<BR> }<BR>&#060;/script&#062;<BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: Ensure page is reused

    Not much of a javascript person but javascript is client side execution so the code would execute each time the page is called. Why not re-code it an asp and then the user will have cached the page unless, as you say, they clear their cache.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts