NetTalk Central

NetTalk Web Server => Web Server - Ask For Help => Topic started by: Alberto on February 27, 2020, 08:49:24 AM

Title: Best way of show a big note
Post 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
Title: Re: Best way of show a big note
Post by: Matthew51 on February 27, 2020, 04:00:33 PM
Simplest way I guess would be to use a NewWebPage. Include a stringTheory object. In the Processed code embed put
Code: [Select]
st.SetValue(p_web.Translate([noteString]))
st.Replace('<13,10>', '<<br>')
packet.append(st.GetValue())
Title: Re: Best way of show a big note
Post by: DonRidley on February 28, 2020, 02:55:43 AM
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
Title: Re: Best way of show a big note
Post by: Alberto on February 28, 2020, 03:49:12 AM
Thanks Don ... but this does not work in Popup mode, you cant use parameters

Title: Re: Best way of show a big note
Post by: DonRidley on February 29, 2020, 06:57:12 AM
Sure you can. 

From the docs for On Click Button:

Quote
Parameters
Parameters to pass to the URL or procedure. This is a & separated list of the form parameter=value&parameter=value and so on.

You're using a button to call your "note" form.  Pass the note form a "NetTalk" parameter.

Don
Title: Re: Best way of show a big note
Post by: Bruce on March 01, 2020, 09:57:51 PM
>> 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