NetTalk Central

Author Topic: Server side click code not getting touched...  (Read 3142 times)

rayrip

  • Newbie
  • *
  • Posts: 34
    • View Profile
    • Email
Server side click code not getting touched...
« on: July 23, 2008, 12:42:19 PM »
I looked at the sample with all the buttons (# 28) and it seems to allow the server side code on a browse with an 'other' button to work. However the docs say to not have a URL. Unfortunately the button I am clicking on is to go to a form (in the conditional display area) and I need to pass it some variables (not a form in the same file... a new record in a different file).

Anyway if I could just save the value for the row that I am clicking the button on things would be great. I am not calling a url directly but in the conditional area. I have 2 possibilities of buttons on the browse (in the same column). One will call my reservation form and one will call my waiting list form. This almost works, except I can't save the value field that has my id number in it for the row selected.

It seems to me that the server side click code should get called no matter what, and before anything else IMHO.

If that's not going to happen I need to find another place to capture the value field for the row when the button is clicked. I can capture that data if I click on another row first... but the first row data is not there because if it is already selected, clicking again does not call the ' clicked on the browse' embed.

Even if there were some sort of embed just before the URL (in my case the conditional display URL) is called I could probably get my Value (for me it's the item number). However I still think the server side code (under fields, Client-Side, Send button click to server) should be called no matter what

Thanks,

Ray
VMT

Mike Grigsby

  • Sr. Member
  • ****
  • Posts: 380
    • Yahoo Instant Messenger - onthedotsoftware
    • View Profile
    • MyHomeAssets! Software (among others)
Re: Server side click code not getting touched...
« Reply #1 on: July 23, 2008, 03:58:40 PM »
That's odd, I downloaded the new release last night (like to give them time to breathe), and was going to make the same comment. I've got a browse that doesn't do a dang thing when I click on the row. Nothing in the embed "User did something in the browser | User Clicked on a row in the browse" does anything, but it does on another list that was working. Hence, I can't figure out how to capture the info with which to filter a child browse.
Mike Grigsby
Credify Systems
Central Oregon, USA

rayrip

  • Newbie
  • *
  • Posts: 34
    • View Profile
    • Email
Re: Server side click code not getting touched...
« Reply #2 on: July 23, 2008, 04:55:55 PM »
I actually got code working by just clicking on different records (not my buttons)... the problem with that is the first record or actually the record that happens to be highlighted when the browse is first displayed doesn't cause the code to execute... I had to click on 'another' record in the browse. But that still didn't do anything for me as I want my little buttons to work.

For now I'm calling my reservation form from a button from the view form... which lets me capture my id number and put it in the reservation form.

However, it's not saving the reservation form so now I'm trying to figure out how to force the form to insert or to be in insert mode.

I thought p_web.SetSessionValue('reserveform_CurrentAction',InsertRecord)

would have done it because the set action routine is like this:

SetAction  routine
  If loc:ViewOnly = 0
    Case p_web.GetSessionValue('reserveform_CurrentAction')
    of InsertRecord
      loc:action = p_web.site.InsertPromptText
      loc:act = InsertRecord
    of Net:CopyRecord

so it should have make the action correct.. I'll have to put a stop in there and see if it's getting hit.

Ray
VMT

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11179
    • View Profile
Re: Server side click code not getting touched...
« Reply #3 on: July 24, 2008, 04:27:29 AM »
see
http://www.capesoft.com/docs/NetTalk/NetTalkWebFAQ.htm
Question W4
(regarding URLs calling a Form)

Cheers
Bruce

rayrip

  • Newbie
  • *
  • Posts: 34
    • View Profile
    • Email
Re: Server side click code not getting touched...
« Reply #4 on: July 24, 2008, 12:46:39 PM »
Got it... actually I used both W4 and W26

Because I'm calling the reservation form from an inventory browse table... I put in the following URL:

'reserveform?keepid='&clip(inv:item_no)&'&<!-- Net:s:SID-->&Insert_btn=Insert&'

This tells my reservation form to be in insert mode and passes the Item_no in the html.

I keep forgetting I'm creating HTML and must pass data through it. I'll get it figured out eventually. This would be a nice template field... to be able to click on insert, change, or delete and also select data to pass... just an idea...

Thanks,

Ray