[web2py] jQuery - need help !

2011-01-03 Thread Martin Weissenboeck
Hi,
I want to use jQuery UI. I have tried a lot of things during the last two
days, but nothing worked.
I have read http://jqueryui.com/docs/Getting_Started and I have done the
following steps:

(1) Download jquery-ui-1.8.7.custom.zip from http://jqueryui.com/download

(2) Unzip this file

(3) Copy download\...\js\jquery_ui_1.8.7.custom.min.js to
 web2py: js/jquery_ui_1.8.7.custom.min.js

(4) Copy download\...\css\smoothness\jquery_ui_1.8.7.custom.css to
 web2py: css/smoothness/jquery_ui_1.8.7.custom.css

(5) Add the following lines in web2py_ajax.html after
response.files.insert(2,URL('static','js/calendar.js'))


response.files.insert(3,URL('static','css/smoothness/jquery-ui-1.8.7.custom.css'))
response.files.insert(4,URL('static','js/jquery-ui-1.8.7.custom.min.js'))

(6) Change default/index.html to:

{{extend 'layout.html'}}
Date: input type=text name=date id=date
div class=one id=aHello/div
div class=two id=bWorld/div


script
  jQuery('.one').click(function(){jQuery('.two').slideToggle()});
  jQuery('#date').datepicker();
/script


(7) This is the new website:

Date:
 Hello
World


A click on Hello makes World disappear, so this jQuery function works. But
the other jQueery-function datepicker does not show any reaction. I have
tried some other functions: neither of these functions did work.

Maybe there is only a very small error - but I cannot find it.
Any ideas?

Regards, Martin


Re: [web2py] jQuery - need help !

2011-01-03 Thread David J
I think you don't have the full jquery ui  package. I see you have custom
On Jan 3, 2011 9:45 AM, Martin Weissenboeck mweis...@gmail.com wrote:
 Hi,
 I want to use jQuery UI. I have tried a lot of things during the last two
 days, but nothing worked.
 I have read http://jqueryui.com/docs/Getting_Started and I have done the
 following steps:

 (1) Download jquery-ui-1.8.7.custom.zip from http://jqueryui.com/download

 (2) Unzip this file

 (3) Copy download\...\js\jquery_ui_1.8.7.custom.min.js to
 web2py: js/jquery_ui_1.8.7.custom.min.js

 (4) Copy download\...\css\smoothness\jquery_ui_1.8.7.custom.css to
 web2py: css/smoothness/jquery_ui_1.8.7.custom.css

 (5) Add the following lines in web2py_ajax.html after
 response.files.insert(2,URL('static','js/calendar.js'))



response.files.insert(3,URL('static','css/smoothness/jquery-ui-1.8.7.custom.css'))
 response.files.insert(4,URL('static','js/jquery-ui-1.8.7.custom.min.js'))

 (6) Change default/index.html to:

 {{extend 'layout.html'}}
 Date: input type=text name=date id=date
 div class=one id=aHello/div
 div class=two id=bWorld/div


 script
 jQuery('.one').click(function(){jQuery('.two').slideToggle()});
 jQuery('#date').datepicker();
 /script


 (7) This is the new website:

 Date:
 Hello
 World


 A click on Hello makes World disappear, so this jQuery function works. But
 the other jQueery-function datepicker does not show any reaction. I have
 tried some other functions: neither of these functions did work.

 Maybe there is only a very small error - but I cannot find it.
 Any ideas?

 Regards, Martin


Re: [web2py] jQuery - need help !

2011-01-03 Thread Branko Vukelić
They are all called .custom, though.

I think it doesn't run with jQuery in compatibility mode. For testing
purposes try this _before_ loading the jQuery UI scripts:

script
$ = jQuery;
/script

On Mon, Jan 3, 2011 at 3:50 PM, David J da...@styleflare.com wrote:
 I think you don't have the full jquery ui  package. I see you have custom

 On Jan 3, 2011 9:45 AM, Martin Weissenboeck mweis...@gmail.com wrote:
 Hi,
 I want to use jQuery UI. I have tried a lot of things during the last two
 days, but nothing worked.
 I have read http://jqueryui.com/docs/Getting_Started and I have done the
 following steps:

 (1) Download jquery-ui-1.8.7.custom.zip from http://jqueryui.com/download

 (2) Unzip this file

 (3) Copy download\...\js\jquery_ui_1.8.7.custom.min.js to
 web2py: js/jquery_ui_1.8.7.custom.min.js

 (4) Copy download\...\css\smoothness\jquery_ui_1.8.7.custom.css to
 web2py: css/smoothness/jquery_ui_1.8.7.custom.css

 (5) Add the following lines in web2py_ajax.html after
 response.files.insert(2,URL('static','js/calendar.js'))



 response.files.insert(3,URL('static','css/smoothness/jquery-ui-1.8.7.custom.css'))
 response.files.insert(4,URL('static','js/jquery-ui-1.8.7.custom.min.js'))

 (6) Change default/index.html to:

 {{extend 'layout.html'}}
 Date: input type=text name=date id=date
 div class=one id=aHello/div
 div class=two id=bWorld/div


 script
 jQuery('.one').click(function(){jQuery('.two').slideToggle()});
 jQuery('#date').datepicker();
 /script


 (7) This is the new website:

 Date:
 Hello
 World


 A click on Hello makes World disappear, so this jQuery function works. But
 the other jQueery-function datepicker does not show any reaction. I have
 tried some other functions: neither of these functions did work.

 Maybe there is only a very small error - but I cannot find it.
 Any ideas?

 Regards, Martin




-- 
Branko Vukelic

stu...@brankovukelic.com
http://www.brankovukelic.com/


Re: [web2py] jQuery - need help !

