NetTalk Central

Author Topic: Re: Call Nettalk Form - JQuery UI Dialog from a Scheduler Javascript Library  (Read 4600 times)

Alberto

  • Hero Member
  • *****
  • Posts: 1873
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Hi,
I am calling a  form from a JS calendar using
ntd.push(....
All is ok but how do I refresh the calendar from the form "save" button?
I need to call the proc when I set the json events data and then the calendar itself.
Ive setted the CalledFrom: to the Calendar NetWebForm that contains the Calendar and the _event_ value reaches ok with gainfocus value.
Thanks

FXIW: this is the js Im using: https://fullcalendar.io
« Last Edit: May 10, 2017, 10:11:02 AM by michelis »
-----------
Regards
Alberto

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
>> All is ok but how do I refresh the calendar from the form "save" button?

determine the JavaScript your widget needs to refresh itself.
then call this in the PostInsert and PostUpdate routines in the form procedure, using the Script tag.

For example, say the javascript is whatever.refresh();
Then you would embed the code

p_web.script('whatever.refresh();')

Cheers
Bruce

Alberto

  • Hero Member
  • *****
  • Posts: 1873
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Thanks, another problem...

The JS has several properties that I need to be changed by the user, example:

   $('#calendar').fullCalendar({  
       height: 300,
       aspectRatio: 2,
       slotDuration: '00:15:00',
       minTime: '10:00:00',
       maxTime: '17:00:00',

Where in the NetWebForm that contains the calendar.js do I add, by example:

    p_web.Script('$(''#calendar'').fullCalendar(''option'', ''height'', 700);')

for the height to be change at run time?

Thanks

-----------
Regards
Alberto

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
>> that I need to be changed by the user,

how will the user change the options? while the date picker is open? or in some sort of user configuration?

I think you need to explain a lot more what you have in mind in order to predict where in the code might be best.

cheers
Bruce

Alberto

  • Hero Member
  • *****
  • Posts: 1873
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
I am not talking of datpicker.
Im talking about a js called fullcalendar that Im implementig
Its working ok now but I need to chenge some params dependin on the user
The User record has this data, it is set by the user in its profile.
Then I need to change the fullcalendar.js
As I said in my last post:

The JS has several properties that I need to be changed by the user, this is how the JS begins

   $('#calendar').fullCalendar({ 
       height: 300,
       aspectRatio: 2,
       slotDuration: '00:15:00',
       minTime: '10:00:00',
       maxTime: '17:00:00',

Where in the NetWebForm that contains the fullcalendar.js do I add, by example:

    p_web.Script('$(''#calendar'').fullCalendar(''option'', ''height'', 700);')

for the height to be change at run time?

Thanks
-----------
Regards
Alberto

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
The form is an event handler.
On which event do you want the change to occur?

Cheers
Bruce

Alberto

  • Hero Member
  • *****
  • Posts: 1873
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Done, thanks
-----------
Regards
Alberto