I found this forum via a search that landed at thread216-1171273.
It was close, but no cookie. Hopefully someone here can help or save me weeks of misery. I'd prefer the first if it's an option.
Here goes...
I have a little service that takes some information stored in a database and uses a script src=... to pull in an asp page. The src=... looks something like "src='
Now, so that they don't have to include 40 parameters in this src= link, There are also some javascript variables they put in their page, like "var myHeaderText='It Is A Great Day!';" and other similar things.
Now, this asp page uses that information in the parameters to pull the data from the database, organizes it and then puts it together with the javascript variables and uses "document.write" outside of the asp code to write to the user's page.
It can take up to 15 seconds to get this information retrieved and put together, so what I'm trying to do is have this script first check and see if a text file exists on my server for this user and date range. If not, it does the work, spits out the data, then writes the info to a text page for retrieval by the next person. Basically caching the information.
My dilemma is this:
After every "document.write" I can put a "cachetext = cachetext + ..." with the same data I'm writing to the page. So at the end of the document, I have a javascript variable with all of this nice data that I want to write to a text file on my server to use the next time instead of going through the database. HOW DO I GET THAT INTO A FILE?
The reason (I think) I can't use asp to store the variable is that some of the information I write to the page is stored in javascript variables, and the asp code runs before the javascript code does, so the asp variable wouldn't be able to get the javascript variables into it.
Follow?
Assistance?
Can I use server-side javascript and does someone have a good source for it? Since this would happen when someone pulls up the user's page, I don't have a clue as to what browser is going to see this, so I can't rely on ActiveScripting.
Many thanks for even reading through this.
It was close, but no cookie. Hopefully someone here can help or save me weeks of misery. I'd prefer the first if it's an option.
Here goes...
I have a little service that takes some information stored in a database and uses a script src=... to pull in an asp page. The src=... looks something like "src='
Now, so that they don't have to include 40 parameters in this src= link, There are also some javascript variables they put in their page, like "var myHeaderText='It Is A Great Day!';" and other similar things.
Now, this asp page uses that information in the parameters to pull the data from the database, organizes it and then puts it together with the javascript variables and uses "document.write" outside of the asp code to write to the user's page.
It can take up to 15 seconds to get this information retrieved and put together, so what I'm trying to do is have this script first check and see if a text file exists on my server for this user and date range. If not, it does the work, spits out the data, then writes the info to a text page for retrieval by the next person. Basically caching the information.
My dilemma is this:
After every "document.write" I can put a "cachetext = cachetext + ..." with the same data I'm writing to the page. So at the end of the document, I have a javascript variable with all of this nice data that I want to write to a text file on my server to use the next time instead of going through the database. HOW DO I GET THAT INTO A FILE?
The reason (I think) I can't use asp to store the variable is that some of the information I write to the page is stored in javascript variables, and the asp code runs before the javascript code does, so the asp variable wouldn't be able to get the javascript variables into it.
Follow?
Assistance?
Can I use server-side javascript and does someone have a good source for it? Since this would happen when someone pulls up the user's page, I don't have a clue as to what browser is going to see this, so I can't rely on ActiveScripting.
Many thanks for even reading through this.