2011-01-03 Thread Martin Weissenboeck
Sorry - where shall I put these lines?
Into default/index.html, before {{extend 'layout.html')}} ?


2011/1/3 Branko Vukelić stu...@brankovukelic.com

 They are all called .custom, though.

 I think it doesn't run with jQuery in compatibility mode. For testing
 purposes try this _before_ loading the jQuery UI scripts:

script
$ = jQuery;
/script

 On Mon, Jan 3, 2011 at 3:50 PM, David J da...@styleflare.com wrote:
  I think you don't have the full jquery ui  package. I see you have custom
 
  On Jan 3, 2011 9:45 AM, Martin Weissenboeck mweis...@gmail.com
 wrote:
  Hi,
  I want to use jQuery UI. I have tried a lot of things during the last
 two
  days, but nothing worked.
  I have read http://jqueryui.com/docs/Getting_Started and I have done
 the
  following steps:
 
  (1) Download jquery-ui-1.8.7.custom.zip from
 http://jqueryui.com/download
 
  (2) Unzip this file
 
  (3) Copy download\...\js\jquery_ui_1.8.7.custom.min.js to
  web2py: js/jquery_ui_1.8.7.custom.min.js
 
  (4) Copy download\...\css\smoothness\jquery_ui_1.8.7.custom.css to
  web2py: css/smoothness/jquery_ui_1.8.7.custom.css
 
  (5) Add the following lines in web2py_ajax.html after
  response.files.insert(2,URL('static','js/calendar.js'))
 
 
 
 
 response.files.insert(3,URL('static','css/smoothness/jquery-ui-1.8.7.custom.css'))
 
 response.files.insert(4,URL('static','js/jquery-ui-1.8.7.custom.min.js'))
 
  (6) Change default/index.html to:
 
  {{extend 'layout.html'}}
  Date: input type=text name=date id=date
  div class=one id=aHello/div
  div class=two id=bWorld/div
 
 
  script
  jQuery('.one').click(function(){jQuery('.two').slideToggle()});
  jQuery('#date').datepicker();
  /script
 
 
  (7) This is the new website:
 
  Date:
  Hello
  World
 
 
  A click on Hello makes World disappear, so this jQuery function works.
 But
  the other jQueery-function datepicker does not show any reaction. I have
  tried some other functions: neither of these functions did work.
 
  Maybe there is only a very small error - but I cannot find it.
  Any ideas?
 
  Regards, Martin
 



 --
 Branko Vukelic

 stu...@brankovukelic.com
 http://www.brankovukelic.com/



Re: [web2py] jQuery - need help !

2011-01-03 Thread Branko Vukelić
Ah I see now, you are using the response object. First remove this:

response.files.insert(4,URL('static','js/jquery-ui-1.8.7.custom.min.js'))

And then, after the web2py_ajax.html include line in layout.html:

script
$ = jQuery;
/script

And then load the jquery-ui:

script 
src={{=%URL('static','js/jquery-ui-1.8.7.custom.min.js')}}/script

Please check the {{= syntax. It's been a while since I used web2py so
I don't remember the correct syntax.


On Mon, Jan 3, 2011 at 4:59 PM, Martin Weissenboeck mweis...@gmail.com wrote:
 Sorry - where shall I put these lines?
 Into default/index.html, before {{extend 'layout.html')}} ?


 2011/1/3 Branko Vukelić stu...@brankovukelic.com

 They are all called .custom, though.

 I think it doesn't run with jQuery in compatibility mode. For testing
 purposes try this _before_ loading the jQuery UI scripts:

    script
    $ = jQuery;
    /script

 On Mon, Jan 3, 2011 at 3:50 PM, David J da...@styleflare.com wrote:
  I think you don't have the full jquery ui  package. I see you have
  custom
 
  On Jan 3, 2011 9:45 AM, Martin Weissenboeck mweis...@gmail.com
  wrote:
  Hi,
  I want to use jQuery UI. I have tried a lot of things during the last
  two
  days, but nothing worked.
  I have read http://jqueryui.com/docs/Getting_Started and I have done
  the
  following steps:
 
  (1) Download jquery-ui-1.8.7.custom.zip from
  http://jqueryui.com/download
 
  (2) Unzip this file
 
  (3) Copy download\...\js\jquery_ui_1.8.7.custom.min.js to
  web2py: js/jquery_ui_1.8.7.custom.min.js
 
  (4) Copy download\...\css\smoothness\jquery_ui_1.8.7.custom.css to
  web2py: css/smoothness/jquery_ui_1.8.7.custom.css
 
  (5) Add the following lines in web2py_ajax.html after
  response.files.insert(2,URL('static','js/calendar.js'))
 
 
 
 
  response.files.insert(3,URL('static','css/smoothness/jquery-ui-1.8.7.custom.css'))
 
  response.files.insert(4,URL('static','js/jquery-ui-1.8.7.custom.min.js'))
 
  (6) Change default/index.html to:
 
  {{extend 'layout.html'}}
  Date: input type=text name=date id=date
  div class=one id=aHello/div
  div class=two id=bWorld/div
 
 
  script
  jQuery('.one').click(function(){jQuery('.two').slideToggle()});
  jQuery('#date').datepicker();
  /script
 
 
  (7) This is the new website:
 
  Date:
  Hello
  World
 
 
  A click on Hello makes World disappear, so this jQuery function works.
  But
  the other jQueery-function datepicker does not show any reaction. I
  have
  tried some other functions: neither of these functions did work.
 
  Maybe there is only a very small error - but I cannot find it.
  Any ideas?
 
  Regards, Martin
 



 --
 Branko Vukelic

 stu...@brankovukelic.com
 http://www.brankovukelic.com/






-- 
Branko Vukelic

stu...@brankovukelic.com
http://www.brankovukelic.com/