NetTalk Central
NetTalk Web Server => Web Server - Ask For Help => Topic started by: kashiash on May 24, 2010, 09:02:12 AM
-
i need to know parent name in form page
i try check vaulues on init form routine:
p_web.GetSessionValue('_ParentProc')
p_web.formsettings.parentpage
p_web.GetValue('_ParentProc')
and every of above retur empty string - why ?
-
Try
p_web.GetValue('_ParentProc') early on in your code like pre-update, insert or start of procedure etc and if you get a value prime a session variable with the value
-
The parent of a page is usually set for you and stored in loc:parent
so You can just use loc:parent in your code in _most_ embed points.
cheers
Bruce
-
Bruce
as i see in source loc:parent is declared for browse procedure
for form this variable is not declared
To Kevin:
i copy code into pre insert and pre update embeds, but also get empty string ;(
-
The other option is just create your own Session Variable. I have one called 'ReturnURL' which I use for all sorts of things.
-
Yes its a option but ...
system know where should return after ok or cancel .. somewhere this information is stored and i want to get this value and use it. the extra variables and extra code make program more complicated nad less flexible
-
Hi Jacek,
So, if I understand you right, what you really want to know is the URL that the Save / Cancel button will go to?
When (in what embeds) are you needing to use this item?
the URL for the save button is in loc:formaction, the URL for the cancel button is in loc:formactioncancel.
The "parent page" is typically used for a control embedded on a page - so it's not "where it came from" but rather the name of the container it's currently on.
Cheers
Bruce
-
Unfortunatelly you not understand me (its my bad english ;()
i open the same form from few other browses or forms
and in almost all cases i want to back to caller but in two cases i want to go to other then parent page.
here i can 2 ways:
1. in each procedure i set returnurl as sugested Kevin , but i have to modify each parent procedure
2 in called page i check who me call and if its specific parent then i change return page to new page (instead parent) - but here i need to know who is my parent
the second solution looks better for me but i cannot determine parent
here is my problem
any ideas?
-
if i understand
IF p_web.getPageName(p_web.RequestReferer) = 'someform'
! do magic stuff when you come this webpage
END
place near the the end of init.
-
BINGO ;)
thanks a lot