NetTalk Central

Author Topic: Example of using external JQuery scripts with NetTalk  (Read 11088 times)

CaseyR

  • Sr. Member
  • ****
  • Posts: 448
    • View Profile
    • Email
Example of using external JQuery scripts with NetTalk
« on: March 14, 2012, 09:26:17 AM »
Hi, Bruce

Just a request for the next time you add to the examples.  Could you add an example of using a JQuery plugin that is not integrated with the NetTalk templates.

The actual function isn't important just how data is passed to the script and how user actions are relayed to NT.  But if you are looking for an example, how about adding a time picker to the Time Fields example.

Thanks.




Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Example of using external JQuery scripts with NetTalk
« Reply #1 on: March 14, 2012, 11:39:57 PM »
>> Could you add an example of using a JQuery plugin that is not integrated with the NetTalk templates.

I can, and indeed have. During the webshop training in 2010 I showed, and documented adding the vtip plugin to apps.

The problem of course is that first it's worth explaining what a jQuery plugin is, and isn't.

a jQuery plugin is nothing more or less than some JavaScript code which uses jQuery as a starting point. Using this terminology your Win32 program is a "clarion plugin" because it uses the Clarion runtime library. A jQuery plugin just uses the jQuery "runtime library". It doesn't really dictate how it works, or what the code looks like or anything like that.

So in that sense, any single example is great for that item, but may, or may not, be useful when it comes to other plugins you may want to use.

There are also, of course, various different kinds of plugins. You get ones that are "pure code" with no visual aspect. (Like, say, a plugin to generate page refreshes on a degrading time scale, stopping completely outside of office hours.) You get ones that are visual, but completely encapsulated in the browser - with no access to the server - say, like a color-dialog picker. Then you have ones which are highly interactive with the server, requesting on-going information and so on - like say a stock ticker.
Each one is going to be implemented in a fairly different way.

To address this issue there have been "conventions" (also called "patterns") that have evolved along the way to introduce some consistency. For example jQuery-UI have a "standard way" of doing things, based on the "Widget Factory". The name is a bit daft, all you need to know is that "things work the same" - not by enforcement, but by convention. Obviously plugins that use this approach are easier to pick up and use, if you're used to the pattern.

So, if you have a specific plugin in mind then feel free to let us know which one it is.

Cheers
Bruce