NetTalk Central

Author Topic: Any information or examples of integrating Jquery stuff?  (Read 3657 times)

rjolda

  • Sr. Member
  • ****
  • Posts: 329
    • View Profile
    • Email
Any information or examples of integrating Jquery stuff?
« on: April 02, 2010, 05:20:57 AM »
Hi,
Looking forward at putting in some JQuery stuff into my Net Talk5 web server.
Any examples of how to integrate this stuff?
Any insight that anyone wants to share?
Thanks,
Ron Jolda

kevin plummer

  • Hero Member
  • *****
  • Posts: 1195
    • View Profile
    • Production Accounting and Software Payroll
Re: Any information or examples of integrating Jquery stuff?
« Reply #1 on: April 05, 2010, 05:31:41 PM »
Hi Ron,

Bruce had mentioned he was working on some examples so hopefully he will have something to publish soon. I'm also looking to add some additional functionality but was waiting for these docs/examples.

Cheers,

Kev

kevin plummer

  • Hero Member
  • *****
  • Posts: 1195
    • View Profile
    • Production Accounting and Software Payroll
Re: Any information or examples of integrating Jquery stuff?
« Reply #2 on: April 08, 2010, 12:10:55 AM »
Hi Ron,

I had a crack add adding a HotKeys Script (jquery.hotkeys.js) for JQuery and here is what I found.

1) Copy the script into your scripts folder
2) add the script name to the webserver settings scripts tab on the template
3) add your specific script to your form etc

If you want the script to effect the entire page you could put it in this embed

  ! Start of "After Form Inside Scripts"
  ! [Priority 5000]
  packet = clip(packet) & '$.shortcut.add("F8", <123>type: <39>keydown<39><125>, function()<123>window.open(<39>http://www.tph.com.au<39>)<125>);<13,10>'

In my case I want to use the same function key but do something different depending on what field the user has clicked on. So I added
'$(document).bind(<39>keydown<39>, <39>f8<39>, function()<123>window.open(<39>http://www.tph.com.au/blog/<39>)<125>);'
to the field on the client side Tab in the on Focus JavaScript handcode template prompt.

I pretty much don't know anything about HTML or JavaScript so I took the examples that came with the HotKeys Script and examined the source code on the HTML pages, took snipits and modified it to do what I wanted and then plugged it into NetTalk.

My aim is to have a single function key invoke a different lookup screen depending on what field the user has focus but I always like to try and start really basic and then add more complexity until I achieve my goal or hit a wall.

Hope that helps.

Kevin


rjolda

  • Sr. Member
  • ****
  • Posts: 329
    • View Profile
    • Email
Re: Any information or examples of integrating Jquery stuff?
« Reply #3 on: April 12, 2010, 05:33:33 PM »
Hi Kevin,
Thanks for the insight - going to be tackling this in a few weeks.......
Ron