Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed -
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

"post" without form

 Post Reply Post Reply
Author
pedalcars View Drop Down
Senior Member
Senior Member


Joined: 12 August 2002
Location: United Kingdom
Status: Offline
Points: 268
Post Options Post Options   Thanks (0) Thanks(0)   Quote pedalcars Quote  Post ReplyReply Direct Link To This Post Topic: "post" without form
    Posted: 05 August 2003 at 2:51am
I'm working on a project currently where I have a page in which you select data using a form with a "submit" button, which uses the "post" method to send said data to an action page which adds it to the DB. All fairly normal so far.

The action file displays nothing to the user and once the data has been added it response.redirects back to the data entry page.

I want the first page to know (be able to find) the DB record just created (eg, by the record ID), but for preference I don't want to put this in the URL. I also don't want to use cookies as it needs to work if users have cookies turned off. I can use the session ID but for preference I'd rather not, at least not as the only method, as I don't want the info to be lost if a session times out / gets terminated.

This is pointing me back to the action file "post"ing the ID back when it redirects, but as it doesn't write HTML, I can't create a form (can I?).

So, is it possible to post the data back given the above constraints?

Ta
www.pedalcars.info

The most fun on four wheels

Back to Top
Gary View Drop Down
Senior Member
Senior Member
Avatar

Joined: 20 March 2002
Location: United Kingdom
Status: Offline
Points: 326
Post Options Post Options   Thanks (0) Thanks(0)   Quote Gary Quote  Post ReplyReply Direct Link To This Post Posted: 05 August 2003 at 6:34am

On the action page, once the db record has been written, you could then use javascript to set the value of a hidden <input> followed by submitting the form back to the original page.

You may need to have an additional page after the action page - something along the lines of.......

Form page -> Action page -> Additional page with form -> back to form page.

Back to Top
pedalcars View Drop Down
Senior Member
Senior Member


Joined: 12 August 2002
Location: United Kingdom
Status: Offline
Points: 268
Post Options Post Options   Thanks (0) Thanks(0)   Quote pedalcars Quote  Post ReplyReply Direct Link To This Post Posted: 05 August 2003 at 6:45am
Thanks for the tip - but is there a way of doing it not using javascript as well? Not that I'm trying to be an awkward so and so...

I'm trying to make the system as resilient as possible regardless of what the user has turned off, be that cookies, javascript, etc.

It may be I have to use cookies if enabled and session ID failing that; if so, fair enough.
www.pedalcars.info

The most fun on four wheels

Back to Top
Mart View Drop Down
Senior Member
Senior Member
Avatar

Joined: 30 November 2002
Status: Offline
Points: 2304
Post Options Post Options   Thanks (0) Thanks(0)   Quote Mart Quote  Post ReplyReply Direct Link To This Post Posted: 05 August 2003 at 10:34am
You have to use javascript or even more incompatible vbscript(client - side) to submit forms...
Back to Top
Gary View Drop Down
Senior Member
Senior Member
Avatar

Joined: 20 March 2002
Location: United Kingdom
Status: Offline
Points: 326
Post Options Post Options   Thanks (0) Thanks(0)   Quote Gary Quote  Post ReplyReply Direct Link To This Post Posted: 05 August 2003 at 10:41am

Mart, sorry, but that's not 100% true

What you could do is display a submit button on the third page (in my suggested solution) which when clicked will take the user back to the main form.

But there again, that's just plain stupid and me being a bit picky. lol.
However, I reckon it would work and means that Javascript is not required after all.

 

Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.