NetTalk Central

Author Topic: Using Javascript as look up for form value  (Read 3661 times)

CaseyR

  • Sr. Member
  • ****
  • Posts: 448
    • View Profile
    • Email
Using Javascript as look up for form value
« on: October 03, 2010, 02:42:06 PM »
Hi,

I would like to use javascripts to look up values for a form much the way we use the JQuery script to lookup a date.  The lookups are a time picker and a color picker so they don't rely on external data.  I have the scripts and can return the values on a static page but getting them into an NT form is proving pretty difficult.  Is there an example  or some documentation somewhere on how to do this?

Using NT5 and Clarion 7.2

Thanks

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Using Javascript as look up for form value
« Reply #1 on: October 04, 2010, 12:40:01 AM »
you should be able to put them into the "value" of the field itself.

ie after the lookup, the field itself is set with the value that was selected.

The only thing that might be missing from this scenario is the "immediate send to server" when the value is changed by the lookup. I'd need to check up the code for that. But the value would definitely be in POST when the user clicks on Save...

Cheers
Bruce

CaseyR

  • Sr. Member
  • ****
  • Posts: 448
    • View Profile
    • Email
Re: Using Javascript as look up for form value
« Reply #2 on: October 15, 2010, 11:22:35 AM »
Hi, Bruce

Still struggling with this issue.   I can execute DOM script from the on focus or on change javascript entries in NT, but I am having no success using any JQuery scripts.  The script libraries are entered in the web server procedure and are referenced in the XHTML source.

Could you provide an example of an entry that would trigger a JQuery script, say on-focus?  Doesn't matter what, just something that executes.

I am sure it is something basic that I don't understand.

Thanks 


Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Using Javascript as look up for form value
« Reply #3 on: October 16, 2010, 09:23:17 AM »
Hi Casey,

It'll take me as long to show something simple as something specific. So do you have a script in mind that I can see? Perhaps there's some specific detail about that script which you're missing?

Cheers
Bruce

CaseyR

  • Sr. Member
  • ****
  • Posts: 448
    • View Profile
    • Email
Re: Using Javascript as look up for form value
« Reply #4 on: October 19, 2010, 05:04:33 PM »
Thanks, Bruce

The easiest example would just be to call the date picker on focus.  It doesn't have to return the value at this point, just an example of the entry to call a jQuery script.