This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
31
Web Server - Ask For Help / Re: Can you make CheckBoxes with the Button on the Leftt and Text on the Right ?
« on: November 07, 2024, 01:52:11 AM »
Mike,
Templates have a LOT in them. A lot of things are not what they seem to be. You just have to ask questions and experiment! Incredible stuff is doable with NT and even more with NT and css. I try to do as much in NT as I can. My custom.css is very tiny.
Ron
Templates have a LOT in them. A lot of things are not what they seem to be. You just have to ask questions and experiment! Incredible stuff is doable with NT and even more with NT and css. I try to do as much in NT as I can. My custom.css is very tiny.
Ron
32
Web Server - Ask For Help / Re: Can you make CheckBoxes with the Button on the Leftt and Text on the Right ?
« on: November 06, 2024, 04:45:17 AM »
i Mike,
I am doing that with native NT. Initially, I had a consultant help me and he did it in css by working around the NT css as custom css. That was somewhat fragile so I deleted the custom CSS and did this in NT alone:
Checkbox at left. Description at right. Now, I don't have to fudge css every time I want to play with it.
I have attached some screen pics to help explain.
Ron
I am doing that with native NT. Initially, I had a consultant help me and he did it in css by working around the NT css as custom css. That was somewhat fragile so I deleted the custom CSS and did this in NT alone:
Checkbox at left. Description at right. Now, I don't have to fudge css every time I want to play with it.
I have attached some screen pics to help explain.
Ron
33
Web Server - Ask For Help / Re: Can you make CheckBoxes with the Button on the Leftt and Text on the Right ?
« on: November 03, 2024, 10:02:24 AM »
HI Mike,
Where do you want to make them? Forms?, Browses? Anywhere? Do you want to be more specific? Do you want to do these in plain Net Talk or do you want to use css?
Ron
Where do you want to make them? Forms?, Browses? Anywhere? Do you want to be more specific? Do you want to do these in plain Net Talk or do you want to use css?
Ron
34
Web Server - Ask For Help / Re: How to change name of output PDF report?
« on: October 20, 2024, 06:43:33 AM »
Hi Jeff,
I use an Embed "RenameFile PROCEDURE in the Web Handler - after Parent call: ( this renames a file and sets the correct path for the chosen data set)
!MESSAGE('pname ' & p_name)
if p_name = 'upfilename' ! uploading schedule file
locpath = p_web.GSV('tProvRptDir') ! this is the provider file
! message('report dir ' & locpath)
locpath = clip(locpath) & '\INFILE\' ! this adds the Infile path
! message('upload path: ' & locpath)
RETURNVALUE = Parent.RenameFile(p_name,p_filename,locpath)
RETURN RETURNVALUE
END
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Second: This sends a file which is stored in a BLOB - get the blob, check it to see if it holds a file, if it does then extract it and send it
WebHandler - -SendFile PROCEDURE
Data section:
blobname StringTheory
sendstring StringTheory
CODE - Before Parent Call
!! working on generic code in the class to do this. This is for making a file from BLOB to send
Access:Blobfile.Open()
Access:Blobfile.UseFile()
blobname.SetValue(sub(p_FileName,len(clip(self.site.WebFolderPath)) + 2,255))
if blobname.sub(1,1) = '/' then blobname.setvalue(blobname.sub(2,255)).
blobname.replace('/','\')
BF:FileName = blobname.GetValue()
If Access:Blobfile.Fetch(BF:NameKey) = 0
sendstring.FromBlob(BF:Bin)
! allows the browser to cache this file.
! self.ForceNoCache = false
self.HeaderDetails.CacheControl = ''
self.FileDate = today() - 200
self.FileTime = 6000 !clock()
! or tell browser not to cache file
self.ForceNoCache = true
! end of cache settings
self.SendString(sendString,1,0,true)
loc:done = true
End
Access:Blobfile.Close()
If loc:done then return.
-------------------------------------------------------------------
Hopefully these two code snippets will help you get done what you need to get done.
Ron
I use an Embed "RenameFile PROCEDURE in the Web Handler - after Parent call: ( this renames a file and sets the correct path for the chosen data set)
!MESSAGE('pname ' & p_name)
if p_name = 'upfilename' ! uploading schedule file
locpath = p_web.GSV('tProvRptDir') ! this is the provider file
! message('report dir ' & locpath)
locpath = clip(locpath) & '\INFILE\' ! this adds the Infile path
! message('upload path: ' & locpath)
RETURNVALUE = Parent.RenameFile(p_name,p_filename,locpath)
RETURN RETURNVALUE
END
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Second: This sends a file which is stored in a BLOB - get the blob, check it to see if it holds a file, if it does then extract it and send it
WebHandler - -SendFile PROCEDURE
Data section:
blobname StringTheory
sendstring StringTheory
CODE - Before Parent Call
!! working on generic code in the class to do this. This is for making a file from BLOB to send
Access:Blobfile.Open()
Access:Blobfile.UseFile()
blobname.SetValue(sub(p_FileName,len(clip(self.site.WebFolderPath)) + 2,255))
if blobname.sub(1,1) = '/' then blobname.setvalue(blobname.sub(2,255)).
blobname.replace('/','\')
BF:FileName = blobname.GetValue()
If Access:Blobfile.Fetch(BF:NameKey) = 0
sendstring.FromBlob(BF:Bin)
! allows the browser to cache this file.
! self.ForceNoCache = false
self.HeaderDetails.CacheControl = ''
self.FileDate = today() - 200
self.FileTime = 6000 !clock()
! or tell browser not to cache file
self.ForceNoCache = true
! end of cache settings
self.SendString(sendString,1,0,true)
loc:done = true
End
Access:Blobfile.Close()
If loc:done then return.
-------------------------------------------------------------------
Hopefully these two code snippets will help you get done what you need to get done.
Ron
35
Web Server - Ask For Help / Re: checkboxes and radio buttons
« on: October 18, 2024, 03:29:23 AM »
Mike,
Maybe look at the page in developer mode and see what is happening in css for respective form. Getting overwritten by different settings in form? You may have to tweak the custom css - especially if you are playing with the built in nt identifiers and not your unique one.
Ron
Maybe look at the page in developer mode and see what is happening in css for respective form. Getting overwritten by different settings in form? You may have to tweak the custom css - especially if you are playing with the built in nt identifiers and not your unique one.
Ron
36
Web Server - Ask For Help / Re: Change background color of entire app
« on: October 15, 2024, 05:33:37 PM »
Jeff,
This CSS thing is for the young kids - not for old guys like me! Anyway, there are so many things going on here. The first question I have is did you get the css into your working custom.css file? You can look at the web page and put it in developers mode ( IE or Firefox. I have started using Stylizer 7 for some work as I learn css) - is your NEW CODE in the css? Is it being over written? if it is there, what is overwriting it?
That is supposed to be the power of css - one change and voila - the whole site is transformed.
Th --site--background is a built in variable I think.
This will give you a start. BTW, I hired a young kid to help me move around CSS - was well worth it. ( These kids will make a web site do all kinds of tricks - but they don't have a clue about the data behind it and what it represents or how to manage it. My 2 cents...
Ron
This CSS thing is for the young kids - not for old guys like me! Anyway, there are so many things going on here. The first question I have is did you get the css into your working custom.css file? You can look at the web page and put it in developers mode ( IE or Firefox. I have started using Stylizer 7 for some work as I learn css) - is your NEW CODE in the css? Is it being over written? if it is there, what is overwriting it?
That is supposed to be the power of css - one change and voila - the whole site is transformed.
Th --site--background is a built in variable I think.
This will give you a start. BTW, I hired a young kid to help me move around CSS - was well worth it. ( These kids will make a web site do all kinds of tricks - but they don't have a clue about the data behind it and what it represents or how to manage it. My 2 cents...
Ron
37
Web Server - Ask For Help / Re: How to call a "secondary" form after saving main update form?
« on: October 15, 2024, 03:31:43 PM »
Jeff,
I am not sure of a good way to call the MemForm Procedure now that I look at it.
I would consider putting a Button on the Browse that says "Print Report". It sounds like each record should have the Print report button so you don;t need to hide/unhide it. Make It an Action: Other . For th "On Click" action, use the second line the Procedure: In there put the NewStudyReport. No need for a MemForm now that I see what you are trying to do. Just the button. Make the NewStudyReport a Report procedure itself. It is the one that gets called with the Print Button. The Target Frame is '_blank' ( this opens the PDF report in a new tab). The NewStudyReport procedures has the Prototype/ Parameter (<NetWebServerWorker p_web>). You just need to make sure that the highlighted record p_web.GSV('Study_Id') is in focus so that you get the correct report. You can put code in the "Client-Side" tab.
For my Browse, I actually flag that the report was printed. so I send the Button click to the server, I have this in the SERVER CODE:
! for marking printed...
JSRV:GUID = p_web.GSV('JSRV:GUID')
if access:J_SRVREQ.fetch(JSRV:GUID_KEY) = Level:benign
p_web.SSV('JSRV:reqPRINTED',1)
access:J_SRVREQ.Update()
JSRV:reqPRINTED = 1
end
And I Refresh browse row DATA after server code runs.
Jeff, I think that this is really all you need.
Yell at me if it isn't going right for you and I can help you.
Ron
I am not sure of a good way to call the MemForm Procedure now that I look at it.
I would consider putting a Button on the Browse that says "Print Report". It sounds like each record should have the Print report button so you don;t need to hide/unhide it. Make It an Action: Other . For th "On Click" action, use the second line the Procedure: In there put the NewStudyReport. No need for a MemForm now that I see what you are trying to do. Just the button. Make the NewStudyReport a Report procedure itself. It is the one that gets called with the Print Button. The Target Frame is '_blank' ( this opens the PDF report in a new tab). The NewStudyReport procedures has the Prototype/ Parameter (<NetWebServerWorker p_web>). You just need to make sure that the highlighted record p_web.GSV('Study_Id') is in focus so that you get the correct report. You can put code in the "Client-Side" tab.
For my Browse, I actually flag that the report was printed. so I send the Button click to the server, I have this in the SERVER CODE:
! for marking printed...
JSRV:GUID = p_web.GSV('JSRV:GUID')
if access:J_SRVREQ.fetch(JSRV:GUID_KEY) = Level:benign
p_web.SSV('JSRV:reqPRINTED',1)
access:J_SRVREQ.Update()
JSRV:reqPRINTED = 1
end
And I Refresh browse row DATA after server code runs.
Jeff, I think that this is really all you need.
Yell at me if it isn't going right for you and I can help you.
Ron
38
Web Server - Ask For Help / Re: How to call a "secondary" form after saving main update form?
« on: October 14, 2024, 03:19:47 PM »
Jeff,
In the Form there is a Routine - Post Insert - which I use occasionally to do some secondary work. Maybe call a MemoryForm with the Print button. If you save the Study_ID in p_web.SSV('Study_Id', Study_ID) then you can add the net talk (<NetWebServerWorker p_web>) in Prototype and Parameters for your report. Then, in your report, in Init, Enter procedure setup embed or just after that one, thisStudyID = p_web.GSV('Study_Id'). thisStudyID is a local variable in your Report and it becomes the filter for the report. You can use the Report part only with maybe the method Alberto suggested. However, I find that it is easier to make a MemForm for specific things.
Ron
In the Form there is a Routine - Post Insert - which I use occasionally to do some secondary work. Maybe call a MemoryForm with the Print button. If you save the Study_ID in p_web.SSV('Study_Id', Study_ID) then you can add the net talk (<NetWebServerWorker p_web>) in Prototype and Parameters for your report. Then, in your report, in Init, Enter procedure setup embed or just after that one, thisStudyID = p_web.GSV('Study_Id'). thisStudyID is a local variable in your Report and it becomes the filter for the report. You can use the Report part only with maybe the method Alberto suggested. However, I find that it is easier to make a MemForm for specific things.
Ron
39
Web Server - Ask For Help / Re: Combining TakePic Action and Record Saving in a Single Button
« 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
40
Web Server - Ask For Help / Re: Settings for making web procedures not visible/accessible
« on: September 29, 2024, 11:41:05 AM »
Johan,
Not sure what you are trying to accomplish. There is a global setting for user must be logged in as well as at the procedure level. eg You can't have to be logged in in order to Log In. Why don't you delete the procedures that are not used? I doubt if someone would guess the name of a procedure not being called and be able to call it. If you don't want to delete procedures and don't want them to be called why don't you give those procedures a Sec Level that WILL NEVER EXIST - maybe -101?
Ron
Not sure what you are trying to accomplish. There is a global setting for user must be logged in as well as at the procedure level. eg You can't have to be logged in in order to Log In. Why don't you delete the procedures that are not used? I doubt if someone would guess the name of a procedure not being called and be able to call it. If you don't want to delete procedures and don't want them to be called why don't you give those procedures a Sec Level that WILL NEVER EXIST - maybe -101?
Ron
41
Web Server - Ask For Help / Re: Sec:Level - Multiple Ranges?
« on: September 02, 2024, 12:39:39 PM »
Looking at the code, I imagine I could add this code to each procedure:
! Start of "Processed Code"
! [Priority 2800]
If ~ INRANGE(Sec:LEVEL,100,199) or ~ INRANGE(Sec:LEVEL,995,999)
Return -1
end
! Before checking p_Stage
Does this sound correct?
Ron
! Start of "Processed Code"
! [Priority 2800]
If ~ INRANGE(Sec:LEVEL,100,199) or ~ INRANGE(Sec:LEVEL,995,999)
Return -1
end
! Before checking p_Stage
Does this sound correct?
Ron
42
Web Server - Ask For Help / Sec:Level - Multiple Ranges?
« on: September 02, 2024, 06:19:22 AM »
Hi,
I want to have multiple security level ranges - one for user - e.g. sec:level = 100 -199 and ANOTHER for Administrators Sec:Level 995-999.
If possible then How?
Thanks,
ROn
I want to have multiple security level ranges - one for user - e.g. sec:level = 100 -199 and ANOTHER for Administrators Sec:Level 995-999.
If possible then How?
Thanks,
ROn
43
Web Server - Ask For Help / Re: Browse with locator, return position after clicking "Other" type button
« on: August 28, 2024, 03:35:26 PM »
Gordon,
I am thinking out loud here. The Change button calls the Form with a RECORD ID ( Unique ID) being passed so that the FORM selects the correct record. If the form is CHANGE, It must return the ID of the record to the browse or to tell the browse that called it that it should highlight the record with the SAME ID.
An OTHER button does NOT do this - but maybe you can simulate the behavior by Saving the Unique ID of the Record in a Session variable. Go do the work that the OTHER BUTTON does. Upon returning to the original browse, I would GSV for the GUID of the original record and if it exists, I would tell the browse to select that one.
I think that that would be how I would think about it and how I might go about starting to construct a solution.
Ron
I am thinking out loud here. The Change button calls the Form with a RECORD ID ( Unique ID) being passed so that the FORM selects the correct record. If the form is CHANGE, It must return the ID of the record to the browse or to tell the browse that called it that it should highlight the record with the SAME ID.
An OTHER button does NOT do this - but maybe you can simulate the behavior by Saving the Unique ID of the Record in a Session variable. Go do the work that the OTHER BUTTON does. Upon returning to the original browse, I would GSV for the GUID of the original record and if it exists, I would tell the browse to select that one.
I think that that would be how I would think about it and how I might go about starting to construct a solution.
Ron
44
Web Server - Ask For Help / Re: Performance NetWebForm
« on: August 22, 2024, 03:25:46 PM »
Hi Alberto,
Not really sure what you are trying to do. I have seen the performance indicators running real time in several videos - I remember watching them when I was evaluating whether or not i wanted to use API calls or secure sockets. I think that there is even an API demo that does this. It may be a demo from one of the CIDC's - maybe the 2019 one which happened I think in 2022. Let us know what you are trying to do and where you are at.
Ron
Not really sure what you are trying to do. I have seen the performance indicators running real time in several videos - I remember watching them when I was evaluating whether or not i wanted to use API calls or secure sockets. I think that there is even an API demo that does this. It may be a demo from one of the CIDC's - maybe the 2019 one which happened I think in 2022. Let us know what you are trying to do and where you are at.
Ron
45
Web Server - Ask For Help / Re: Adding icon to Android Home Screen, anyone?
« on: August 05, 2024, 03:27:10 PM »
Hector,
Yes, I am adding Icon to Home screen on both Android and Iphone. I am copying an earlier post here by Poul and follow it and you will be all set.
Ron
Re: NTWS 12.63-App shortcut in mobile's home screen
? Reply #2 on: January 14, 2024, 11:27:56 PM ?
Quote
Hi,
It can be done manually.
1) Go to a site like this and create your icon images: https://realfavicongenerator.net/
2) In the app, Webhandler, SetCustomHTMLHeaders you place this:
Code: [Select]
self.MetaHeaders = ' ' & |
'<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">' & |
'<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">' & |
'<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">' & |
'<link rel="manifest" href="/site.webmanifest">' & |
'<link rel="mask-icon" href="/safari-pinned-tab.svg" color="#5bbad5">' & |
'<meta name="msapplication-TileColor" content="#da532c">' & |
'<meta name="theme-color" content="#ffffff">'
3) Distribute the created icon images and files in the web folder.
4) The user then opens your app, and creates the shortcut from the menu, Add to home Screen:
/Poul
Yes, I am adding Icon to Home screen on both Android and Iphone. I am copying an earlier post here by Poul and follow it and you will be all set.
Ron
Re: NTWS 12.63-App shortcut in mobile's home screen
? Reply #2 on: January 14, 2024, 11:27:56 PM ?
Quote
Hi,
It can be done manually.
1) Go to a site like this and create your icon images: https://realfavicongenerator.net/
2) In the app, Webhandler, SetCustomHTMLHeaders you place this:
Code: [Select]
self.MetaHeaders = ' ' & |
'<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">' & |
'<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">' & |
'<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">' & |
'<link rel="manifest" href="/site.webmanifest">' & |
'<link rel="mask-icon" href="/safari-pinned-tab.svg" color="#5bbad5">' & |
'<meta name="msapplication-TileColor" content="#da532c">' & |
'<meta name="theme-color" content="#ffffff">'
3) Distribute the created icon images and files in the web folder.
4) The user then opens your app, and creates the shortcut from the menu, Add to home Screen:
/Poul