NetTalk Central
NetTalk Web Server => Web Server - Ask For Help => Topic started by: Alberto on February 27, 2020, 08:49:24 AM
-
Hi, I need to show a big note using a button and a popup proc.
How is the best approach?
Because its for only viewing the note, no update, may be theres a more small way that use a form.
see pic
-
Simplest way I guess would be to use a NewWebPage. Include a stringTheory object. In the Processed code embed put
st.SetValue(p_web.Translate([noteString]))
st.Replace('<13,10>', '<<br>')
packet.append(st.GetValue())
-
You could use a popup memory form with only one field.
Open the popup NoteMemForm with your button passing the note string as a parameter of the button's OnClick.
That will place the "note" in the NoteMemForm's URL string as a parameter https://wwwwww.xxx?thenote=xxxxxx
Under the NoteMemForm's priming tab, On Change, NoteField primed with p_web.GetValue('thenote')
Display the NoteField with a text control.
Choose a close button instead of save under the NoteMemForm's buttons tab.
Resize the NoteMemForm to taste.
Done.
Don
-
Thanks Don ... but this does not work in Popup mode, you cant use parameters
-
Sure you can.
From the docs for On Click Button:
Parameters
Parameters to pass to the URL or procedure. This is a & separated list of the form parameter=value¶meter=value and so on.
You're using a button to call your "note" form. Pass the note form a "NetTalk" parameter.
Don
-
>> Simplest way I guess would be to use a NewWebPage.
No, don't use a NetWebPage - these cannot be popups.
>> You could use a popup memory form with only one field.
yes
>> Open the popup NoteMemForm with your button passing the note string as a parameter of the button's OnClick.
You don't need to pass it. The popup form could just use the session value "as is".
Assuming the notes is a field in the database, then it's just a case of using that field on the form (probably as a "DISPLAY" field.)
Cheers
Bruce