NetTalk Central

Author Topic: FORM for INSERT only - how to call such from a normal webpage?  (Read 4537 times)

Wolfgang Orth

  • Sr. Member
  • ****
  • Posts: 251
    • View Profile
    • oData Wolfgang Orth
Hello all,

I have a form that gets called from a normal webpage using a simple URL, its not called from a NetWebBROWSE.

The only intended action is INSERT.

How / Where do I tell this form that its task is to insert?

I suppose I do it like this:

 p_web.SetSessionValue('MYFORM_CurrentAction',InsertRecord)

but if so, in what embed?

Thanks
Wolfgang
« Last Edit: July 01, 2007, 05:00:39 AM by Wolfgang Orth »

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11171
    • View Profile
Re: FORM for INSERT only - how to call such from a normal webpage?
« Reply #1 on: July 01, 2007, 07:32:01 AM »
Hi Wolfgang,

The easiest is to form the URL correctly. See FAQ #4 for how to do this.

Alternativly you can add code to the .InitForm method. The idea here would be to use p_Web.SetValue to "set" the parameters missing from the URL. It'd work, but in this case only because the form is _always_ called in Insert mode.

Cheers
Bruce

Wolfgang Orth

  • Sr. Member
  • ****
  • Posts: 251
    • View Profile
    • oData Wolfgang Orth
Re: FORM for INSERT only - how to call such from a normal webpage?
« Reply #2 on: July 01, 2007, 09:55:47 AM »
The easiest is to form the URL correctly. See FAQ #4 for how to do this.

Indeed! I have had thought of this as its the way in PHP also, but I could not recall how to do in Nettalk, all samples I found worked without any parameter in the URL - finally I thought my memory was wrong.

And because its a normal, static, handwritten page I added <!-- NetWebServer --> at the top and voila...!

Once again I bow down

Thank you for sharing your time on a Sunday.

bye
Wolfgang