NetTalk Central

Author Topic: Message to user  (Read 16585 times)

Thys

  • Sr. Member
  • ****
  • Posts: 311
    • View Profile
    • Incasu
    • Email
Message to user
« on: May 10, 2011, 11:19:05 PM »
I need to display a message to a user after successfully creating a login. I want it to be a normal windows message and not some information on a web page. How do I do that?

Thys

Robert Iliuta

  • Sr. Member
  • ****
  • Posts: 472
    • View Profile
    • Email
Re: Message to user
« Reply #1 on: May 10, 2011, 11:24:43 PM »
Hallo ,

Try using:

loc:alert = 'Hallo! this is an alert!'

Regards,
Robert

Thys

  • Sr. Member
  • ****
  • Posts: 311
    • View Profile
    • Incasu
    • Email
Re: Message to user
« Reply #2 on: May 10, 2011, 11:29:22 PM »
Robert,

It looks like that won't work - according to the manual: "Set if a field is invalid. Text will be sent to the browser for display as an error."

But I will try it anyway.
Thanks

Stu

  • Hero Member
  • *****
  • Posts: 510
    • View Profile
    • Email
Re: Message to user
« Reply #3 on: May 11, 2011, 01:59:07 AM »
Thys,

I'd use p_web.jQuery(" .. in here put a call to jquery's popup") .. OR .. handcode in the javascript: alert("message");
Cheers,

Stu Andrews

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Message to user
« Reply #4 on: May 11, 2011, 04:49:29 AM »
Hi Thys,

I'm intrigued by this line;
"I want it to be a normal windows message and not some information on a web page."

Given that the browser could be on any OS - indeed on any device, the reference to a "windows message" is somewhat misleading I think.
I presume by "windows message" you mean you want a "popup dialog window"?
something like;

p_web.Script('alert("hello bruce");')

?

Cheers
Bruce


jorgemir

  • Jr. Member
  • **
  • Posts: 71
    • View Profile
    • Email
Re: Message to user
« Reply #5 on: May 11, 2011, 10:13:44 AM »
How many wonderfull p_web.script methods there are? Until now, I'be seen two (reload and this one, alert). Will you reveal this valuable info in some doc? I'm unable at this very moment of unload the price of the nettalk book. Some time in the future I will, but for the moment would be very nice to have at least a list of the methods and implementation definition. Is that possible¿
Thanks
Jorge

Mark Sarson

  • Newbie
  • *
  • Posts: 33
    • View Profile
    • Email
Re: Message to user
« Reply #6 on: May 11, 2011, 11:41:48 AM »
p_web.Script(...

This is just one method, what you put in it is up to you, the code inside the () is JavaScript, so you can put any JavaScript you like in there.

I hope this helps explain it better.

Cheers

Mark

jorgemir

  • Jr. Member
  • **
  • Posts: 71
    • View Profile
    • Email
Re: Message to user
« Reply #7 on: May 11, 2011, 01:39:10 PM »
Ok. Thank. And where I can find this Javascript methods? I know nothing of javascript and I should start to learn as this is important.
Jorge


Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Message to user
« Reply #9 on: May 11, 2011, 10:02:08 PM »
Hi Jorge,

As Mark says the Script method allows you to embed JavaScript in the response. It works in both page-request, and Ajax (asyncronous request) mode.

So,
Alert('Hello Bruce');
Is a valid line of JavaScript.

To learn JavaScript just use the web. There are endless resources online.

cheers
Bruce

Thys

  • Sr. Member
  • ****
  • Posts: 311
    • View Profile
    • Incasu
    • Email
Re: Message to user
« Reply #10 on: May 11, 2011, 10:23:01 PM »
Hi Bruce,

I was either a popup message ("windows message") to display the result, or a simple piece of text on a page to show that the action was completed successfully. Both are adequate for the purpose.

I agree that "windows message" is misleading - "popup message" might be better descriptive.

Thanks

Hi Thys,

I'm intrigued by this line;
"I want it to be a normal windows message and not some information on a web page."

Given that the browser could be on any OS - indeed on any device, the reference to a "windows message" is somewhat misleading I think.
I presume by "windows message" you mean you want a "popup dialog window"?
something like;

p_web.Script('alert("hello bruce");')

?

Cheers
Bruce



Mark Sarson

  • Newbie
  • *
  • Posts: 33
    • View Profile
    • Email
Re: Message to user
« Reply #11 on: May 12, 2011, 03:06:42 AM »
Just one thing to note with regards to alert('xxxxxx') is that some browsers offer to not show those messages. I think Google Chrome is one of them.

Mark

Robert Iliuta

  • Sr. Member
  • ****
  • Posts: 472
    • View Profile
    • Email
Re: Message to user
« Reply #12 on: April 22, 2012, 03:53:25 AM »
Hallo Stu,

>p_web.jQuery(" .. in here put a call to jquery's popup") .
how can you popup a jquery message?
Can you post an example?

Thank you
Robert

estadok

  • Jr. Member
  • **
  • Posts: 84
    • View Profile
    • EstaSoft
    • Email
Re: Message to user
« Reply #13 on: April 22, 2012, 09:44:32 PM »
Clarion 9.0.10376
NetTalk 7.26
SecWin 6.25
StringTheory 1.92

Robert Iliuta

  • Sr. Member
  • ****
  • Posts: 472
    • View Profile
    • Email
Re: Message to user
« Reply #14 on: April 22, 2012, 10:19:42 PM »
Hallo estadok,

downloaded yesterday but didn't implement. After your post get a time to implement.
In 2 min added to NetTalk and works perfect.

Thank you for your advise!
Regards,
Robert