71
Web Server - Ask For Help / How to call a "secondary" form after saving main update form?
« Last post by jking on October 14, 2024, 12:24:42 PM »Hello all,
I'm working on a NT 14.20 app. I call a NetWebForm procedure to do an insert and a Study_ID field is created and saved. Upon saving I want to pop up a second form that shows the newly created Study_ID and has a print button. The print button should call a report that has the new Study_ID and some instructional text. If the user does not click the print button, they can just close the second form and continue.
I have tried to adapt the Adding a Report section of the NetTalk Book, 4th edition, but have not been able to get this to work. Anyone have suggestions on how to do this?
Thank you,
Jeff King
I'm working on a NT 14.20 app. I call a NetWebForm procedure to do an insert and a Study_ID field is created and saved. Upon saving I want to pop up a second form that shows the newly created Study_ID and has a print button. The print button should call a report that has the new Study_ID and some instructional text. If the user does not click the print button, they can just close the second form and continue.
I have tried to adapt the Adding a Report section of the NetTalk Book, 4th edition, but have not been able to get this to work. Anyone have suggestions on how to do this?
Thank you,
Jeff King
72
Web Server - Ask For Help / Re: Combining TakePic Action and Record Saving in a Single Button
« Last post by rjolda on October 14, 2024, 12:01:31 PM »Hi,
Sounds like you want to combine TakePic and Save REcord together - OR TakePic and UpdateRecord Together. I guess if you trust the person taking the picture to have it correct without seeing the display it might make sense. In standard Clarion I would attempt adding a postevent:Accepted to ?OK. I am not sure if there is a trick that Bruce or someone can suggest that would do this. Also depends on the form that the picture is on. It will want to validate all fields before saving. Maybe some Javascript?
Ron
Sounds like you want to combine TakePic and Save REcord together - OR TakePic and UpdateRecord Together. I guess if you trust the person taking the picture to have it correct without seeing the display it might make sense. In standard Clarion I would attempt adding a postevent:Accepted to ?OK. I am not sure if there is a trick that Bruce or someone can suggest that would do this. Also depends on the form that the picture is on. It will want to validate all fields before saving. Maybe some Javascript?
Ron
73
Web Server - Ask For Help / Tree Control
« Last post by Niels Larsen on October 14, 2024, 05:45:40 AM »Hi
I have a tree control on a form. If a node is clicked I can capture the id from GetValue('row') - no problem.
The question is how to select (highlight) a node when initializing the tree.
Regards Niels
I have a tree control on a form. If a node is clicked I can capture the id from GetValue('row') - no problem.
The question is how to select (highlight) a node when initializing the tree.
Regards Niels
74
Web Server - Ask For Help / Combining TakePic Action and Record Saving in a Single Button
« Last post by jari@softmade.fi on October 13, 2024, 03:28:24 AM »I have a button with the action set to TakePic. How can I save a record with the same button as well? It feels unnecessary to press two buttons.
75
Web Server - Ask For Help / Re: Refresh the entire browse or just a row after an event in a Browse menu
« Last post by Niels Larsen on October 11, 2024, 10:35:39 PM »Thanks Vinnie for your input. But unfortunately not quite what I'm looking for.
76
Web Server - Ask For Help / Re: Refresh the entire browse or just a row after an event in a Browse menu
« Last post by Vinnie on October 07, 2024, 03:24:44 AM »Hi,
I tried this but unable to get it to work for me, so I just added a Button to the browse which open a Menu (popup window)
From there I add the options.
If any of the options require a refresh of the original browse I use
p_web.Script('location.reload();') from the close of the Menu.
Not sure if this is any help but does the job for me for now.
You can see the effect at https://cpslive.co.uk
It will not do the refresh as you can't login but will show the Menu Options.
I tried this but unable to get it to work for me, so I just added a Button to the browse which open a Menu (popup window)
From there I add the options.
If any of the options require a refresh of the original browse I use
p_web.Script('location.reload();') from the close of the Menu.
Not sure if this is any help but does the job for me for now.
You can see the effect at https://cpslive.co.uk
It will not do the refresh as you can't login but will show the Menu Options.
77
Web Server - Ask For Help / Re: Refresh the entire browse or just a row after an event in a Browse menu
« Last post by Niels Larsen on October 07, 2024, 02:12:25 AM »UP
78
Web Server - Ask For Help / Re: Convert text to HTML text for display
« Last post by Bruce on October 03, 2024, 07:48:20 AM »if you have a bunch of plain text, and you surround it with
<pre>
</pre>
Then I think you'll get what you;re looking for.
Cheers
Bruce
<pre>
</pre>
Then I think you'll get what you;re looking for.
Cheers
Bruce
79
Web Server - Ask For Help / Re: Settings for making web procedures not visible/accessible
« Last post by Jane on October 03, 2024, 06:59:21 AM »Argh!
Yes, sorry, Johan. Appears that I zipped it before saving from IDE.
Attached is an updated zip.
But looks as if you put the code in about the same place as I did.
Jane
Yes, sorry, Johan. Appears that I zipped it before saving from IDE.
Attached is an updated zip.
But looks as if you put the code in about the same place as I did.
Jane
80
Web Server - Ask For Help / Re: Settings for making web procedures not visible/accessible
« Last post by JohanR on October 03, 2024, 02:47:48 AM »Hi Jane
Thank you again for your help and effort,
I used the code and all working fine, hope I have it correct and will test.
The new zipped app does not have any embed code in webhandler, perhaps just zipped the wrong app, unless I'm missing something.
My code and embed point I used.
thanks again,
Johan
p_web._SendFile PROCEDURE(string p_FileName,Long p_header=NET:SendHeader)
! Start of "NetTalk Method Data Section"
! [Priority 1500]
loc:parent string(252) ! should always be a lower-case string
loc:done Long
loc:filename string(252)
! [Priority 6500]
! End of "NetTalk Method Data Section"
CODE
! Start of "NetTalk Method Executable Code Section"
! [Priority 1500]
loc:parent = self.PlainText(Lower(self.GetValue('_parentProc_')))
loc:filename = SELF.GetPageName(Lower(p_FileName))
! Start of "Before SendFiles in DLLs"
! [Priority 5000]
!#############################
block# = false
case loc:filename
of 'nwp_wineshop'
block# = true
of 'aboutus'
block# = true
of 'nwp_aboutus'
block# = true
end !case
if block# = true
p_web.trace('case triggered:' & loc:filename)
p_web.SendError (404,'The page cannot be found', 'The page you are looking for might have been removed, had its name changed, or is temporarily unavailable.')
return
end
!#############################
! End of "Before SendFiles in DLLs"
loc:done = NetWebDLL_avc_b_SendFile(p_web, loc:Filename, loc:Parent)
If loc:Done then Return.
loc:done = NetWebDLL_avcfunc_SendFile(p_web, loc:Filename, loc:Parent)
If loc:Done then Return.
! [Priority 3040]
do Remap:tvcweb
do CaseStart:tvcweb
Thank you again for your help and effort,
I used the code and all working fine, hope I have it correct and will test.
The new zipped app does not have any embed code in webhandler, perhaps just zipped the wrong app, unless I'm missing something.
My code and embed point I used.
thanks again,
Johan
p_web._SendFile PROCEDURE(string p_FileName,Long p_header=NET:SendHeader)
! Start of "NetTalk Method Data Section"
! [Priority 1500]
loc:parent string(252) ! should always be a lower-case string
loc:done Long
loc:filename string(252)
! [Priority 6500]
! End of "NetTalk Method Data Section"
CODE
! Start of "NetTalk Method Executable Code Section"
! [Priority 1500]
loc:parent = self.PlainText(Lower(self.GetValue('_parentProc_')))
loc:filename = SELF.GetPageName(Lower(p_FileName))
! Start of "Before SendFiles in DLLs"
! [Priority 5000]
!#############################
block# = false
case loc:filename
of 'nwp_wineshop'
block# = true
of 'aboutus'
block# = true
of 'nwp_aboutus'
block# = true
end !case
if block# = true
p_web.trace('case triggered:' & loc:filename)
p_web.SendError (404,'The page cannot be found', 'The page you are looking for might have been removed, had its name changed, or is temporarily unavailable.')
return
end
!#############################
! End of "Before SendFiles in DLLs"
loc:done = NetWebDLL_avc_b_SendFile(p_web, loc:Filename, loc:Parent)
If loc:Done then Return.
loc:done = NetWebDLL_avcfunc_SendFile(p_web, loc:Filename, loc:Parent)
If loc:Done then Return.
! [Priority 3040]
do Remap:tvcweb
do CaseStart:tvcweb