Gossamer Forum
Home : Products : DBMan : Installation :

Submit without confirmation

Quote Reply
Submit without confirmation
We are putting together a proposal for a commercial site in which a viewer can select a set of parameters involving home additions and then obtain a cost estimate. We would like to be able to store each configuration on the server as a separate record, accessable only to the original customer. All that is pretty straight forward, however we do not want to have a reply. Is is possible to add a record without receiving a reply, ie, without having the originating page change?
TIA
Bob
Quote Reply
Re: Submit without confirmation In reply to
Unfortunately I have that feeling too Frown

Many many thanks for your help

bob
Quote Reply
Re: Submit without confirmation In reply to
First off, I'm not sure that it's such a good idea as:

1. You will end up with people hitting submit several times as they are not sure if it went through.

2. If there was an error adding, no one will know.

However, you could probably do this by creating a frame page, one frame really small. Then on the <FORM> tag just add TARGET="tiny_frame" or whatever you've called it.

Hope this helps,

Alex
Quote Reply
Re: Submit without confirmation In reply to
You would like it just to go back to the add form? If so, you can do it one of two ways. Either go to db.cgi, sub add_record and change the line (almost at the end of the subroutine)

&html_add_success;

to

&html_add_form;

The other way to do it would be to change the html_add_success subroutine in html.pl. Delete the whole subroutine, leaving only the name and the final } . In its place, put

&html_add_form;

Either one of these will take a user directly to the add form after an addition.


------------------
JPD





Quote Reply
Re: Submit without confirmation In reply to
Perhaps I am a little dense. If I understand correctly what you suggest will redisplay the input form, right? What I need is to not move off the page. I'm not sure this can be done even. My thought was to do the post via javascript. Since this "page" will be contained in a frame, I suppose it would be possible to redirect the output from dbman to a dummny frame (1 px high) at the bottom so there is no _apparent_ reload. What do you think?
Quote Reply
Re: Submit without confirmation In reply to
I'm really unclear on what you want to do, then. What do you want to be displayed after a record is added?

As for frames, someone else will have to answer that. I don't "do" frames. Smile

------------------
JPD





Quote Reply
Re: Submit without confirmation In reply to
The whole problem is that I don't want _anything_ displayed, in a sense. The page should remain just as it is, no refresh, nothing. Something like a "hidden" post to the db, though of course the reader will be told up front what is happening. The client-side script (javascript) is enormous - about 75K or so, and it creates/modifies the page dynamically. As I said, I'm not even sure if this can be done, at least in the same window and/or frame. It's easy enough to open a new window with a submit button and then return a page that will automatically close the window once the db is updated, or in a similar fashion simply redirect the return from dbman to another (almost invisible) frame. I am just wondering if I can update the db _without_ refreshing/reloading the page containing the submit button.

Bob
Quote Reply
Re: Submit without confirmation In reply to
I don't think you can do what you want without frames or something that I'm not familiar with. I hope someone else will be able to better answer your question.

------------------
JPD