NetTalk Central

NetTalk Web Server => Web Server - Ask For Help => Topic started by: John Fligg on February 27, 2012, 01:28:08 PM

Title: My first attempt at manipulating jQuery
Post by: John Fligg on February 27, 2012, 01:28:08 PM
Having checked out the jQuery website in respect of the accordian menu widget and reading "the book" I thought I would attempt to change the property of the accordian menu to turn off the autoheight function.

So I put this code into the Set jQueryAccordianMenuOptions embed point in the PageHeaderTag form:

 loc:options = CHOOSE(loc:options='','',clip(loc:options) & ',') & 'autoHeight: False'

However when the code runs the menu does not give the desired results. In fact the accodian menu has stopped working! Please see attached.

I do not think the syntax is worng so what could I be doing wrong?

Thanks

John

[attachment deleted by admin]
Title: Re: My first attempt at manipulating jQuery
Post by: kevin plummer on February 27, 2012, 02:50:04 PM
not that I have messed with JQuery but I think your choose statement is wrong.

Try

loc:options = CHOOSE(loc:options='','',clip(loc:options) & ',' & 'autoHeight: False')
Title: Re: My first attempt at manipulating jQuery
Post by: John Fligg on February 27, 2012, 02:57:37 PM
Sorry Kevin - I copied the syntax from "the book" but this suggestion does not work either.

John
Title: Re: My first attempt at manipulating jQuery
Post by: kevin plummer on February 27, 2012, 04:55:45 PM
Actually your initial choose statement is right. I just think you have it in the wrong place. Try the following embed:

      ! Start of "Set jQuery Accordion Options"
      ! [Priority 5000]

      ! End of "Set jQuery Accordion Options"

Title: Re: My first attempt at manipulating jQuery
Post by: John Fligg on February 28, 2012, 12:17:16 AM
I thought that was where I did have it. Tried every embed possible now but nothing works.

Sorry.

John
Title: Re: My first attempt at manipulating jQuery
Post by: Bruce on February 28, 2012, 12:28:18 AM
take example 2 (basic with menu) - change it to the Accordion menu, and make the changes you have in mind, then post here. Use the embed Kevin suggested.

cheers
Bruce
Title: Re: My first attempt at manipulating jQuery
Post by: John Fligg on February 28, 2012, 12:43:40 AM
Bruce - here it is converted to C8. The embed Kevin suggested is the one I thought I was using. Attached the zip file and what I am seeing at run time.

Thanks

John

[attachment deleted by admin]
Title: Re: My first attempt at manipulating jQuery
Post by: Bruce on February 28, 2012, 10:13:14 PM
so, in the spirit of teaching-a-man-to-fish (yada, yada, yada) I'm not gonna tell you what you did wrong. Rather I'll tell you how you can see what you did wrong.

Open your app in Firefox, open Firebug, and go to the Console window. JavaScript errors are reported there.
(hint: javascript is case sensitive).

Cheers
Bruce

Title: Re: My first attempt at manipulating jQuery
Post by: John Fligg on February 29, 2012, 12:16:17 AM
Thanks Bruce - and to be fair the website did show lowercase!

One good thing - I did not have Firebug installed so very useful to have found that.

Thanks.

John