Solved

Save to Database before exitting the page

Posted on 2004-04-01
10
247 Views
Last Modified: 2010-04-07
Dear All,

I have this entry form that contains some links (static and dynamic), also some buttons that can take the user to other pages.

Now, I need to save the data, before exitting the page, no matter where the user is to go,

I though of resubmitting on the same page passing the NextUrl, and then after saving, to redirect to the new page.

But, this is to complex, since there are some links that does a lot before going to other pages.

so, I am thinking of a listener page, that i can submit to which will save all the data, and then the form will go to whereever it was going,

do you think that this is doable, and if you have any other suggestions, please let me know.


Thanks
0
Comment
Question by:Inteqam
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
  • 2
  • +2
10 Comments
 
LVL 35

Expert Comment

by:mrichmon
ID: 10733090
Well, first of all what language are you using?

Either one of your ideas will work.

In fact they are actually the same idea - it is just whether you use the same page as the "listener page" or a spearate page - and that is up to you.

The thing you would have to keep track of is the destination that the button/link/control/etc would be taking you to and the action that would be done in each case.


Then you can set up a switch/case statement - or even a series of if/elseif statements on the listener page.
0
 

Expert Comment

by:pborregg
ID: 10741899
Think of using Sybase Powerbuilder with EAServer, Power J or JBuilder.

Create NVOs (Non-visual objects) on Powerbuilder
Create Datawindow forms using Powerbuilder
Deploy them to EAServer
Create Stubs and Skeletons

Using PowerJ or JBuilder create JSP's Servlets and EJB's (if req'd)
Deploy to EAServer

Open in a thin client solution, Browser only, and POOF!!! The database can be anything, Oracle, MDB, ASE 12.5, INFORMIX, Etc....

I have a solution that my colleague and I developed.  We have 5 small base objects.

Its fairly complex but it works and has been developed for applications for the Department of Defense, The US Navy SPAWAR program and Texas Workforce Commission.

PB
0
 
LVL 7

Author Comment

by:Inteqam
ID: 10751318
ASP

and, sometimes, those button should do a submit to a new page, that is a form full o Hidden fields,
i can submit it to a lister page, refill all the hidden fields and resubmit to a new page,

is there a way to resubmit the request to another form?


0
Transaction Monitoring Vs. Real User Monitoring

Synthetic Transaction Monitoring Vs. Real User Monitoring: When To Use Each Approach? In this article, we will discuss two major monitoring approaches: Synthetic Transaction and Real User Monitoring.

 
LVL 35

Expert Comment

by:mrichmon
ID: 10758015
Yes what you do is that you have to first write all of the fields that were submitted to the first page as hidden variables and then submit to the new page

Or you can save the values as session variables instead of writing to hidden fields.
0
 
LVL 7

Author Comment

by:Inteqam
ID: 10758690
well, writting all the fields again is my idea that i don't want to implement
and using session fields is not an option,

anyhow, i redesigned the bage, and restricted the save to only 3 links, other than that the form doesn't save.

sad to say so, but i was in a hurry.

thanks all.
0
 
LVL 4

Expert Comment

by:kssaran
ID: 10829564
If you are still looking for solution

There is a way to handle this using the body event called onbeforeunload(but strictly to IE users only).

In that event you can make a request to one ASP Page to insert the date with the help of XML DOM Object. You can pass the data as XML Node tree to one ASP Page and insert everything. After finishing that process you can return true or false according to the successful insert or update operation then allow the users to goto any other page or display the error message

Rgds
Sara
0
 

Expert Comment

by:nishit4all
ID: 10903136
if u are thinking for a listener page then u can just pass the values as aruguments and one more argment which contains the destination (that which link was clicked)

i am sorry coz i am giving a JSP eg
In jsp a page with arguments can be called like:
document.location=
page.jsp?name=abc&id=12&loc=rediff.com

in this way those args will be available on next page and there u can write the database code, after this desired page will be displayed.

Thanks
nishit
0
 
LVL 7

Author Comment

by:Inteqam
ID: 10911274
I solved this by useing a  middle page with no GUI, a page that saves then redirects, I did that for only some of the exits of the page, the client was satisfied, anyhow, i would like to know if there is a listener page, so that i can submit to the server without refreshing the page, just to do things on server.

is that doable?
0
 
LVL 4

Accepted Solution

by:
kssaran earned 125 total points
ID: 10914584
Hi Inteqam,

As I said the only to pass data to server without refreshing page is to use XML DOM. I am sure that u will get the solution required by you through this method. If you want any sample on this you can search thru google using keyword as XML DOM Object. You will get plenty of sample

Happy Coding

Rgds
Sara
0
 
LVL 7

Author Comment

by:Inteqam
ID: 10916047
Thanks Sara,

that helped
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article provides a case study on how our local youth baseball league deployed a new website, including the platform selection, implementation and benefits to the league.
Dramatic changes are revolutionizing how we build and use technology. Every company is automating, digitizing, and modernizing operations. We need a better, more connected way to work together as teams so we can harness the insights from our system…
The purpose of this video is to demonstrate how to add AdSense Ads to a WordPress Website, and how to set up WordPress to automatically place Ads in Sidebars. This will be demonstrated using a Windows 8 PC. Log into your AdSense account. : Cli…
The purpose of this video is to demonstrate how to integrate Mailchimp with Facebook. This will be demonstrated using a Windows 8 PC. Mailchimp and Facebook will be used. Log into your Mailchimp account. : Click on your name. Go to Account Setti…

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question