Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/d6y/lift_xhtml_checkboxes_question
https://github.com/d6y/lift_xhtml_checkboxes_question
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/d6y/lift_xhtml_checkboxes_question
- Owner: d6y
- Created: 2011-05-06T13:49:53.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2011-05-06T16:56:19.000Z (over 13 years ago)
- Last Synced: 2023-03-10T19:08:48.518Z (almost 2 years ago)
- Language: Scala
- Homepage:
- Size: 906 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.markdown
Awesome Lists containing this project
README
Problem resolved
================Upgraded to JQuery 1.6 and used $(checkbox).props('checked') rather than attr. Useful discussion at: http://api.jquery.com/prop/
Description of the original problem
===================================Use of a custom JavaScript function to enable or disable a number of checkboxes by class name, using JQuery 1.4, appears to have different behaviour when called inside a Lift app then when called outside a Lift app.
Running the example
===================Prior to commit 5a43eaf86ecb4b032355 ....
This Lift 2.3 SBT project contains:
* static.html - a hand-crafted minimal HTML file which when opened in a browser will load JQuery from Google's CDN, load src/main/webapp/foo.js and will function as expected. That is, checking any checkbox will toggle all the check boxes on the page.
* the lift_xhtml - default lift app (sbt jetty-run) which contains the use of the above function which does not work as expected. It seems as if the checking of the checkbox produces a different value compared to static.html
* out.html - which is the lift app index page cURLed to the file system, with links to jquery and foo.js corrected to access these files from 127.0.0.1:8080. Open this in a browser (e.g., open out.html on a Mac) and the checkboxes function as expected.
* mk_outside_lift.sh - the script to create out.html