I'm running Windows 2000 SP4 with the latest IIS and all its patches. I'm working on designing a shopping cart using ASP. The problem I'm running into is that I get random errors when I hit the reload/refresh button. Is this a common issue? The problem seems to stem from my use of the ODBC connection. I'm using a set of commands like this:
'Create command object and recordset
Set cm = Server.CreateObject("ADODB.Command")
Set rs = Server.CreateObject("ADODB.Recordset")
' Specify the system DSN path
cm.ActiveConnection = "SpiritPOS"
cm.CommandText= "SELECT * FROM table_master"
Set rs = cm.Execute
'Clean up
Set rs = Nothing
Does anyone see any apparent problems with this? I seem to get some errors stating there is a problem with ActiveConnection sometimes, too. Do I need to set this object to Nothing as well?
when the senssion ends a message box pops up and alerts the customer that it has ended, but I would only know how to do it after they reload the page or soemthing to check if the session ended. Anyone know how to make a msgbox pop up as soon as the session ends? Also in IIS, is there a place where you can set the sesssion length?
I'm afraid I have a technical problem here. Basically what happens is that I'm getting some random errors(like Type mismatch... etc) that shouldn't under normal circumstances occur. Then I connect to my server via remote desktop and Recycle the application pool on which my asp pages run. Errors then disappear
I know there are plenty of threads relating to 'random' records, but non of the code samples seem to return random results each time I refresh the page; or don't show any results at all? The ID numbers for my recordset are not necessarily consecutive numbers (some items may have been deleted). I simply want to feature 2 or 3 random news teasers on my home page WHERE feature="yes". I guess I need to call 3 random id's, and keep looking until a record is returned? I would also like to change the number of 'teasers' displayed via another database table - I can do this later, but the code has to accommodate a flexible way to change how many records are returned.
Here's the Access table:
news (TBL): id title shortdescr longdescr feature
If you have a possible answer for me could you please provide sample code and spell it out clearly.
I have a page with 2 frames. The first one has a link that loads a page in the second frame. This page has a button on it. When the button is hit, the page does some processing and loads another page in the same frame (the second).
I use ASP and response.redirect or javascript in the onclick event of the button to do the redirection. When I refresh the page by clicking the button on the browser (IE), the second frame becomes empty. Please note that the src attribute of the frame is not set.
If I set the src attribute of the second frame to some asp page and then navigate to another page inside the same frame, when I refresh the page, the initial asp page is loaded in the frame regardless of the asp page currently loaded into the frame.
It seems that when you refresh the page, the frames are reinitialized no matter what pages are currently loaded in the frames.
I solved the problem by redirecting to the main page in the top frame, passing some parameters and resetting the src of the frame to the desired asp page. Thus, when the page is refreshed, all the frames are properly refreshed too.
I have an ASP site that uses frames two frames. (yes I should be using include files, but we started ou using frames so we have been stuck with frames.)
When I get a page expired warning (I am not caching pages) and a user clicks refresh from the menu bar the user is taken back to the home page! The home page is a frame with a top frame that is repeated on each subsequent asp pages
The lower half of the home page is a login screen.
After login the next page is shown in the lower half of the frame. Refreshing within the individual frames is ok.
But when the Refresh from the menu bar is used the home page is returned any ideas why?
However, what I want to do is include a request.querystring("ID"), so that IF an ID is defined, eg ID=3, , it will display the relevant (not random) information. I've tried this every way I can think and get type mismatches, etc etc. It's probably really simple but I can't see it.
We have the need to have a random token (a 16 char alphanumeric field) to be used as the key for one of our SQL tables. I have created a random token generator, however after only 3 months in production, it appears that we had an instance where a token that already existed in the tables was created. There are 3810 records currently in the database so it isn't like there are billions of records there.
I contacted an old college buddy of mine who is a mathematician, and he claims, assuming that random really does mean random, that the chances of getting a duplicate token are 1 in 79.5 septillion (79,500,000,000,000,000,000,000,000).
So my conclusion is that this was either a complete freak of nature occurance, or my random generator isn't really all that random. Here is the code behind how I am generating this: Code:
I have a page and on submit it creates hidden fields that are populated with required data, but at the same time it creates another form below it and that form is to call some data from the hidden values.
I am wondering if there is a way to have the second form "resubmit" once it is created?
I am looking for some sample code. I have an ASP page that uses frames. I will call them Frame 1, Frame 2, Frame 3. Frame 2 has a three dropdown lists, I want to utilize Frame 3 based on what was selected in Frame 2. I kind of understand about the client/server thing, I think all I need to do is re-load the page somehow. Maybe onchange event with the passing of a variable or two.
I have a data entry page which allows a user to insert or edit values in a SQL-Server 2000 database. A section of the page also displays any existing values already in the database, and allows the user to delete them. Exisitng values and the cooresponding delete button are generated on the page dynamically, with one form created for each value to delete. JScript is used to submit the appropriate form.
On my test machine with NT4.0, PWS, and IE6.0, the delete function works fine, and the page is re-loaded with the deleted value removed. However, on the production environment, which is NT4.0, IIS4.0, and IE6.0, when the user deletes a value, the form seems to be re-loaded from the cache, and the 'deleted' value is still displayed. Refreshing the page manually, however, eliinates the deleted value.
So - the delete function is woking, but the page does not seemd to be refreshed in the production environment. Does this all make sense so far? Code:
I'm running a company intranet and the portion in question is the company message board. Its becoming a very integral part of company discussion on most of our projects. What I would like to be able to do is have it so that a user can leave the message board opened and minimized and have it alert him in some way when something new has been posted. Unfortunately i dont want to just keep auto-refreshing the page at certain intervals because i'm concerned about xp users (if it refreshes it'll start flashing at them even if there is no new data, this could get annoying).
Is there a way to alert the page when posts occur or have the page check the SQL database every so often without fully refreshing the page unless there is a change to the database? I'm currently working in vbscript with some javascript thrown in on some pages so an answer in either of these languages would work for me.
on my site, things update alot, and someone might not know something's changed if they come back in an hour...because of the cache. is there a object or something that can clear the cache? a good object would be:Code:
I have a database with clients. I have 3 types of clients.My table has the 3 categories of tables and in another table i have the properties of all the 3 different clients.I have a form now. The first field prompts the user to select the type of client he is. Depending on the category he inputs i want my form to reload and bring the exact properties to fill.how can i reload the form and bring the required fields each time the user selects a category.
We are viewing the same page on my server in New York. I submit or send something in to an ASP, and it returns to me an updated page. How do I get it to reload showing changes for you in Florida who is just sitting watching the page not touching anything?
I have a frames page setup. When I send in info, I have this code to show changes for me by an automatic reload. it works for me:
The page has Top frame (input) and bottom frame (result). The input html page send input to asp to generate result to bottom frame. The page works. But i wish to refresh bottom frame once i click the submit button to see the result by the java function
<script language =javascript> function button1_onclick() { window.parent.mainFrame.location.reload(); } </script>
But the bottom frame does not reload. is my logic wrong? is it conflicted with form action or method?
On my web page the user first views a list of items, then he goes to the next page and makes changes. Then he is sent back to the first page. But the page dose not show the changes unless the user reloads the page. Is there any way to force the page to be reloaded up on return? Either from the page that sends the user back or from the list page its self? Here is a sample of the code that sends the user back to the list page:
<center> <form> <input type="button" value=" Go back to listings " OnClick="javascript: history.go(-1)"> <p> </form> </center>
I've got a little shopping cart app which when you use all of the links on the pages, and buttons etc, things are good, the "shopping basket" on the left navigation updates and shows a sum of items and cost.
However, if you arrive at the home page for example, proceed to the products page, add an item and then click "back", you get a cached page.
I appreciate there are some lines of code I can use, both ASP and html to prevent the cachine, but what I dont want to incur instead is that error IE (and other browsers too I guess - how very Microsoft of me - shows when the page has expired, I think that would probably be worse than the cart not showing any items (or not showing the update) until a link was pressed.
Im building a site which has a login field on top of every page. When the user logs in it is currently set up to go to the default.asp page
My issue is this: since the login is on every page I only want the page to reload when the user logs in. (it must reload to remove the login fields and replace them with the user account menu). I want the user to stay where they are when they login and not be sent to the default page
I am trying to generate a random number. I am using randomize and then rnd to return a decimal number between 100 and 120. This will give me a longitude. I am doing something similar to generate a latitude.
I created this on a page which refreshs every minute. I put these points into a map and they are showing up in groups of straight lines. Since rnd is time based will refreshing every 60 seconds return similar numbers?
is it possible to reload just one table row with out reloading the entire page? Or reloading just a table? i'm not thinking it's possible but if it is it's worth asking a qustion.
I cant get around this. Im working on a job interview scheduling system, and i wanna set my recordset to all the interviews scheduled from "tomorrow" and on.... so far I've got this query. Code:
"SELECT * FROM EVENTS WHERE SDATE > "&DateAdd("d", 1, Date)& " ORDER BY SDATE DESC"
this half works, since i dont get the dates from "today" but i do get results from "yesterday" or the day "yesterday" any suggestions?
i'm loading a new window from another page. but when i do for some reason the page it was loaded from kindof reloads, and all you see at the top of the page is
[Object] and the title has changed to a bit of this code i used to create the new window. also when i view source for the page that i loaded the new window from all it says is [object]. what am i doing wrong? here is the code i'm using to open the new window. [CODE<a href="javascript:window.open ('details.asp?detail=<%=rsURL(0)%>', 'newwindow2', config='height=300, width=300, toolbar=yes, menubar=yes, scrollbars=no, resizable=no, location=yes, directories=yes, status=yes')"><img src="images/detail.gif" width="15" height="15" border="0" alt=""></a>[/CODE]
I took some code reference form a site using reload form after getting data based on drop-down box value. I changed all parameters as per my db, page is loading properly but after select item from drop down box, it does not reload and output query data. Code:
I have an problem with Firefox. I'm using an username and password session in asp. And IE uses the sessions after i reload/refresh a page. But in Firefox i have to login again. It doesn't save the sessions for later use.
Does anybody know the sollution? Because I've searched everywhere.
I am getting the following error when I try to reload a pop-up page
res://C:WINDOWSsystem32shdoclc.dll/http_500.htm#
in the URL path. This page calls for a javascript from which values are loaded and binded to a dropdown on the page. The code works fine in development environment but it is not working in the production environment. What I want to know is should there be some sort of a command that I should run for the first time for the scripts to load.
There are other similar pop-ups that work fine.Could someone tell me where to look at in solving this error.