CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> Archive -> GotoCode Archive

 Return to previous page from After Insert event

Print topic Send  topic

Author Message
mammer
Posted: 08/06/2002, 7:48 AM

How can I send the user back to the previous page (as if the browser's back button is clicked) from within the After Insert event? I am trying to allow the user to add a new supplier record using the EditSupplier.asp page while in the middle of inserting or updating a product record in a differnt page (EditProduct.asp). The EditProduct.asp page contains a link "Add new supplier" that points to the EditSupplier.asp page with the url parameter mode=product that is used by the After Insert event of EditSupplier.asp to determine when to send the user back to the EditProduct.asp page rather than the default FormAction defined in the EditSupplier.asp page. Using the browser's back button seems to preserve the un-submitted state of the EditProduct.asp page. I'm using ASP w/templates. Thanks!
Aaron
Posted: 08/06/2002, 11:01 AM

I am having the same problem. I am using JSP w/ Templates. I want to create a quick menu to insert items, rather than having to scroll to the bottom of the page for each insert. But after the insert on OrderRecords.jsp, it shoots me back to OrderGrid.jsp, rather then back to InsertMenu.jsp, where I entered it from.

My temporary workaround was to place a link to OrderRecords.jsp in my Header, so I could easily access it without scrolling, but obviously this is not an ideal situation.

Any help would be appreciated.

Thanks,
Nicole
Posted: 08/07/2002, 6:01 AM

Hello,
Here is the scenario that lets you to preserve search results, sort order and page number of the Grid form while editing/inserting the record:
1. preserve search results. All the Input parameters on the Grid form should be marked as 'Transfer' in order to be able to pass them to record form. Open url field properties and select 'Add Transit Params' flag as well.
Now the search parameters are passed to Record form.
To pass them back to Grid, add them all as Input parameters on Record form and mark them as 'Transfer' as well.

2. In order to pass sort order and page number crate two custom session variables in the open event of the Grid form. E.g.
ASP
Session("Formform_name_Sorting") = getparam("Formform_name_Sorting")
Session("Formform_name_Page) = getparam("Formform_name_Page")

3. To pass them from the record form back to grid you should add mentioned parameters to sParams variable that stores all the vars to be passed from the record form. Put the code like below into the Before Insert, Before Update, Before delete and Before Cancel events. E.g.
ASP
sParams = sParams & "&Formform_name_Sorting=" . Session("Formform_name_Sorting") & "&Formform_name_Page=" & Session("Formform_name_Page")

Hope it helps.

   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Web Database

Join thousands of Web developers who build Web applications with minimal coding.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.