NetTalk Central

Author Topic: Spin events, and poping up messages  (Read 2707 times)

Pauly

  • Newbie
  • *
  • Posts: 26
    • View Profile
    • Email
Spin events, and poping up messages
« on: March 24, 2012, 05:59:03 AM »
Hi All,

Does anybody have an example of the following please? I could really use some guidance -

I want to refresh the page when the user changes the value of a spin control immediately... For example, the user clicks on the spin control and it increments from 1 to two... I then want to (immediately) refresh the page using the new value. So far, I've only got it to work if the user clicks outside of the spin control.

Also... How can I pop-up a message? I know it should be a simple thing, but popping up a message box (well... I guess it would be called a pop up form?) like 'Please enter a number between one and a squillion' with an ok button on it is eluding me,

Thanks for any advice
Pauly
 

Stu

  • Hero Member
  • *****
  • Posts: 510
    • View Profile
    • Email
Re: Spin events, and poping up messages
« Reply #1 on: March 25, 2012, 06:16:52 PM »
Pauly,

Hi there.

Haven't done anything much with the spinners, but for the second, easy answer!

p_web.Popup('whatever you want')

That needs to go in an embed that makes sense. Like a button click, or form validate or .. something that makes sense in terms of WHERE the javascript that p_web.Popup() creates is going to be loaded and run (thinking in terms of the web page, not desktop page).

Hope that helps.
Cheers,

Stu Andrews

Pauly

  • Newbie
  • *
  • Posts: 26
    • View Profile
    • Email
Re: Spin events, and poping up messages
« Reply #2 on: March 26, 2012, 01:41:41 AM »
G'day Stu,

Thanks mate - that worked a treat!

Pauly

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11239
    • View Profile
Re: Spin events, and poping up messages
« Reply #3 on: April 01, 2012, 11:32:01 PM »
Hi Pauly,

>> I want to refresh the page when the user changes the value of a spin control immediately... For example, the user clicks on the spin control and it increments from 1 to two... I then want to (immediately) refresh the page using the new value. So far, I've only got it to work if the user clicks outside of the spin control.

In clarion-speak you're getting action on "event:accepted" but you'd like it on "event:newselection".

Unfortunately the Spin controls you're seeing are provided by the browser, on a "number" field, they're not generic across all browsers. I know jQueryUI are working on a spin control though - and I'm guessing when that's done you'll have some more consistency, and more control, over the spin box.

cheers
Bruce