Wrox Home  
Search P2P Archive for: Go

  Return to Index  

javascript thread: "Refresh" problem


Message #1 by "Nitin Madhbushi" <Nitin_Madhbushi@i...> on Thu, 21 Feb 2002 20:48:02 +0530
--------------070805060204090407090008
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

You may need to use

window.location.replace ("mypage.jsp") for NN 4.7 or below.  This will 
replace the previous page in history, which is fine, since you are 
replacing the same page.  Not sure if .navigate is available in NN4.7.

Nitin_Madhbushi@i... wrote:

>Thanks, I will try it out and get back to you.
>
>Nitin.
>
>-----Original Message-----
>From: Anthony.Vitiello@A... [mailto:Anthony.Vitiello@A...]
>Sent: Thursday, February 21, 2002 9:17 PM
>To: javascript
>Subject: [javascript] RE: "Refresh" problem
>
>
>I don't see the need for a temporary page.
>Assuming you have page "mypage.jsp".  User clicks the 'add' button. 
> data is inserted, mypage.jsp is reloaded.  On reload of mypage.jsp, 
>insert the code window.navigate ("mypage.jsp").  This will navigate to 
>mypage.asp and will not re-insert data on refresh.
>
>jboloian@u... wrote:
>
>>Can you redirect to a temporary page when the user submits, then redirect
>>
>>from that page to your original data page?
>
>>-----Original Message-----
>>From: Nitin Madhbushi [mailto:Nitin_Madhbushi@i...]
>>Sent: Thursday, February 21, 2002 10:18 AM
>>To: javascript
>>Subject: [javascript] "Refresh" problem
>>
>>
>>Hi All,
>>
>>We are using JSP's and servlets for our Application.
>>
>>In our application we have add, modify and delete functionality.
>>once the text boxes are filled with values and add button is pressed, data
>>is inserted in to DB.
>>the page is reloaded with the newly entered record in the table display and
>>empty the text boxes.
>>My problem is
>>If i refresh the page using Browser refresh button, i am getting a new
>>record inserted with the previous form value.
>>Note: The records are inserted in sequence number basis,The record which we
>>are inserting doesnot form a part of primary key so it is getting inserting
>>without throwing primary key voilation
>>
>>Whenever we press the browser refresh button after performing add
>>operation,the same data is getting inserted again and again with new
>>sequence number
>>
>>Any solution for this problem?
>>
>>TIA,
>>
>>Nitin.
>>   
>>P.S. Our application should work for all version of Netscape and IE.
>>
>>
>>
>
>
>
>
>



  Return to Index