[jQuery] Re: Please TEST? Re: Safari crash and burn on Accordion form
MichaelEvangelista wrote: update - it was actually super easy to sniff for Safari and to replace the calls to the accordion function with plain ol' jQuery .slideUp() and .slideDown() My only safari version is via Browsercam - and I really can't tell how the animation looks. http://comparemyagent.com/fa/testsafari.cfm If anybody with a safari browser would care to check... should I use another method besides slideUp/down? Is it fairly smooth? Also, this thing was crashing safari before I made my changes. Now it should 1) pop up an alert Yep 2) require some fields on each tab by clicking 'next' but not by clicking 'back' 3) be able to go back and forth from the 3rd panel no problem Towards the bottom of the form, I guess where the Next should be, I actually get: The error occurred in /vservers/gwssite/htdocs/fa/inc/include_fa_buy.cfm: line 154 152 : label for=recordClientCommentsBuy class=inputDo you have any specific requests?/label 153 : textarea name=recordClientCommentsBuy id=recordClientCommentsBuy class=inputclass onfocus=this.value = '' 154 : cfoutput#exampleText1#/cfoutput/textareabr / and a stack trace. You're getting there ;-) Howie (whose own .getJSON calls never seem to call their callbacks in Safari 2)
[jQuery] Validation plugin errors on IE6
This is just plain infuriating, this piece code works perfectly well on FF 2, on IE6 , it just causes errors: // ERROR error - object does´t support this property or method code 0 // CODE var container = $('#error_container'); $(#login_form).validate({ errorContainer: container, errorLabelContainer: $(ol, container), wrapper: 'li', meta: validate, event: keyup }); // end validate $(#password_lost).validate({ errorContainer: container, errorLabelContainer: $(ol, container), wrapper: 'li', meta: validate, event: keyup }); // end validate Firebug mentions no errors, and if it works well in FF how else can one test it, I commented out everything else that could cause problems Does anyone have any ideas?
[jQuery] Re: Validation plugin errors on IE6
wattaka schrieb: This is just plain infuriating, this piece code works perfectly well on FF 2, on IE6 , it just causes errors: [...] Does anyone have any ideas? Could you please give the latest revision a try? http://dev.jquery.com/view/trunk/plugins/validate/ I haven't managed to just release a fix yet... -- Jörn
[jQuery] Setting radio button values
I have a page that retreives values from a database using an ajax call. Then I take those values and try to populate a web form. The problem I'm having is with radio buttons. I try setting them using the following line: $(#Gender).val(jsonData.feedback.Gender); where gender is 2 radio buttons with id=Gender one has the value male and the other female. This however does not appropriately display the radio button checked. If you subsequently query the radio button value (like with an alert), it will display the appropriate value, indicating that setting it was successful but the display does not work. Any ideas would be greatly appreciated.
[jQuery] using jcarousel as image viewer - how to load large image onclick with loading animation
I'm trying to use the excellent jcarousel plugin to create an image viewer/slideshow for a friends site I am a real newbie my first post so go easy on me :) Can someone point me in the right direction how to load an image on demand with some sort of callback so a loading image can be displayed and the image fade in when ready. Currently I'm preloading all images which is so-so but definitely not ideal and the fade doesn't work correctly if an image is not loaded Is this heading in the right direction? $(.jcarousel-item).click( function() { s =$(this).children(a).attr(href); a =$(this).children(a).attr(title); // switch $(#large).fadeout(); $(#loader).show(); //load and get some sort of return when loaded // to turn off loading and fade in image // psuedocode loaded = function(){ return $(#large).bind('load', function() { if(s) this.src = s; }).trigger('load'); } // psuedocode if(loaded) { $(#large).attr({ alt: a}); $(#loader).hide(); $(#large).fadeIn(slow); } }); I'm trying to achieve: a. When the user clicks on the thumbnail it gets the link href title and uses them to set the src alt tag on the main image. (DONE) b. Next image should fadein without flashing the same image (DONE not very well) currently using $(#large).hide().attr({ src: s, alt: a}).fadeIn(slow); // this only works if the image has totally loaded otherwise the old image fades in then it switches c. Preload the first x number of main images to match the initially displayed thumbs with the remainder loading on demand and showing a loading animation (NOT DONE) Thanks very much for any and all help Brad
[jQuery] JSON Help?
I think my generated json code is messed up, but for the life of me, I can't see it. In *some* cases, my $.ajax() call process the results properly, in others it triggers the Error callback, but doesn't actually have an error. I've asked about this before and the responses I got then aren't helping right now. Hopefully I'm just blind. I've posted the code in question below, as well as the resulting JSON, and a formatted version of the JSON as well. This JSON code works fine when I plug it into a Javascript variable manually. (Some sections of the $.ajax() call have been snipped for brevity - these snipped sections are not causing grief though) It might be that it's late and I've got tunnel vision, but I can't see why this isn't working. Any tips are appreciated. Shawn Here's the $.ajax() call: - $(#filtertable #filter).click(function () { var p = oid= + $(#client_id).val(); //other code snipped for building up the parameter string $.ajax({ type: post, url: xhr/filter.php?r= + Math.random(), data: p, dataType: json, success: function (json) { //code to build a table goes here // $(#filterResults).html(myTable); }, error: function (a,b,c) { $(#filterResults).text(a.responseText); //$(#msg).html(a.responseText).slideDown(slow); } }); return false; }); Here's a sample of the JSON results that are not working: --- ([ { id: 124, organization: XYZ Corp, start: new Date(2007-09-30 13:30:00), end: new Date(2007-09-30 19:00:00), duration: 5.5, worktype: Programming, project: Projext X, description: Scans. Fixed a number of reported problems, and some un-reported issues. Cleaned up the table sorting, and added sort direction indicators. Created an \eye\ image for the view icon (replacing the disk icon). Fixed the file path so that it actually had a path on the search results. Files can now be opened from the search results (when using IE on the local network). Fixed the update routine that was badly broken (but not reported yet). Moved the search results into separate tabs for each job type. Tested the site in IE - took some time tracking down an IE specific bug. Records are loading fine if there is a location record (which is now required, so old testing data could be troublesome). Changed the menu as requested to put Scans under the Job Search menu item. Tried to upload, VPN problems prevented this. Will talk with Norm., billed: null }, { id: 123, organization: XYZ Corp, start: new Date(2007-09-16 12:00:00), end: new Date(2007-09-16 17:00:00), duration: 5, worktype: Programming, project: Projext X, description: Fixed up the remaining interface issues with Scanned Jobs. The search results are now listing things as they should, and the files can be viewed from the results list, or the record could be edited. Added sortable table columns to the search results. Fixed the load routine to properly populate a job when selecting one from the search results. Changed the menu item to \Scanned Jobs\ from \Unregistered Jobs\. Uploaded the changes to the live server, notified Norm., billed: null }, { id: 122, organization: XYZ Corp, start: new Date(2007-09-09 12:00:00), end: new Date(2007-09-09 17:00:00), duration: 5, worktype: Programming, project: Projext X, description: Continued on Scanned Jobs. Fixing the save routine for multiple columns. The bit mask should mean we have one record for all quarters\/sections in the same twp, but we are getting one record for EACH quarter in the twp. Fixed this by moving the bit mask processing into JavaScript, rather than CF and\/or SQL., billed: null }, { id: 95, organization: XYZ Corp, start: new Date(2007-09-04 19:10:00), end: new Date(2007-09-04 23:10:00), duration: 4, worktype: Programming, project: Projext X, description: Scanned Jobs. Got the interface to handle multiple locations functioning properly. Moving to other townships clears the grid, and selects any existing selected locations in the new township\/range\/meridian. Got the interface to highlight the corresponding location in the location list when the grid is hovered over, or in the grid when the location list is hovered over. Set the township text box to have focus when the page is loaded., billed: null } ]) And the same JSON code formatted a little better ( [ { id: 124, organization: XYZ Corp, start: new Date(2007-09-30 13:30:00), end: new Date(2007-09-30 19:00:00), duration: 5.5, worktype: Programming, project: Projext X, description: Scans. Fixed a number of reported problems, and some un-reported issues. Cleaned up the table sorting , and added sort direction indicators. Created an \eye\ image for the view icon
[jQuery] .click function running multiple times
Hi all. This piece of code runs in FF only once as expected, the click gets called once, but it gets called multiple times in IE6, can someone tell me what I am doing wrong? Its the second click below. Not the livequery click Thanks // CODE $('#intended_branch_container .delete').livequery('click', function(event) { if($(this).parent().attr(clone) == 0){ //alert(not deleteable); } else{ $(this).parent().remove(); }; }); $(#add_intended_branch).click(function(){ if($('#intended_branch_container select').size() maxValues){ var suffix = rand(maxRndValue); $('#intended_branch_value').clone().attr('id', 'intended_branch_value' + suffix).attr('clone', suffix).find('*').each(function() { var ident = String(this.name); changed= ident.substring(0 ,ident.lastIndexOf('-') +1) + suffix; $(this).removeAttr(id); $(this).removeAttr(name); this.name += changed; this.id += changed; $(this).attr(clone, changed); }).end().appendTo('#intended_branch_container'); } else{ alert(you cant add any more!); }// end else }); // end click
[jQuery] Re: Thanks to all the jQuery developers out here
Peter, Very nice! You might note that the week shown on the current set of cards tho runs from October 6 to October 6 (a very short week indeed! :-) Howard On Oct 5, 12:07 pm, vulgarisoverip [EMAIL PROTECTED] wrote: 1.2 has been a dream come true, fixing a lot of the little animation bugs I found in the past. With it, I was able to convince my boss to create a Word of the Day page (https://www.appelrouthtutoring.com/ wod.php) in HTML/Javascript instead of Flash. It's more accessible now and A LOT easier to maintain. I would never have been able to do it without jQuery. Thanks! Peter
[jQuery] jcarousel vertical safari bug
Hi, Trying to implement jcarousel in a website the horizontal jcarousel works perfect in safari but the arrows on the vertical doesn't work. Tried in safari 2.04 and safari 3. ie and firefox are ok. checked the example on the webpage http://sorgalla.com/projects/jcarousel/examples/static_vertical.html doesn't work either. Can someone help please.
[jQuery] Re: Validation plugin errors on IE6
I have also found that the unpacked version works fine, but the packed version doesn't work on IE6. I tried repacking without base62encode and shrink variables checked, to no avail. I get error something like missing '(' in regular expression. -- Josh - Original Message - From: wattaka [EMAIL PROTECTED] To: jQuery (English) jquery-en@googlegroups.com Sent: Saturday, October 06, 2007 6:11 AM Subject: [jQuery] Re: Validation plugin errors on IE6 Hi Jörn, The valide.js works, the validate pack does not, same error as before. Thanks. Just let me know, I´ll be glad to test. On Oct 6, 12:41 pm, Jörn Zaefferer [EMAIL PROTECTED] wrote: wattaka schrieb: This is just plain infuriating, this piece code works perfectly well on FF 2, on IE6 , it just causes errors: [...] Does anyone have any ideas? Could you please give the latest revision a try?http://dev.jquery.com/view/trunk/plugins/validate/ I haven't managed to just release a fix yet... -- Jörn
[jQuery] force page to load content from another page
I need the page to be forced to load content EACH TIME the page loads. If I do this: $(document).ready(function(){ $('#target').load('create.cfm'); }); The page will grab the stuff from create.cfm and load it into the div as it should. (Note: Create.cfm contains the current timestamp) The problem is that if I use the back button or forward button and come back to the page, when that page is displayed again, the load function never fires again and thus I see a cached timestamp that is not valid. I am looking for a way to FORCE the page to load dynamic content from another page, EACH TIME the page is accessed. A good example of this is at: http://recaptcha.net/fastcgi/demo/recaptcha to see it in action fill out the form incorrectly, then press the back button. You will see that you are not presented with cached content but rather new, dynamic content. Any of you guru's out there have any ideas?
[jQuery] Re: force page to load content from another page
Try using the $.ajax function instead of load (load just does an ajax get), with cache param set to false. -- Josh - Original Message - From: [EMAIL PROTECTED] To: jQuery (English) jquery-en@googlegroups.com Sent: Saturday, October 06, 2007 10:11 AM Subject: [jQuery] force page to load content from another page I need the page to be forced to load content EACH TIME the page loads. If I do this: $(document).ready(function(){ $('#target').load('create.cfm'); }); The page will grab the stuff from create.cfm and load it into the div as it should. (Note: Create.cfm contains the current timestamp) The problem is that if I use the back button or forward button and come back to the page, when that page is displayed again, the load function never fires again and thus I see a cached timestamp that is not valid. I am looking for a way to FORCE the page to load dynamic content from another page, EACH TIME the page is accessed. A good example of this is at: http://recaptcha.net/fastcgi/demo/recaptcha to see it in action fill out the form incorrectly, then press the back button. You will see that you are not presented with cached content but rather new, dynamic content. Any of you guru's out there have any ideas?
[jQuery] Re: force page to load content from another page
Thanks for the idea. I tired it by switching my load code out with the code below but still no luck. When I watch firebug I can see create.cfm be called when I first hit the page, but when I use the forward and back button to hit the page it never calls create.cfm again (until I manually refresh) Here is the .ajax code: $(document).ready(function(){ $.ajax({ url: create.cfm, cache: false, success: function(html){ $(#target).append(html); } }); On Oct 6, 11:29 am, Josh Nathanson [EMAIL PROTECTED] wrote: Try using the $.ajax function instead of load (load just does an ajax get), with cache param set to false. -- Josh - Original Message - From: [EMAIL PROTECTED] To: jQuery (English) jquery-en@googlegroups.com Sent: Saturday, October 06, 2007 10:11 AM Subject: [jQuery] force page to load content from another page I need the page to be forced to load content EACH TIME the page loads. If I do this: $(document).ready(function(){ $('#target').load('create.cfm'); }); The page will grab the stuff from create.cfm and load it into the div as it should. (Note: Create.cfm contains the current timestamp) The problem is that if I use the back button or forward button and come back to the page, when that page is displayed again, the load function never fires again and thus I see a cached timestamp that is not valid. I am looking for a way to FORCE the page to load dynamic content from another page, EACH TIME the page is accessed. A good example of this is at:http://recaptcha.net/fastcgi/demo/recaptchato see it in action fill out the form incorrectly, then press the back button. You will see that you are not presented with cached content but rather new, dynamic content. Any of you guru's out there have any ideas?
[jQuery] TableSorter - Storing Sorted Columns To Restore After Ajax Call
I have a page whereby everytime it receive focus the tables on it refreshes automatically so the user always has the latest data I want to store the currently selected sort order from tablesorter so that after I re-create the table again I can specify what the users sort order was before the table was recreated Any suggestions on how I do that? I see using FireBug that the sorted columns have sortcol, sortdesc in them but was wondering if there was an existing to get this data rather than coming up with my own method. -- View this message in context: http://www.nabble.com/TableSorter---Storing-Sorted-Columns-To-Restore-After-Ajax-Call-tf4580714s27240.html#a13076005 Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Re: JSON Help?
I'm not sure if this is the issue, but I noticed that you have line feeds inside your string values. The server-side JSON parser I use replaces all line breaks within a string value with control characters (in addition to escaping quotes). val.Replace(\, \\\).Replace(\r, ).Replace(\n, \\\n) This may make a difference for you. JK -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of sgrover Sent: Saturday, October 06, 2007 2:49 AM To: jquery-en@googlegroups.com Subject: [jQuery] JSON Help? I think my generated json code is messed up, but for the life of me, I can't see it. In *some* cases, my $.ajax() call process the results properly, in others it triggers the Error callback, but doesn't actually have an error. I've asked about this before and the responses I got then aren't helping right now. Hopefully I'm just blind. I've posted the code in question below, as well as the resulting JSON, and a formatted version of the JSON as well. This JSON code works fine when I plug it into a Javascript variable manually. (Some sections of the $.ajax() call have been snipped for brevity - these snipped sections are not causing grief though) It might be that it's late and I've got tunnel vision, but I can't see why this isn't working. Any tips are appreciated. Shawn Here's the $.ajax() call: - $(#filtertable #filter).click(function () { var p = oid= + $(#client_id).val(); //other code snipped for building up the parameter string $.ajax({ type: post, url: xhr/filter.php?r= + Math.random(), data: p, dataType: json, success: function (json) { //code to build a table goes here // $(#filterResults).html(myTable); }, error: function (a,b,c) { $(#filterResults).text(a.responseText); //$(#msg).html(a.responseText).slideDown(slow); } }); return false; }); Here's a sample of the JSON results that are not working: --- ([ { id: 124, organization: XYZ Corp, start: new Date(2007-09-30 13:30:00), end: new Date(2007-09-30 19:00:00), duration: 5.5, worktype: Programming, project: Projext X, description: Scans. Fixed a number of reported problems, and some un-reported issues. Cleaned up the table sorting, and added sort direction indicators. Created an \eye\ image for the view icon (replacing the disk icon). Fixed the file path so that it actually had a path on the search results. Files can now be opened from the search results (when using IE on the local network). Fixed the update routine that was badly broken (but not reported yet). Moved the search results into separate tabs for each job type. Tested the site in IE - took some time tracking down an IE specific bug. Records are loading fine if there is a location record (which is now required, so old testing data could be troublesome). Changed the menu as requested to put Scans under the Job Search menu item. Tried to upload, VPN problems prevented this. Will talk with Norm., billed: null }, { id: 123, organization: XYZ Corp, start: new Date(2007-09-16 12:00:00), end: new Date(2007-09-16 17:00:00), duration: 5, worktype: Programming, project: Projext X, description: Fixed up the remaining interface issues with Scanned Jobs. The search results are now listing things as they should, and the files can be viewed from the results list, or the record could be edited. Added sortable table columns to the search results. Fixed the load routine to properly populate a job when selecting one from the search results. Changed the menu item to \Scanned Jobs\ from \Unregistered Jobs\. Uploaded the changes to the live server, notified Norm., billed: null }, { id: 122, organization: XYZ Corp, start: new Date(2007-09-09 12:00:00), end: new Date(2007-09-09 17:00:00), duration: 5, worktype: Programming, project: Projext X, description: Continued on Scanned Jobs. Fixing the save routine for multiple columns. The bit mask should mean we have one record for all quarters\/sections in the same twp, but we are getting one record for EACH quarter in the twp. Fixed this by moving the bit mask processing into JavaScript, rather than CF and\/or SQL., billed: null }, { id: 95, organization: XYZ Corp, start: new Date(2007-09-04 19:10:00), end: new Date(2007-09-04 23:10:00), duration: 4, worktype: Programming, project: Projext X, description: Scanned Jobs. Got the interface to handle multiple locations functioning properly. Moving to other townships clears the grid, and selects any existing selected locations in the new township\/range\/meridian. Got the interface to highlight the corresponding location in the location list when the grid is hovered over, or in the grid when the location list is hovered over. Set the township text box to have focus when the page is loaded., billed: null } ]) And the same
[jQuery] Re: More Superfish Questions
What do you mean by collapsible ? sounds like an accordion to me... Superfish is an improved version of suckerfish. Suckerfish makes pure css menu compatible with IE. Pseudo-classes like :hover are only possible on a elements in IE. Pure css menus require :hover to be possible on li elements. For IE, Suckerfish attaches by javascript a css class named sfHover to the lis using onmouseover and removes it with onmouseout. Try to look at Suckerfish/Superfish menu in FF with js disable and you will see that it is still working. AFAIK there is no :click pseudo-class in css. Altough it may be sometimes useful (clients and PM often want that kind of last minutes changes), it seems to be deviant from the suckerfish spirit to try to use it on click. But maybe you actually just need something like that : (assuming your menu has the class nav) $(document).ready(function(){ $(ul.nav li).each(function(){ $(this).toggle( function(){ $(this).children(ul).hide(); }, function(){ $(this).children(ul).show(); } ); }); -Olivier Ryura wrote: Hello again, We've decided we wish to do a collapsible menu (on click) with Superfish instead of the general drop down onmouseover. Is this possible with Superfish or should I look into getting another plugin? If it is possible, how would I go about doing it? Thanks, Ryura
[jQuery] Re: force page to load content from another page
Forward and back button is a different story...I think there may be a plugin for that? -- Josh - Original Message - From: [EMAIL PROTECTED] To: jQuery (English) jquery-en@googlegroups.com Sent: Saturday, October 06, 2007 10:40 AM Subject: [jQuery] Re: force page to load content from another page Thanks for the idea. I tired it by switching my load code out with the code below but still no luck. When I watch firebug I can see create.cfm be called when I first hit the page, but when I use the forward and back button to hit the page it never calls create.cfm again (until I manually refresh) Here is the .ajax code: $(document).ready(function(){ $.ajax({ url: create.cfm, cache: false, success: function(html){ $(#target).append(html); } }); On Oct 6, 11:29 am, Josh Nathanson [EMAIL PROTECTED] wrote: Try using the $.ajax function instead of load (load just does an ajax get), with cache param set to false. -- Josh - Original Message - From: [EMAIL PROTECTED] To: jQuery (English) jquery-en@googlegroups.com Sent: Saturday, October 06, 2007 10:11 AM Subject: [jQuery] force page to load content from another page I need the page to be forced to load content EACH TIME the page loads. If I do this: $(document).ready(function(){ $('#target').load('create.cfm'); }); The page will grab the stuff from create.cfm and load it into the div as it should. (Note: Create.cfm contains the current timestamp) The problem is that if I use the back button or forward button and come back to the page, when that page is displayed again, the load function never fires again and thus I see a cached timestamp that is not valid. I am looking for a way to FORCE the page to load dynamic content from another page, EACH TIME the page is accessed. A good example of this is at:http://recaptcha.net/fastcgi/demo/recaptchato see it in action fill out the form incorrectly, then press the back button. You will see that you are not presented with cached content but rather new, dynamic content. Any of you guru's out there have any ideas?
[jQuery] JSS - New Plug-in
Hi Guys, This is a plug-in that was thrown together in a few spare hours after chatting with some people at FOWA last week, I hadn't had much sleep at the time so it's still a bit rough round the edges. In a nutshell though it gives you full support for all jQuery selectors from within your CSS files in a totally unobtrusive mannor. This effectively means cross browser CSS3 support via JavaScript. You can find out more and grab it from: http://andykent.bingodisk.com/bingo/public/jss/ Any feedback, good or bad would be appreciated. Thanks, Andy.
[jQuery] Re: JSS - New Plug-in
This looks interesting. Would it fix this problem here? http://www.commadot.com/jquery/cssAND.php Glen On 10/6/07, Andy Kent [EMAIL PROTECTED] wrote: Hi Guys, This is a plug-in that was thrown together in a few spare hours after chatting with some people at FOWA last week, I hadn't had much sleep at the time so it's still a bit rough round the edges. In a nutshell though it gives you full support for all jQuery selectors from within your CSS files in a totally unobtrusive mannor. This effectively means cross browser CSS3 support via JavaScript. You can find out more and grab it from: http://andykent.bingodisk.com/bingo/public/jss/ Any feedback, good or bad would be appreciated. Thanks, Andy.
[jQuery] Re: Off-line documentation
There are a few I have seen, but all for 1.1, not 1.2. When the 1.2 xml is released, I think we should have some new hard copies around. Glen On 10/6/07, Christopher Jordan [EMAIL PROTECTED] wrote: I seem to remember reading once that I could download the jQuery documentation for use off-line. I've looked a little, but couldn't find it. Does anyone remember if this is so? And if so, where do I get it? Cheers, Chris -- http://cjordan.us
[jQuery] Re: force page to load content from another page
I'm pretty sure the history plug-in works when navigating in a single-page architecture (hijacking deep links like foo.html#deeplink), but it sounds like this is an issue related more to the caching of a page in memory. You may be stuck with forcing the given page not to cache. Best to do it on the server level with stuff like: % Response.CacheControl = no-cache % % Response.AddHeader Pragma, no-cache % % Response.Expires = -1 % or: header(Cache-Control: no-cache, must-revalidate); header(Expires: Mon, 26 Jul 1997 05:00:00 GMT); header(Pragma: no-cache); Alternatively you can try to use META tags: meta http-equiv=Cache-Control content=no-cache meta http-equiv=Expires content=01 Jan 1970 00:00:00 GMT meta http-equiv=Pragma content=no-cache But there are some issues with using META tags. Further reading: http://support.microsoft.com/kb/234067/EN-US/ http://support.microsoft.com/kb/222064 http://www.hunlock.com/blogs/Mastering_The_Back_Button_With_Javascript#quickIDX4 I looked at the recaptcha site and it looks like for items they do not want cached they're setting the stuff above at the server level (according to Firebug). For instance, the image (text.gif) with the two words in it has the following settings: Cache-Control: no-store,no-cache,must-revalidate Pragma: no-cache Best to play around and figure out what works best for your client/server environment. Good luck, Brian. On 10/6/07, Josh Nathanson [EMAIL PROTECTED] wrote: Forward and back button is a different story...I think there may be a plugin for that? -- Josh - Original Message - From: [EMAIL PROTECTED] To: jQuery (English) jquery-en@googlegroups.com Sent: Saturday, October 06, 2007 10:40 AM Subject: [jQuery] Re: force page to load content from another page Thanks for the idea. I tired it by switching my load code out with the code below but still no luck. When I watch firebug I can see create.cfm be called when I first hit the page, but when I use the forward and back button to hit the page it never calls create.cfm again (until I manually refresh) Here is the .ajax code: $(document).ready(function(){ $.ajax({ url: create.cfm, cache: false, success: function(html){ $(#target).append(html); } }); On Oct 6, 11:29 am, Josh Nathanson [EMAIL PROTECTED] wrote: Try using the $.ajax function instead of load (load just does an ajax get), with cache param set to false. -- Josh - Original Message - From: [EMAIL PROTECTED] To: jQuery (English) jquery-en@googlegroups.com Sent: Saturday, October 06, 2007 10:11 AM Subject: [jQuery] force page to load content from another page I need the page to be forced to load content EACH TIME the page loads. If I do this: $(document).ready(function(){ $('#target').load('create.cfm'); }); The page will grab the stuff from create.cfm and load it into the div as it should. (Note: Create.cfm contains the current timestamp) The problem is that if I use the back button or forward button and come back to the page, when that page is displayed again, the load function never fires again and thus I see a cached timestamp that is not valid. I am looking for a way to FORCE the page to load dynamic content from another page, EACH TIME the page is accessed. A good example of this is at:http://recaptcha.net/fastcgi/demo/recaptchato see it in action fill out the form incorrectly, then press the back button. You will see that you are not presented with cached content but rather new, dynamic content. Any of you guru's out there have any ideas?
[jQuery] OT: Page layout issues
Although I'm using jQ on this project, this particular issue is CSS related, not jQ related. I'm having a fairly minor layout problem, but I've been trying to resolve it forever, and getting no-where. Hopefully some can shed some light on the problem. Here's the URL: http://skidoo.solidgone.com/ Firefox and IE7 both display correctly. Problem(s): 1] Safari Opera: each tab seem to be shifted up 1px or so. I have no idea why this is shifting. 2] IE6: 2a] the whole tab-holder is shifted down 1px; 2b] there is a #FDFDFA bottom-border on selected tabs. I could fix [2a] shift problem using an IE6 specific padding-top of 10px, but the I suspect I have something wrong with the basic layout that's causing the problems in Safari and Opera. If not, then I have no issue using a browser specific fix. Technical: The primary CSS files being used are Skidoo.css, and color-darkblue.css. The main css elements are in the section labeled Tabs starting with class .tabHolder. Any insight is appreciated. ~ ~ Dave
[jQuery] Dimensions plugin, offset['top'] returns 0 regardless of position
I'm finding that the Dimensions plugin sometimes doesn't return the top position of an element, just returns zero. (Sometimes works perfectly though.) Here is my code, sanitized for the forum software. // Finds the height that an element should be to be X number of pixels from the // bottom of the window using JQuery Dimensions plugin. f...n findHeight elem, bottomPad var height = 0; var windowHeight = $(window).height(); var elemOffset = $(elem).offset(); var elementTop = elemOffset['top']; height = windowHeight - elementTop - bottomPad; return height; What happens is that sometimes the elemOffset just turns out to be 0, 0, 0, 0 even though the element is pushed down in the window. I've tried setting relativeTo body but that doesn't help. Background: I'm trying to the bottom of some element is always 20 px from the bottom of the window. I don't want to use absolute positioning on this particular element because that would mess up a bunch of other things. I'm trying to calculate element height that would put the bottom where I want it. Any help would be greatly appreciated. Thanks! E -- View this message in context: http://www.nabble.com/Dimensions-plugin%2C-offset-%27top%27--returns-0-regardless-of-position-tf4581708s27240.html#a13078975 Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Figured it out
jarrod wrote: I'm finding that the Dimensions plugin sometimes doesn't return the top position of an element, just returns zero. (Sometimes works perfectly though.) Right after I posted I realized that it was because the element was hidden. I changed the method to first show the element, then get the offset and that works. Any comments still welcome of course. Thanks, E -- View this message in context: http://www.nabble.com/Dimensions-plugin%2C-offset-%27top%27--returns-0-regardless-of-position-tf4581708s27240.html#a13079013 Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Re: TableSorter - Storing Sorted Columns To Restore After Ajax Call
Your quite welcome to use the tablesorter cookie widget. http://www.jdempster.com/category/code/jquery/tablesortercookiewidget/ On Oct 6, 6:54 pm, zacware [EMAIL PROTECTED] wrote: I have a page whereby everytime it receive focus the tables on it refreshes automatically so the user always has the latest data I want to store the currently selected sort order from tablesorter so that after I re-create the table again I can specify what the users sort order was before the table was recreated Any suggestions on how I do that? I see using FireBug that the sorted columns have sortcol, sortdesc in them but was wondering if there was an existing to get this data rather than coming up with my own method. -- View this message in context:http://www.nabble.com/TableSorter---Storing-Sorted-Columns-To-Restore... Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Re: JSS - New Plug-in
A question. Probably I do not get itbut how you could use it in real world? I mean what you think this should be helpfull. Looks quite interesting but I do not get it completely. Andrea On 6 oct, 18:51, Glen Lipka [EMAIL PROTECTED] wrote: This looks interesting. Would it fix this problem here?http://www.commadot.com/jquery/cssAND.php Glen On 10/6/07, Andy Kent [EMAIL PROTECTED] wrote: Hi Guys, This is a plug-in that was thrown together in a few spare hours after chatting with some people at FOWA last week, I hadn't had much sleep at the time so it's still a bit rough round the edges. In a nutshell though it gives you full support for all jQuery selectors from within your CSS files in a totally unobtrusive mannor. This effectively means cross browser CSS3 support via JavaScript. You can find out more and grab it from: http://andykent.bingodisk.com/bingo/public/jss/ Any feedback, good or bad would be appreciated. Thanks, Andy.
[jQuery] Re: JSON Help?
Thanks. I'll look into this. The various fields are escaped with PHP's json_encode function. So I'll see if I need to pre-process line feeds. Shawn Jeffrey Kretz wrote: I'm not sure if this is the issue, but I noticed that you have line feeds inside your string values. The server-side JSON parser I use replaces all line breaks within a string value with control characters (in addition to escaping quotes). val.Replace(\, \\\).Replace(\r, ).Replace(\n, \\\n) This may make a difference for you. JK -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of sgrover Sent: Saturday, October 06, 2007 2:49 AM To: jquery-en@googlegroups.com Subject: [jQuery] JSON Help? I think my generated json code is messed up, but for the life of me, I can't see it. In *some* cases, my $.ajax() call process the results properly, in others it triggers the Error callback, but doesn't actually have an error. I've asked about this before and the responses I got then aren't helping right now. Hopefully I'm just blind. I've posted the code in question below, as well as the resulting JSON, and a formatted version of the JSON as well. This JSON code works fine when I plug it into a Javascript variable manually. (Some sections of the $.ajax() call have been snipped for brevity - these snipped sections are not causing grief though) It might be that it's late and I've got tunnel vision, but I can't see why this isn't working. Any tips are appreciated. Shawn Here's the $.ajax() call: - $(#filtertable #filter).click(function () { var p = oid= + $(#client_id).val(); //other code snipped for building up the parameter string $.ajax({ type: post, url: xhr/filter.php?r= + Math.random(), data: p, dataType: json, success: function (json) { //code to build a table goes here // $(#filterResults).html(myTable); }, error: function (a,b,c) { $(#filterResults).text(a.responseText); //$(#msg).html(a.responseText).slideDown(slow); } }); return false; }); Here's a sample of the JSON results that are not working: --- ([ { id: 124, organization: XYZ Corp, start: new Date(2007-09-30 13:30:00), end: new Date(2007-09-30 19:00:00), duration: 5.5, worktype: Programming, project: Projext X, description: Scans. Fixed a number of reported problems, and some un-reported issues. Cleaned up the table sorting, and added sort direction indicators. Created an \eye\ image for the view icon (replacing the disk icon). Fixed the file path so that it actually had a path on the search results. Files can now be opened from the search results (when using IE on the local network). Fixed the update routine that was badly broken (but not reported yet). Moved the search results into separate tabs for each job type. Tested the site in IE - took some time tracking down an IE specific bug. Records are loading fine if there is a location record (which is now required, so old testing data could be troublesome). Changed the menu as requested to put Scans under the Job Search menu item. Tried to upload, VPN problems prevented this. Will talk with Norm., billed: null }, { id: 123, organization: XYZ Corp, start: new Date(2007-09-16 12:00:00), end: new Date(2007-09-16 17:00:00), duration: 5, worktype: Programming, project: Projext X, description: Fixed up the remaining interface issues with Scanned Jobs. The search results are now listing things as they should, and the files can be viewed from the results list, or the record could be edited. Added sortable table columns to the search results. Fixed the load routine to properly populate a job when selecting one from the search results. Changed the menu item to \Scanned Jobs\ from \Unregistered Jobs\. Uploaded the changes to the live server, notified Norm., billed: null }, { id: 122, organization: XYZ Corp, start: new Date(2007-09-09 12:00:00), end: new Date(2007-09-09 17:00:00), duration: 5, worktype: Programming, project: Projext X, description: Continued on Scanned Jobs. Fixing the save routine for multiple columns. The bit mask should mean we have one record for all quarters\/sections in the same twp, but we are getting one record for EACH quarter in the twp. Fixed this by moving the bit mask processing into JavaScript, rather than CF and\/or SQL., billed: null }, { id: 95, organization: XYZ Corp, start: new Date(2007-09-04 19:10:00), end: new Date(2007-09-04 23:10:00), duration: 4, worktype: Programming, project: Projext X, description: Scanned Jobs. Got the interface to handle multiple locations functioning properly. Moving to other townships clears the grid, and selects any existing selected locations in the new
[jQuery] How to check for specified fonts
Back in the day, using HTML 4.01, I could check for the presence of a specified font (different from the default monospace font) by placing a DIV containing a couple of SPANs, absolutely positioned off-screen using this kind of arrangement (I'm spreading the tags because I don't know how this forum treats HTML tags): HTML: div id=tester span id=test font id=testfont face=monospace Some well- chosen sample text /font /span span id=ctrl Some well-chosen sample text /span /div CSS: #tester { position:absolute; top:-5000px; } #test, #ctrl { font-size: 30px; } #ctrl { font-family: monospace; } and then using a script method like this: JavaScript: function IsItThere( fontname ) { document.getElementById( testfont ).face = fontname + , monospace; var test = document.getElementById( test ); var ctrl = document.getElementById( ctrl ); return ( test.offsetWidth != ctrl.offsetWidth ); } Of course, that doesn't work using XHTML because the font tag isn't valid. I thought jQuery could come to the rescue, with a minor revision like this: HTML: div id=tester span id=test style=font-family:monospace; Some well-chosen sample text /span span id=ctrl Some well-chosen sample text /span /div Same CSS as before. JavaScript: function IsItThere( fontname ) { $(#test).css(font-family, fontname + , monospace ); return ( $(#test).width() != $(#ctrl).width() ); } But it doesn't work. The #test and #ctrl stubbornly report the same width all the time, regardless of the font-family setting. Does anyone have an alternative suggestion? Thanks in advance.
[jQuery] Re: Problems with Firefox
You're going to need to at least provide some code if you want a decent response from anyone. Sent from my iPhone On Oct 6, 2007, at 8:26 PM, tramblie [EMAIL PROTECTED] wrote: Several JQuery APIs won't work with Firefox (2.0.0.7). Has someone noticed the same problem? Is it a bug, an incompatibility or what?
[jQuery] Re: How to check for specified fonts
I set up a test and added some debugging code and it works for me. Here is the relevant stuff so you can see how it differs. HTML: div id=tester span id=testSome well-chosen sample text/span span id=ctrlSome well-chosen sample text/span /div JS: function IsItThere( fontname ){ $(#test).css(font-family, fontname + , monospace ); var testWidth = $(#test).width(); var ctrlWidth = $(#ctrl).width(); console.log('testWidth: '+testWidth); console.log('testWidth: '+ctrlWidth); return ( testWidth != ctrlWidth ); } $(function(){ $(document).click(function() { IsItThere('Arial'); }); }); I made is so you click the page anywhere and the width values are displayed in the Firebug console. Joel Birch.
[jQuery] Re: Off-line documentation
Thanks Glen... where do you suppose I could get the 1.1 offline docs... I just want a sample of it for my ColdFusion Users Group preso next Tuesday. We don't typically have a live internet connection so I can't show them the online documentation. Any help would be great. Thanks, Chris On 10/6/07, Glen Lipka [EMAIL PROTECTED] wrote: There are a few I have seen, but all for 1.1, not 1.2. When the 1.2 xml is released, I think we should have some new hard copies around. Glen On 10/6/07, Christopher Jordan [EMAIL PROTECTED] wrote: I seem to remember reading once that I could download the jQuery documentation for use off-line. I've looked a little, but couldn't find it. Does anyone remember if this is so? And if so, where do I get it? Cheers, Chris -- http://cjordan.us -- http://cjordan.us
[jQuery] Re: Off-line documentation
Ahh, if you are a CF guy, you will like this one: http://www.bennadel.com/blog/961-Convert-jQuery-XML-Documentation-To-HTML-PDF-Using-ColdFusion-And-XSLT.htm Glen On 10/6/07, Christopher Jordan [EMAIL PROTECTED] wrote: Thanks Glen... where do you suppose I could get the 1.1 offline docs... I just want a sample of it for my ColdFusion Users Group preso next Tuesday. We don't typically have a live internet connection so I can't show them the online documentation. Any help would be great. Thanks, Chris On 10/6/07, Glen Lipka [EMAIL PROTECTED] wrote: There are a few I have seen, but all for 1.1, not 1.2 . When the 1.2xml is released, I think we should have some new hard copies around. Glen On 10/6/07, Christopher Jordan [EMAIL PROTECTED] wrote: I seem to remember reading once that I could download the jQuery documentation for use off-line. I've looked a little, but couldn't find it. Does anyone remember if this is so? And if so, where do I get it? Cheers, Chris -- http://cjordan.us -- http://cjordan.us