[jQuery] Re: Moo based Calendar widget
It looks like it also has a number of handy additions to the Date object that might be useful outside of mootools: http://moomonth.com/docs/index.html There some additions to the Date object like this for jQuery by Joern Zaefferer and Brandon Aaron here: http://jqueryjs.googlecode.com/svn/trunk/plugins/methods/date.js If someone wants to build something like the mootools calendar they may want to use my renderCalendar function to do the boring bit of creating the calendar: http://kelvinluck.com/assets/jquery/datePicker/v2/demo/renderCalendar.html Cheers, Kelvin :)
[jQuery] Re: PROBLEM: Adding hover to table rows on large tables
[EMAIL PROTECTED] ha scritto: The following code works fine on small tables: $(table tbody tr).mouseover(function(){$(this).addClass(over);}).mouseout(function(){$(this).removeClass(over);}); But on tables with 5,000-10,000 rows, it throws the A script on this page may be busy, or it may have stopped responding. You can stop the script now, open the script in the debugger, or let the script continue. Can anyone suggest a workaround? Thanks You could try event delegation: $(table tbody).mouseover(function(e){ if(e.target).is(tr) $(e.target).addClass(over); }).mouseout(function(e){ if(e.target).is(tr) $(e.target).removeClass(over); }) Renato
[jQuery] Re: PROBLEM: Adding hover to table rows on large tables
The solution i adopted was CSS (tr:hover) for non-IE6 and only allow small tables to have hover-over using a class name to identify them. Any better solutions? On Nov 6, 10:45 am, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: The following code works fine on small tables: $(table tbody tr).mouseover(function(){$(this).addClass(over);}).mouseout(function(){$(this).removeClass(over);}); But on tables with 5,000-10,000 rows, it throws the A script on this page may be busy, or it may have stopped responding. You can stop the script now, open the script in the debugger, or let the script continue. Can anyone suggest a workaround? Thanks
[jQuery] Major Problem With Dom Traversal
Working on a page with a table of about 10,000 rows and 30 div's, the following takes about 5 seconds $(div.siteWidth).css(width, modifiedW); What am I doing wrong? How can the table be bypassed?
[jQuery] Re: Major Problem With Dom Traversal
It is very likely that the selection can be optimized a lot, but we'd need to see the structure of the HTML better to give advice...
[jQuery] Re: Submit _GET from
Trying to submit a form with a method=get and the usual jquery functions arn't working. All the following work if I'm submitting a 'post' form this.form.submit(); $(form:first).submit(); But can't get the form to submit on when I change the method to 'get' Anybody out there know if this is possible? Of course this is possible. How is it not working? Are you getting errors? Do you have a sample page? We need a little more information to go on.
[jQuery] Ajax IE issue
Hello ! The following code works in Mozilla FF but not IE : $.ajax({ type: GET, url: path,// path to JPG success: function(data){ alert('success ' + path); $('#currentImage').attr('src', path); }, error: function(xhr, status, ex) { var msg = ; msg += status + \n; msg += xhr.status + \n\n; msg += ex; alert('PATH: ' + path); alert('REPORT: ' + msg); } }); What I'm doing is loading an image in ajax way, that way I can display a loading image in the meanwhile. In Mozilla FF the process enters the success callback-function, In IE it enters the error callback-function and get the message 'parse error' with code '200'. Thank you for any help !! -- View this message in context: http://www.nabble.com/Ajax-IE-issue-tf4757688s27240.html#a13605392 Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] missing leftOffset, topOffset in cluetip
Earlier on I tried offsetting the topBottom positioned tip with the topOffset parameter, this had no effect, but I just left it out, achiving a rather variable positioning using margin in css. Today I was trying to fix another bug when I noticed that both the leftOffset and the topOffset are missing completely. --- from the API: --- var defaults = { (...) topOffset:15, // Number of px (...) leftOffset: 15, // Number of px (...) --- have I just misunderstood or is this not supposed to be like this? - John Sverre Solem
[jQuery] Dropdown list to auto populate input boxes
I am hoping someone can help me out and see if they can see why when I select a dropdown list value it is not auto populating into the input text values, the response comes back fine with the xml although it is not update the values in the input form, here is code I am having problems with below. JQuery Code $(document).ready(function() { $(#charity_val).change(function(){ var charity = $(#charity_val).val(); $.post(ajax.php,{ charity_val: charity }, function(xml){ var address = $(address,xml).text(); alert(address); var suburb = $(suburb,xml).text(); var postcode = $(postcode,xml).text(); var state = $(state,xml).text(); var country = $(country,xml).text(); $(#charity_address).attr(value,address); $(#charity_suburb).attr(value,suburb); $(#charity_postcode).attr(value,postcode); $(#charity_state).attr(value,state); $(#charity_country).attr(value,country); }); }); }); php Code header('Content-Type: text/xml; charset=utf-8'); $value = $_REQUEST['charity_val']; $query = mysql_query(SELECT * FROM step_7_charities WHERE id_charity = {$value}); while($row = mysql_fetch_array($query)) { $U['charity_address'] = $row['address']; $U['charity_suburb'] = $row['suburb']; $U['charity_postcode'] = $row['postcode']; $U['charity_state'] = $row['id_state']; $U['charity_country'] = $row['country']; } $returnXML = responseaddress.$U['charity_address']./ addresssuburb.$U['charity_suburb']./suburbpostcode. $U['charity_postcode']./postcodestate.$U['charity_state']./ statecountry.$U['charity_country']./country/response; echo $returnXML; Thankyou
[jQuery] Re: Dynamically created input/button not responding to click event
Thanks, I'll mess with this approach too. On Nov 5, 7:39 pm, cjiang [EMAIL PROTECTED] wrote: My guess is that when you dynamically create a new button, the click event handler won't be bound to it. So if you use livequery plugin, it may work. Something like this: $(function(){ $(.removeButtonClass).livequery('click', function() { alert(handler worked); }) }) On Nov 5, 6:38 pm, Slantedview [EMAIL PROTECTED] wrote: I'm using javascript and Jquery to dynamically create an input button and attempt to respond to a click even for that button. Unfortunately, I can't get the click handler to work. I am creating the button like this: var removeButton = document.createElement(INPUT); removeButton.type = button; removeButton.value = Remove; $(removeButton).addClass(removeButtonClass); $(myDiv).append(removeButton); My event handler looks like this: $(function(){ $(.removeButtonClass).click(function() { alert(handler worked); }) }) In Firebug, I can see that the new input button is being successfully created and the removeButtonClass is successfully being set, but when I click the button the event handler is never called. What am I missing? Regards, Jonathan- Hide quoted text - - Show quoted text -
[jQuery] Dropdown list to auto populate input boxes
Hello All, I need to create a form where when a dropdown list is selected it auto populates a group of input values, so far I have this code but it seems to be getting the values but it is not adding the values to the input fields, any help would be greatly appreciated. Jquery Code $(document).ready(function() { $(#charity_val).change(function(){ var charity = $(#charity_val).val(); $.post(ajax.php,{ charity_val: charity }, function(xml){ var address = $(address,xml).text(); alert(address); var suburb = $(suburb,xml).text(); var postcode = $(postcode,xml).text(); var state = $(state,xml).text(); var country = $(country,xml).text(); $(#charity_address).attr(value,address); $(#charity_suburb).attr(value,suburb); $(#charity_postcode).attr(value,postcode); $(#charity_state).attr(value,state); $(#charity_country).attr(value,country); }); }); }); php Code header('Content-Type: text/xml; charset=utf-8'); $value = $_REQUEST['charity_val']; $query = mysql_query(SELECT * FROM step_7_charities WHERE id_charity = {$value}); while($row = mysql_fetch_array($query)) { $U['charity_address'] = $row['address']; $U['charity_suburb'] = $row['suburb']; $U['charity_postcode'] = $row['postcode']; $U['charity_state'] = $row['id_state']; $U['charity_country'] = $row['country']; } $returnXML = responseaddress.$U['charity_address']./ addresssuburb.$U['charity_suburb']./suburbpostcode. $U['charity_postcode']./postcodestate.$U['charity_state']./ statecountry.$U['charity_country']./country/response; echo $returnXML; Thankyou
[jQuery] Submit _GET from
Hi there, Trying to submit a form with a method=get and the usual jquery functions arn't working. All the following work if I'm submitting a 'post' form this.form.submit(); $(form:first).submit(); But can't get the form to submit on when I change the method to 'get' Anybody out there know if this is possible? Thanks.
[jQuery] Re: Dynamically created input/button not responding to click event
Thanks for the response. I'm all for doing things a better way. On Nov 5, 7:22 pm, Mike Alsup [EMAIL PROTECTED] wrote: var removeButton = document.createElement(INPUT); removeButton.type = button; removeButton.value = Remove; $(removeButton).addClass(removeButtonClass); $(myDiv).append(removeButton); My event handler looks like this: $(function(){ $(.removeButtonClass).click(function() { alert(handler worked); }) }) Here's another approach that takes better advantage of jQuery: $('input type=button value=Remove /') .addClass('removeButtonClass') .appendTo('#myDiv') .bind('click', function() { alert('handler worked'); });
[jQuery] New Plugin jQuery.Rule
Hi, I was needing something to manage css rules and stylesheets.. I looked around and didn't find much. I saw a href=http://www.mail- archive.com/[EMAIL PROTECTED]/msg05598.html target=_blankthis/a post of Brandon, which gave me a few tips. In the end, I decided to make my own plugin for this. It's meant to be as similar to jQuery as possible, meaning the rules are managed using jQuery's way to handle nodes. It includes, chaining, iteration using each, selectors, and many other functions like slice, pushStack, etc. It is in a very early stage, and would thank anyone who can help me out a bit. I'm having some trouble to work around IE missing 'parentStyleSheet' for rules, also some advices wouldn't hurt. Here's the project's page: http://jquery.com/plugins/project/Rule The demo is not very complete but I'll work on it some more soon. I hope some have the time to check. Thanks in advance. Ariel Flesler
[jQuery] Re: Overwrite div with .load()
Actually, the revision I posted works great, just seems a little long winded. Thanks for the advice though. Ryan
[jQuery] Re: Custom function called in toogle()
Didn't works either ... Here is the solution I had found. Instead use the toggle() function, which cause this issue, I use the click() function with an if() statement. function myToggle(checkboxElem, showHideElem){ var showHide = $(showHideElem); var checkbox = $(checkboxElem); checkbox.click( function() { if (checkbox.is(:checked)) { showHide.show('slow'); } else { showHide.hide('slow'); } }); } This works fine now. Thanks for your help Wizzud. Cheers, Damien On Nov 5, 8:09 pm, Wizzud [EMAIL PROTECTED] wrote: Yeah, it was a bit thoughtless of me to suggest it (tired!). Try this instead...(untested)... function myToggle(toggleElem, showHideElem){ var showHide = $(showHideElem); $(toggleElem).toggle( function(){ showHide.show('slow'); toggleElem.checked = ! toggleElem.checked; }, function(){ showHide.hide('slow'); toggleElem.checked = ! toggleElem.checked; } ); } On Nov 5, 2:34 pm, Snook [EMAIL PROTECTED] wrote: I also have tried, like you suggested, to use the .each() function. function myToggle(toggleElem, showHideElem){ var showHide = $(showHideElem); $(toggleElem).toggle( function(){ showHide.show('slow');}, function(){ showHide.hide('slow');} ).each(function() { if ($(toggleElem).is(:checked)) { $(this).attr(checked, ); } else { $(this).attr(checked, checked); } }); } But this is not successful ! On Nov 3, 1:15 am, Wizzud [EMAIL PROTECTED] wrote: function myToggle(toggleElem, showHideElem){ var showHide = $(showHideElem); $(toggleElem).toggle( function(){ showHide.show('slow'); }, function(){ showHide.hide('slow'); } ) .each(function(){ this.checked = !this.checked; }); } On Nov 2, 12:21 pm, Snook [EMAIL PROTECTED] wrote: Calling toggle() runs event.preventDefault. Whatever you want the click to do, you need to code it yourself. Ok, thanks. I have tried different implementation of preventDefault, regarding what I have found in this group. And probably I'm completely wrong because no one works for me. Here is what I have tried: function myToggleShow(toggleElem, showHideElem){ var showHide = $(showHideElem); $(toggleElem).toggle( function(e){ e.eventDefault(); showHide.show('slow'); }, function(){ showHide.hide('slow'); } ); } myToggleShow('#regime_lstd_c', '#regime_lstd'); Did I need an other plugin or library ?
[jQuery] Re: Scripts at the bottom of the page
I read it too Have a look at it : http://developer.yahoo.com/performance/rules.html#js_bottom On Nov 5, 9:42 pm, Guy Fraser [EMAIL PROTECTED] wrote: Sean Catchpole wrote: Is there a good reason why placing scripts at the bottom of a page is a bad idea? By placing them in the head all javascript files must be downloaded before the rest of the page can render. This seems odd since most of the time the javascript needs to wait for the page to be loaded anyway. Other than perhaps organizational issues, are there any good reasons why having the script tags at the bottom of the page is a bad idea? According to YSlow docs, putting JS as far down the page as possible is beneficial.
[jQuery] Re: Interface v1.2 Error with jQuery v1.2.1
So, have anybody found a eq of interface's SlideOutLeft,SlideOutRight,SlideInLeft,SlideOutRight what does work with jQuery 1.2.1 ? On Sep 18, 2:48 am, moltar [EMAIL PROTECTED] wrote: Hi, I am using the latest jQuery v1.2.1 and the latest available Interface v1.2. Here is the sample code that I have broken down to: $(document).ready(function(){ $('a.slide').click(function() { $('#box').SlideOutLeft('normal'); }); }); Firebug goes bananas when the event is fired and keeps looping over the same error, producing thousands of error messages. The error message reads: this.options.curAnim has no properties. Here is the ZIP archive with test files:http://www.mediafire.com/?9eha1idjyyx
[jQuery] Re: Interface v1.2 Error with jQuery v1.2.1
Nicolae Namolovan wrote: So, have anybody found a eq of interface's SlideOutLeft,SlideOutRight,SlideInLeft,SlideOutRight what does work with jQuery 1.2.1 ? Hi, I suspect it's because Interface is relatively old (in jQuery terms anyway), no longer maintained and may not be entirely compatible with the jQuery 1.2.x API. You may need to find another plugin capable of performing similar effects (jQuery UI eventually, maybe?). While I don't know of any, I'm sure you'll get a few suggestions from people here. Regards, Michael Price
[jQuery] jQuery-Plugin (ClueTip) Issue: Attribute rel not allowed in most HTML-elements
Hello Folks, At the moment, I am evaluating ClueTip for our use. I am especially interested in enabling input-fields with tooltip-functionality. According to the documentation of ClueTip, it seems that I have to refer to the body content of the tooltip with the attribute rel. Unfortunately, rel is not an allowed attribute in most HTML-tags. So input class=tips name=eingabefeld type=text size=10 rel=#myTooltipContent/ works fine, but is no valid HTML-Code. Do you have a solution to this issue, please ? Regards, Wolfram
[jQuery] JQuery-Plugin ClueTip Issue: Attribute rel not allowed in most HTML-elements
Hello Folks, At the moment, I am evaluating ClueTip for our use. I am especially interested in enabling input-fields with tooltip-functionality. According to the documentation of ClueTip, it seems that I have to refer to the body content of the tooltip with the attribute rel. Unfortunately, rel is not an allowed attribute in most HTML-tags. So input class=tips name=eingabefeld type=text size=10 rel=#myTooltipContent/ works fine, but is no valid HTML-Code. Do you have a solution to this issue, please ? Regards, Wolfram
[jQuery] Re: JQuery-Plugin ClueTip Issue: Attribute rel not allowed in most HTML-elements
Hi Wolfram, You can use any attribute you want for the body content by using the attribute option. For example: $('someInput').cluetip({attribute: 'name'}); For more info, see http://plugins.learningjquery.com/cluetip/#options --Karl _ Karl Swedberg www.englishrules.com www.learningjquery.com On Nov 6, 2007, at 8:21 AM, Wolfram wrote: Hello Folks, At the moment, I am evaluating ClueTip for our use. I am especially interested in enabling input-fields with tooltip-functionality. According to the documentation of ClueTip, it seems that I have to refer to the body content of the tooltip with the attribute rel. Unfortunately, rel is not an allowed attribute in most HTML-tags. So input class=tips name=eingabefeld type=text size=10 rel=#myTooltipContent/ works fine, but is no valid HTML-Code. Do you have a solution to this issue, please ? Regards, Wolfram
[jQuery] Scoping selector to parent window
Hi everyone, I've got a quick question, say I open a new window and in that window i have a button which will close the new window and also check a box in the original window, can this be done with jquery or is it easier to use the regular DOM method? I have this: $(#i-agree).click(function(){ $(#accept-terms,window.parent.document).attr(checked,checked); window.close(); }); Should I just do: window.parent.document.getElementById('accept-terms').value = 1; window.close(); ? The jquery window scoping deosn't seem to be working. Cheers, Rob
[jQuery] Re: missing leftOffset, topOffset in cluetip
Hi John, Busy at work today, so I can't look into this right away, but I will try to get an answer to you by the end of the day, if that's okay. --Karl _ Karl Swedberg www.englishrules.com www.learningjquery.com On Nov 6, 2007, at 5:18 AM, johnsverre wrote: Earlier on I tried offsetting the topBottom positioned tip with the topOffset parameter, this had no effect, but I just left it out, achiving a rather variable positioning using margin in css. Today I was trying to fix another bug when I noticed that both the leftOffset and the topOffset are missing completely. --- from the API: --- var defaults = { (...) topOffset:15, // Number of px (...) leftOffset: 15, // Number of px (...) --- have I just misunderstood or is this not supposed to be like this? - John Sverre Solem
[jQuery] .load appending content in IE7 only
I'm creating a basic email system and I'm having a problem with IE7 when using .load to replace the content of a div when a new message is selected. With earlier versions of IE and all other browsers the div content is replaced, but for some reason, IE7 is appending the content instead. Here's the code I'm using: function loadMail(mailID) { $('#mail-message').load('inc_message_ajax.asp?MailID='+mailID+''); } .a href=default.asp?MailID=123 onclick=loadMail(123); return false;message subject./a Any help would be really appreciated, this is driving me absolutely mad! Chris -- View this message in context: http://www.nabble.com/.load-appending-content-in-IE7-only-tf4757827s27240.html#a13605818 Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Re: PROBLEM: Adding hover to table rows on large tables
Personally, I would recommend looking at a paging solution, rather than trying to deal with so many rows on a single HTML page. I tested a simple 10,000 row table with very little data in it clocked in at a 2mb download, requiring 4 seconds to download and render as a local file on FireFox (i.e. no network traffic, loading the .htm file out of my local file system). And the more DOM elements of the page the harder it is to manipulate with any kind of scripting. If paging your results doesn't work for you, then the tr:hover CSS-only solution would really be the best way to go. JK -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of fambizzari Sent: Tuesday, November 06, 2007 2:29 AM To: jQuery (English) Subject: [jQuery] Re: PROBLEM: Adding hover to table rows on large tables The solution i adopted was CSS (tr:hover) for non-IE6 and only allow small tables to have hover-over using a class name to identify them. Any better solutions? On Nov 6, 10:45 am, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: The following code works fine on small tables: $(table tbody tr).mouseover(function(){$(this).addClass(over);}).mouseout(function(){$( this).removeClass(over);}); But on tables with 5,000-10,000 rows, it throws the A script on this page may be busy, or it may have stopped responding. You can stop the script now, open the script in the debugger, or let the script continue. Can anyone suggest a workaround? Thanks
[jQuery] Re: PROBLEM: Adding hover to table rows on large tables
I'd have to agree. I can't see any practical reason why you'd need to display that much data on one page. Aside from the download, and rendering time, the performance of the browser with that much data in memory would be horrible. Scrolling, copying, etc. would all be severely affected. andy -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Jeffrey Kretz Sent: Tuesday, November 06, 2007 9:21 AM To: jquery-en@googlegroups.com Subject: [jQuery] Re: PROBLEM: Adding hover to table rows on large tables Personally, I would recommend looking at a paging solution, rather than trying to deal with so many rows on a single HTML page. I tested a simple 10,000 row table with very little data in it clocked in at a 2mb download, requiring 4 seconds to download and render as a local file on FireFox (i.e. no network traffic, loading the .htm file out of my local file system). And the more DOM elements of the page the harder it is to manipulate with any kind of scripting. If paging your results doesn't work for you, then the tr:hover CSS-only solution would really be the best way to go. JK -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of fambizzari Sent: Tuesday, November 06, 2007 2:29 AM To: jQuery (English) Subject: [jQuery] Re: PROBLEM: Adding hover to table rows on large tables The solution i adopted was CSS (tr:hover) for non-IE6 and only allow small tables to have hover-over using a class name to identify them. Any better solutions? On Nov 6, 10:45 am, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: The following code works fine on small tables: $(table tbody tr).mouseover(function(){$(this).addClass(over);}).mouseout(function(){$( this).removeClass(over);}); But on tables with 5,000-10,000 rows, it throws the A script on this page may be busy, or it may have stopped responding. You can stop the script now, open the script in the debugger, or let the script continue. Can anyone suggest a workaround? Thanks
[jQuery] Re: Scripts at the bottom of the page
There is a noticable difference with scripts loading at the bottom of the page. The page certainly loads and renders faster. However, if you are running pngFix or roundedCorners there is a longer time before the script can make the adjustments... So although I think it's generally best practice to place scripts at the bottom there are some cases you may not want to. Charles On Nov 6, 4:55 am, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I read it too Have a look at it :http://developer.yahoo.com/performance/rules.html#js_bottom On Nov 5, 9:42 pm, Guy Fraser [EMAIL PROTECTED] wrote: Sean Catchpole wrote: Is there a good reason why placing scripts at the bottom of a page is a bad idea? By placing them in the head all javascript files must be downloaded before the rest of the page can render. This seems odd since most of the time the javascript needs to wait for the page to be loaded anyway. Other than perhaps organizational issues, are there any good reasons why having the script tags at the bottom of the page is a bad idea? According to YSlow docs, putting JS as far down the page as possible is beneficial.
[jQuery] Re: New Plugin jQuery.Rule
I can see some awesome uses for this. I also really like the jQuery style. Cool! Charles On Nov 6, 5:37 am, Suni [EMAIL PROTECTED] wrote: I think the idea is great! The demo looks very promising, it's easy to see several ways this could be (ab)used :) Nice work, please keep us informed as it progresses!
[jQuery] Re: Execution of Javascript code in Ajax response in IE and Safari (http://dev.jquery.com/ticket/1598)
You can see from the ticket that John re-fixed it in SVN only 3 weeks ago, so it's not in 1.2.1 but will be in the next minor release. Charles On Nov 5, 5:20 pm, cjiang [EMAIL PROTECTED] wrote: This is filed as Ticket #1598, and supposedly it is fixed in release 1.2.1 version. But I still couldn't get it work with 1.2.1. until I patched the JQuery with the patch submitted for Ticket #1698.http://dev.jquery.com/ticket/1698. Does anyone know if this bug has been fixed or not in release 1.2.1?
[jQuery] Re: Scripts at the bottom of the page
I place all my scripts at the bottom of my pages, just before the closing body tag. I think it definitely helps to stop the vsistor clicking the back button as they can see the information they came for immediately whilst in the background the javascript is loading. -- View this message in context: http://www.nabble.com/Scripts-at-the-bottom-of-the-page-tf4754009s27240.html#a13612005 Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Re: Scripts at the bottom of the page
I'm writing a scriptLoader applet, runnning on $(document).ready(), which: a) checks if a script has been loaded and b) if not, loads it as needed. I think this will help some, and it's following along with the whole plugin registry idea. marlyred wrote: I place all my scripts at the bottom of my pages, just before the closing body tag. I think it definitely helps to stop the vsistor clicking the back button as they can see the information they came for immediately whilst in the background the javascript is loading.
[jQuery] Can jquery do this?
This contact form looks really cool and I would love to use something like it on one of my websites. http://www.scriptdojo.com/mycontactstation-secure-contact-form/ Has anyone come up with something like this using jquery? I have been on a quest to find a secure ajax contact form and have found a few examples on the internet using other js libraries (mootools etc) but have yet to find one powered by jquery. Have I been looking in the wrong places? -- View this message in context: http://www.nabble.com/Can-jquery-do-this--tf4760290s27240.html#a13613559 Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Re: Can jquery do this?
Thickbox and an iFrame linking to a secure page would do the same thing. If https was the issue, that would do it - in fact, that's pretty much all they're doing - pop up a div, insert an iframe, populate that with the link - yeah, jQuery could front-end that, as long as you've got a server that can handle the back end. Regards, -toby p. Josh Nathanson wrote: You could do it pretty easily using jqModal or any other of the modal jQuery plugins. There is nothing overly secure about that one, it just uses a captcha like many other contact forms. -- Josh - Original Message - From: marlyred [EMAIL PROTECTED] To: jquery-en@googlegroups.com Sent: Tuesday, November 06, 2007 11:01 AM Subject: [jQuery] Can jquery do this? This contact form looks really cool and I would love to use something like it on one of my websites. http://www.scriptdojo.com/mycontactstation-secure-contact-form/ Has anyone come up with something like this using jquery? I have been on a quest to find a secure ajax contact form and have found a few examples on the internet using other js libraries (mootools etc) but have yet to find one powered by jquery. Have I been looking in the wrong places? -- View this message in context: http://www.nabble.com/Can-jquery-do-this--tf4760290s27240.html#a13613559 Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Re: Can jquery do this?
Marlyred, This contact form looks really cool and I would love to use something like it on one of my websites. http://www.scriptdojo.com/mycontactstation-secure-contact-form/ Has anyone come up with something like this using jquery? I have been on a quest to find a secure ajax contact form and have found a few examples on the internet using other js libraries (mootools etc) but have yet to find one powered by jquery. Have I been looking in the wrong places? SimpleModal has a contact example that works just like this: http://www.ericmmartin.com/simplemodal/ I'd always recommend checking http://jquery.com/plugins/ when looking for something. SimpleModal is listed right in the Windows Modal windows category. -Dan
[jQuery] Re: Can jquery do this?
You could do it pretty easily using jqModal or any other of the modal jQuery plugins. There is nothing overly secure about that one, it just uses a captcha like many other contact forms. -- Josh - Original Message - From: marlyred [EMAIL PROTECTED] To: jquery-en@googlegroups.com Sent: Tuesday, November 06, 2007 11:01 AM Subject: [jQuery] Can jquery do this? This contact form looks really cool and I would love to use something like it on one of my websites. http://www.scriptdojo.com/mycontactstation-secure-contact-form/ Has anyone come up with something like this using jquery? I have been on a quest to find a secure ajax contact form and have found a few examples on the internet using other js libraries (mootools etc) but have yet to find one powered by jquery. Have I been looking in the wrong places? -- View this message in context: http://www.nabble.com/Can-jquery-do-this--tf4760290s27240.html#a13613559 Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Re: Can jquery do this?
Oooh...that's nice. -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Dan G. Switzer, II Sent: Tuesday, November 06, 2007 1:18 PM To: jquery-en@googlegroups.com Subject: [jQuery] Re: Can jquery do this? Marlyred, This contact form looks really cool and I would love to use something like it on one of my websites. http://www.scriptdojo.com/mycontactstation-secure-contact-form/ Has anyone come up with something like this using jquery? I have been on a quest to find a secure ajax contact form and have found a few examples on the internet using other js libraries (mootools etc) but have yet to find one powered by jquery. Have I been looking in the wrong places? SimpleModal has a contact example that works just like this: http://www.ericmmartin.com/simplemodal/ I'd always recommend checking http://jquery.com/plugins/ when looking for something. SimpleModal is listed right in the Windows Modal windows category. -Dan
[jQuery] Re: Scripts at the bottom of the page
On Nov 5, 12:05 pm, Sean Catchpole [EMAIL PROTECTED] wrote: Is there a good reason why placing scripts at the bottom of a page is a bad idea? wow I was about to come here and post the same thing. I have a blog post about this: http://michaelshadle.com/2007/10/30/handling-events-pre-documentready-in-jquery/ Basically I am trying to align with the Yahoo concepts too, but placing jQuery at the bottom has some odd behaviors. Even with stuff chained to $(document.ready(), I have events that are bound inside of that but inside of the callbacks on the events I can raise a $ is not defined and jQuery is not defined somehow. Somehow, the jQuery code is being called, because it is executing the $(document) stuff, but it still hasn't bound all the items in the DOM or assigned them to the jQuery global object or the $ object or something. Here's one example of that. You need Firefox. I am using Firefox 2.0.0.9 with Firebug and Yslow, just FYI. http://mikehost.com/~mike/tmp/jquery/jquery1.html If you click on one of the links, while it's loading that page if your mouse moves over the other one it will raise the Javascript warning... Also any a href=javascript:foo() links that call jQuery related stuff can't be clicked before jQuery is fully loaded. Having the script towards the bottom can also mess that up. In my blog post I wound up using an ID and a callback so it can only work if jquery is loaded, however, it winds up acting like a dead link until everything is loaded fully (extremely poor user experience) and actually stays dead a lot of the time (for reasons unknown to me) - I've also tried $ (window).load() and some other stuff. For the mouseovers, I might be able to do some if ($ typeof $.isReady == 'boolean' $.isReady) or something to check for the existence of $ ... but the question still remains for more things. Maybe John monitors this list or another hardcore Javascript guy and could chime in Can jQuery be put at the bottom of the page safely, or is using jQuery with Yahoo JS optimization tips mutually exclusive? And if so, I guess the fix is to include jquery in the head (as soon as possible) and the rest can still be in the footer...
[jQuery] Re: JSON + JQUERY Problem! Need help ASAP toJSONString not a function
Hi Matt, Thanks for the response. So when you say your solution was to use jQuery's JSON functions, do you pull in another JSON file, use the existing one, or something else. I would be awesome if you could list out the basic steps you took to solve your problem...maybe even with 1 example. I am not a JS guru by any stretch of the imagination, so I usually have to follow by example. Thanks, Bryan On Nov 5, 2:53 pm, Penner, Matthew [EMAIL PROTECTED] wrote: Hi Bryan, We had this problem as well. The solution was to use jQuery's JSON functions $.toJSON() .parseJSON() instead of those built into the JSON library. Matt Penner -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Bryank Sent: Monday, November 05, 2007 8:39 AM To: jQuery (English) Subject: [jQuery] JSON + JQUERY Problem! Need help ASAP toJSONString not a function Hi Everyone, First time poster on this group. We use JSON for various projects and one thing I am beginning to implement are some Jquery lightbox effects. Well, sure enough Jquery and JSON don't play nice in this regard. If I try one of the JSON No Augmenting JS files out on the web, that breaks the rest of our functionality that uses JSON. It typically barfs on a line that has something.toJSONString and says it is not a function. here is a snippet of example code. On th eline with postBody, it breaks. if (onException == null) onException = onExceptionDefault; var ajax = new Ajax.Request( url, { method: 'post', parameters: '', postBody: msg={ 'blahEvent' : + encodeURIComponent(blahEvent.toJSONString()) + }, IT BARFS HERE!!! // postBody: msg={'blahEvent' : + blahEvent.toJSONString() + }, onComplete: onComplete, onFailure: onFailure, onException: onException, asynchronous: curAsync }); Here is the FireBug output for the error: If you look closely on exceptionHappened, there are 2 undefined's. ===FIREBUG OUTPUT=== _makeRequest(Object _type=ajaxGetEvents type=ajaxGetEvents, eventsReceived(r), false, exceptionHappened(requestor, ex, doRedirect), undefined, undefined)gapsession.js (line 781) getBlahEvents()gapsession.js (line 717) getEventLoop()gapsession.js (line 23) handlePageLoad()idle.action# (line 172) onload(load ) = If I download one of the JSON plugins for Jquery as a solution, can you provide me an example of the code I just posted with the fix attached to it? Thanks, Bryan
[jQuery] Text finder in html
I am trying to create a javascript-based text finder using jQuery. I have a table like this: table id=dataTable tr td data 1 /td /tr tr td data 2 /td /tr tr td data 3 /td /tr /table And I would like to be able to search for a text in any of the tds and highlight it. I tried something like this: function find() { text = jQuery(#findText).val(); columns = jQuery(table#dataTable td); for (i=0; icolumns.length; i++) { if (columns[i].innerHTML.indexOf(text) != -1) { jQuery(columns[i]).addClass(test); } } I have defined the test style like this: style type=text/css a.test { font-weight: bold; } /style When I run the script it does nothing. Not sure why. I've debugged it. jQuery(columns[i]) is an [Object] that has all the normal jQuery functions -- addClass(), append(), etc. but when I call any of them nothing happens. Can someone tell me what I am doing wrong? Thanks! Bob
[jQuery] AJAX/PHP master wanted for a new generation of template
Hello, I'm looking for someone experienced in ajax, and Joomla!. (1.0 and 1.5) The goal is to create a template based on AJAX, which should appear in two places: in the admin backend, and in the user backend. The template should make Joomla! to become a real OS, just like in http://demo.eyeos.org/. Check http://www.beautyindesign.com/joomlaos/ too Features must be : - ability to change the background (they can choose a pic inside a directory of the website - screensaver based on the same source - there should be a system menu which works like any OS, where you can find all the menus of Joomla (Site, Menus, Componants etc ..) - user can drag and drop an icon from any componants to drop it on the desk (the desk itself should be draddrop featured). These icons should be renamed as wanted - user can drag and drop icons from desk or sys menu to drop it on a floating toolbar, or delete items from it. Objects can be renamed too. - when you clik on an icon the componant must be opened in a new window. These windows are resizable (minimize, restore down, maximize, close), you can increase/decrease texts in it. - when you right click on the desk, icon, sys menu, toolbar or background, a special menu appears. -users settings should be saved (icons position, background etc ..) - no branding and/or copyright on the final product If you're interested, please contact me using this form : http://fsw.fr/index.php?option=com_contacttask=viewcontact_id=1Itemid=13 Regards, Eps
[jQuery] AJAX/PHP master wanted for a new generation of template
Hello, I'm looking for someone experienced in ajax, and Joomla!. (1.0 and 1.5) The goal is to create a template based on AJAX, which should appear in two places: in the admin backend, and in the user backend. The template should make Joomla! to become a real OS, just like in http://demo.eyeos.org/. Check http://www.beautyindesign.com/joomlaos/ too Features must be : - ability to change the background (they can choose a pic inside a directory of the website - screensaver based on the same source - there should be a system menu which works like any OS, where you can find all the menus of Joomla (Site, Menus, Componants etc ..) - user can drag and drop an icon from any componants to drop it on the desk (the desk itself should be draddrop featured). These icons should be renamed as wanted - user can drag and drop icons from desk or sys menu to drop it on a floating toolbar, or delete items from it. Objects can be renamed too. - when you clik on an icon the componant must be opened in a new window. These windows are resizable (minimize, restore down, maximize, close), you can increase/decrease texts in it. - when you right click on the desk, icon, sys menu, toolbar or background, a special menu appears. -users settings should be saved (icons position, background etc ..) - no branding and/or copyright on the final product If you're interested, please contact me using this form : http://fsw.fr/index.php?option=com_contacttask=viewcontact_id=1Itemid=13 Regards, Eps
[jQuery] Re: jQuery.easing[this.options.easing || (jQuery.easing.swing ? swing : linear)] is not a function
Are you using an older version of my easing plugin? On Nov 5, 10:03 pm, Daemach [EMAIL PROTECTED] wrote: After upgrading to jquery 1.2.1 I'm getting the error above on a regular basis. Has anyone else seen this?
[jQuery] Re: $('.class1,.class2').filter(':first') always finds first .class1
You could store the type of validation error in a variable (either global or in jQuery.data), then just apply a class of fail to the invalid elements. // check for validation errors var errorType = ''; if (required no val) { errorType = 'required'; } if (email invalid email) { errorType = 'email'; } // update error details for the element $.data(e, 'validationError', errorType); if (errorType) { $(e).addClass('fail'); } else{ $(e).removeClass('fail'); } // find the first invalid element $('.fail:first') // check the type of error var errorType = $.data(e, 'validationError'); You could also modify errorType to be an object if you want to store multiple validation errors per element. On Nov 5, 3:55 pm, Pyrolupus [EMAIL PROTECTED] wrote: Thank you for the explanation and the suggestion, but elements are already (potentially) sporting multiple classes, due to multiple types of validation occurring on the fields. Oversimplified pseudo-psuedocode example: // // begin code // if (requiredField $.trim(requiredField.val()).length == 0) { requiredField.addClass('requiredFail'); isValid = false; } if (emailField emailField.val().length 0 !emailField.val().test(emailregex)) { emailField.addClass('validationFail'); isValid = false; } if (!isValid) { //here's where we break down... var $firstFail = $ ('.requiredFail,.validationFail').filter(':first'); var elemOffset = $firstFail.offset().top; $('html,body').animate({scrollTop: elemOffset}, 400);} // // end code // There are fields that are required, and we check them for content. There are also fields that, if provided, must be valid content. A few fields fall into both categories. I am using CSS classes to distinguish between the two to make it easy for the designer to add new fields--just give them the required class. If it's an email field, put email somewhere in its ID attribute. Both cases get picked up, but I'm unable to get the page to scroll to the FIRST item that matches EITHER validation failure class (requiredFail or validationFail). Your issue doesn't actually have anything to do with the filter, it's the selection. $('.class1,.class2') selects all class1, then all class2. This totally explains why I have the issue, and I thank you for describing it. I expected the select element statement to behave something like, className ~= /^(?:class1|class2)$/, but it really operates more like, (.class1).push(.class2). Pyro
[jQuery] Re: Dropdown list to auto populate input boxes
Is your alert working correctly? If you've managed to get the data properly, then I would suggest trying the val function instead of attr('value') If you give it an argument it will set the elements value to that argument eg: $(#charity_address).val(address); HTH George
[jQuery] Re: using load() to retrieve multiple values
Hi, You could try the JQuery Taconite Plugin. http://www.malsup.com/jquery/taconite/#overview Regards, Changsu On Nov 4, 9:32 am, stef [EMAIL PROTECTED] wrote: using the code below, im trying to populate the textfield and the textarea with data stored in my db. HTML PAGE: head script src=../js/jquery-1.1.3.1.pack.js type=text/javascript/ script script type=text/javascript $(document).ready(function(){ $(#editNewsItem).change( function() { var newsId = $(#editNewsItem).attr(value); $(textarea#title).load(processing.php,{theId:newsId}); $(textarea#article).load(processing.php,{theId:newsId}); }); }); /script /head form action=processing.php method=post select name='news' id='editNewsItem' name='editNewsItem' option value=1one/option option value=2two/option /select input type=submit value=submit id= name=editNewsSubmit/ input type=text id='title' / textarea id='article' cols='20' rows='20'/textarea PROCESSING.PHP include ('../inc/db.inc.php'); $newsId = $_POST['theId']; $query = select title from news where news.id = $newsId; $result = mysql_query($query) or die ('problem!'); $newsRow = mysql_fetch_array($result,MYSQL_ASSOC); extract ($newsRow); echo $newsRow['title']; $query2 = select article from news where news.id = $newsId; $result2 = mysql_query($query2) or die ('problem2'); $newsRow2 = mysql_fetch_array($result2,MYSQL_ASSOC); echo $newsRow2['article']; the result is that when i change the select menu, the correct data gets returned but both the title and the article text appear in the textarea. how can i get the title (from $query) to appear in the text field and the article (from $query2) to appear in the textarea? id also like to use a callback to insert a spanSuccess!span into the DOM. many thanks for any pointers, stef ps - the title is just text but the article is html (stored in the db as html generated by tinymce)
[jQuery] Re: Calling jquery in an other function?
Hi Mike, Thank you very much for your help. Now it's working fine. Cheers. mw On Nov 6, 12:40 am, Mike Alsup [EMAIL PROTECTED] wrote: $(document).ready(function(){ $(a).click(function () { $(#info+id).slideUp(slow); }); }); For some reason I can't get the ID of the link I just updated. Any Idea how to do this? Unless id is a global variable it is undefined in your click handler. You could simply do this in your readystate handler: $(id).slideUp(); or you can probably rewrite that whole block of code like this: function accept(id, action) { $('#results').load('pagina.php', function() { $('#indicator,#info'+id).slideUp(); }); };
[jQuery] AJAX/PHP master wanted, for a new template
Hi, I'm looking for a dev with advanced knowledge in AJAX/PHP/MySQL My project is to create a template for Joomla! (1.0 and 1.5) with advanced features ; a bit like http://demo.eyeos.org/ The job should start at the beginning of december. If you're interested, please use this form : http://fsw.fr/index.php?option=com_contacttask=viewcontact_id=1Itemid=13 to contact me.
[jQuery] Re: Problems with Accordion seems to be with jQuere itself
It works in FF the first time. Did you close it and try it a second time? That's when it breaks for me. ml On Nov 5, 5:05 am, Dan G. Switzer, II [EMAIL PROTECTED] wrote: Mark, I have been doing some dynamic things with accordion and have found some areas that don't work. After some rather extensive debugging it appears that the problem lies in jQuery. I'm doing some very dynamics things with the content that lives in the accordion. The problems I've found seem to stem from accordion getting out of sync with the changes that are made to the data after accordion is called and setup. I haven't unraveled why the problems are happening yet but it appears that jQuery is cacheing hide/show values. I have provided a sample page that demonstrates one of the problems I have found with accordion and my tecniques. Example of broken accordion: Works 1st time and then broken until refresh of page. http://dataprism.net/dpui/test2.html Click on Open Inspector to open the inspector pane and use the accordion, it works great. Click on Close Inspector to close the inspector pane. Now click on Open Inspector and the accordion is broken. Page refresh fixes it. When I open the inspector I dynamically build the html that will be accordioned and call accordion. I tested the page in both FF and IE6 and it worked, however in IE6 it does take like 5 seconds for it to open a 2nd time. I think the problem may lie in the load() method. I'd remove the AJAX call and see how the code works without the AJAX call. Just open/close the dummy container. However, like I said the code worked fine in FF and there was just a long lag in IE6. -Dan
[jQuery] Safari Problem
Hi there, I'm encountering Problems with a jquery-script on Safari/Mac. It just won't start, even though it starts in all other browsers. code 1 $(document).ready(function(){ 2 3 var ps = ($(p.inv)); 4 var i = 0; 5 (function fading(){ 6 $(ps[i]).fadeIn(3000, function(){ $(ps[i]).fadeOut(4500, function() { if( i2 ){i++; fading();}});}); 7 })(); 8 }); /code It works with jquery 1.2.1. Any ideas anyone? I tried to open the effects on jquery.com with that browser, and had also several problems kind regards phaenotyp
[jQuery] How to select by id where the id contains a dot?
Unless I'm mistaken, JQuery (1.2.1) doesn't appear to be able to select by id where the id contains a dot. e.g. span id=error.password/span ... // the following does nothing $(#error.password).append('Required field'); Is this correct, is there any workaround? Cheers, D.
[jQuery] Problem with jQuery and Typo3
Hi, i am new, so please be nice :D Ok i have following problem: I am trying to implement jquery into an existing typo3 site. jquery.js is up and running (vers. 1.2.1) www.op-de-eck.de my script looks like $(document).ready(function() { $('#servicenav a').click(function(){ var linknum = parseInt($(this).attr('href') ,10); $.get('index.php', {'id':linknum}, function(data){ $('#contentwrapper').empty(); $(data).filter('#contentwrapper'); $('#contentwrapper').append($(data)); }); return false; }); }); so what i am trying to do is: - attach click to the servicenav links - when clicked to corresponding id from index.php is loaded - the data should be processed so only the content of the contentwrapper div is displayed - then the data is loaded to the contentwrapper of the actual site the problem seems to be the filter... i just doesn't work no matter if i type data oder $(this) or whatever... find doesn't work either...but if i remove the line with filter, it works perfect, only that the whole page is loaded into the contentwrapper not just the content.so it looks ugly :D thanks for your time!
[jQuery] Re: Jquery Sortable plugin and Flash content problem
Bump! On Nov 5, 3:51 pm, jamietssg [EMAIL PROTECTED] wrote: I've uploaded an example, try drag the box containing the flash game in IE http://weeatbricks.com/test/sortable_flash.html Thanks Jamie On Nov 5, 2:10 pm, jamietssg [EMAIL PROTECTED] wrote: Hello, I am using the jquery and te sortable plugin. The sortable items are dics that contain object and embed tags to a flash file. In FF when I drag the divs around the flash movie appears smooth and as you would expect. However in IE 6 and IE7 when I drag the div around the flash movie will disappears,and reappear. It will be replaced by the white rectangle that seems to get stuck and leave a trail and lingers for a split second. When I stop sorting/draggin the div. Any ideas with this one? Thanks a million! Ja mie
[jQuery] Jquery 1.2 and Interface Plugin
Bummer. There are bugs and issues with Interface using jquery 1.2 . Are there any alternatives or bug fixes for this? It does't seem like the Interface dev team are very active in its development. I checked out the UI components, but it is far from what interface can do..
[jQuery] Re: Scoping selector to parent window
Hi, What you can do is like the following: $(#i-agree).click(function(){ window.opener.$(#accept-terms).attr(checked,checked); window.close(); }); regards, Changsu On Nov 6, 5:23 am, Robert O'Rourke [EMAIL PROTECTED] wrote: Hi everyone, I've got a quick question, say I open a new window and in that window i have a button which will close the new window and also check a box in the original window, can this be done with jquery or is it easier to use the regular DOM method? I have this: $(#i-agree).click(function(){ $(#accept-terms,window.parent.document).attr(checked,checked); window.close(); }); Should I just do: window.parent.document.getElementById('accept-terms').value = 1; window.close(); ? The jquery window scoping deosn't seem to be working. Cheers, Rob
[jQuery] Jquery Sortables Issue regarding parentNode's
Hi Everyone, So I am modifying the Sortables example found here: http://interface.eyecon.ro/demos/sort.html Basically, where the expand/collapse links exist, I am wrapping some new html around them for better positioning, etc... When doing this, it breaks the toggle function. I believe it has to do with this line: var targetContent = $('div.itemContent', this.parentNode.parentNode); What exactly is the 2nd argument for in this case, after div.itemContent? I made a fix by adding a 3rd parentNode, but I don't want my HTML completely dependent on the 2nd argument. Because the expand/collapse links exist inside div.itemHeader, can't I just target that main div instead of the multiple parentNode option? Something like this I hope would work, but it doesn't. var targetContent = $('div.itemContent', $('div.itemHeader')); Or is it possible to use $(this) div.itemHeader or something? Thanks, Bryan
[jQuery] Re: Select Option (find class of option)
Please tell us what you did to get it working. And this goes for all other people asking questions and then figuring out a solution on your own... There may be other people with a similar problem who see your question and think there will be a solution to their problem at the end of the thread, but all they get is I fixed it, never mind. If you figure out a solution to your own problem, please post that solution here, so we can all benefit from your genius. Thanks On Nov 5, 4:29 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Oh got it, nevermind. On Nov 6, 9:06 am, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Cheers for that! It doesn't work though. I should point out that the divs with the IDs are elsewhere in the document, not near the select - but that shouldn't matter should it? Is there some way I can debug it to print out the ID so I can make sure it's doing what I want it to do? On Nov 5, 7:23 pm, Wizzud [EMAIL PROTECTED] wrote: This is all you need inside the change() function... $('#' + $('option:selected', this).attr('class')).show(); On Nov 5, 1:38 am, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: $(document).ready(function() { $('div.hidden').hide(); $('#node-58 select.state').change(function () { $(this).find(option:selected); // I think this line needs a function to wrap the next bit of code? var equiv = $('#' + this.className); if(equiv.length){ equiv.show(); } }); }); Explanation: I have a bunch of divs with class 'hidden' that automatically have to hide. Those divs also have IDs each corresponding to a CLASS on an option tag within a select box. The idea is that when you choose an option with class .foo it will show the div with ID #foo. So far my .hidden divs get hidden, but they never get activated by the select box.
[jQuery] Re: Can jquery do this?
On Nov 6, 11:01 am, marlyred [EMAIL PROTECTED] wrote: This contact form looks really cool and I would love to use something like it on one of my websites.http://www.scriptdojo.com/mycontactstation-secure-contact-form/ Has anyone come up with something like this using jquery? I have been on a quest to find a secure ajax contact form and have found a few examples on the internet using other js libraries (mootools etc) but have yet to find one powered by jquery. Have I been looking in the wrong places? -- View this message in context:http://www.nabble.com/Can-jquery-do-this--tf4760290s27240.html#a13613559 Sent from the jQuery General Discussion mailing list archive at Nabble.com. As a demo for SimpleModal, I created an Ajax contact form. The demo and download can be found at: http://www.ericmmartin.com/simplemodal/ The download includes all of the files (html, javascript, css, images and php)
[jQuery] Re: Execution of Javascript code in Ajax response in IE and Safari (http://dev.jquery.com/ticket/1598)
Thanks for the reply. Changsu On Nov 6, 9:49 am, polyrhythmic [EMAIL PROTECTED] wrote: You can see from the ticket that John re-fixed it in SVN only 3 weeks ago, so it's not in 1.2.1 but will be in the next minor release. Charles On Nov 5, 5:20 pm, cjiang [EMAIL PROTECTED] wrote: This is filed as Ticket #1598, and supposedly it is fixed in release 1.2.1 version. But I still couldn't get it work with 1.2.1. until I patched the JQuery with the patch submitted for Ticket #1698.http://dev.jquery.com/ticket/1698. Does anyone know if this bug has been fixed or not in release 1.2.1?- Hide quoted text - - Show quoted text -
[jQuery] Page loading overlay
I have a couple of pages in a web app which are really huge (the markup runs to almost 20,000 lines)--which is fine, in the context of those pages. I'd like to add an overlay that will block interactions until the while page is loaded. Previously, I've done this with a document.write(div id=overlay/div) inside the page body, with an onload function that hides the overlay. I was hoping there was a smarter way to do it with jquery. Is there a way to fire off a function when the body /starts/ to load? -- Owen
[jQuery] jQuery.ajax POST is getting a 411 error.
We're using Rails + jQuery for our xmlHTTPRequests, served up on nginx. When making a jQuery.ajax type:'POST', the reponse is: HTTP/1.1 411 Length Required Doing some curls, I was able to send a post successfully the server by setting 'Content-Length: 0' as an additional header on the request. I don't see an obvious way to set additional headers using jQuery.ajax, though. Has anybody else run into this issue before?
[jQuery] jquery leaks in ie
I'm using jquery and jdmenu on my website (www.bursaport.ro) and recently I have discovered that it has massive leaks on internet explorer. The leaks that I'm having problems with are a serious issue since internet explorer crashes when opening certain pages from the website. I tried to set the references to the objects that don't get cleaned by garbage collection to null but it didn't help at all. Is there something I'm doing wrong or is this a jquery bug ? I'm willing to pay for support if this problem is caused by the way that my scripts were coded and not by jquery itself. Thank you for your time
[jQuery] Re: How to select by id where the id contains a dot?
Hi Derek, The answer is in the FAQ: http://docs.jquery.com/ Frequently_Asked_Questions#How_do_I_select_an_element_that_has_weird_cha racters_in_its_ID.3F Here is an example: // Does not work $(#some.id) // Works! $(#some\\.id) --Karl _ Karl Swedberg www.englishrules.com www.learningjquery.com On Nov 6, 2007, at 10:11 AM, Derek Alexander wrote: Unless I'm mistaken, JQuery (1.2.1) doesn't appear to be able to select by id where the id contains a dot. e.g. span id=error.password/span ... // the following does nothing $(#error.password).append('Required field'); Is this correct, is there any workaround? Cheers, D.
[jQuery] Re: PROBLEM: Adding hover to table rows on large tables
You guys are all right, but so many rows on one page are necessary here. I'll try to figure out an acceptable work-around. Thanks On Nov 6, 8:38 pm, Andy Matthews [EMAIL PROTECTED] wrote: I'd have to agree. I can't see any practical reason why you'd need to display that much data on one page. Aside from the download, and rendering time, the performance of the browser with that much data in memory would be horrible. Scrolling, copying, etc. would all be severely affected. andy -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Jeffrey Kretz Sent: Tuesday, November 06, 2007 9:21 AM To: jquery-en@googlegroups.com Subject: [jQuery] Re: PROBLEM: Adding hover to table rows on large tables Personally, I would recommend looking at a paging solution, rather than trying to deal with so many rows on a single HTML page. I tested a simple 10,000 row table with very little data in it clocked in at a 2mb download, requiring 4 seconds to download and render as a local file on FireFox (i.e. no network traffic, loading the .htm file out of my local file system). And the more DOM elements of the page the harder it is to manipulate with any kind of scripting. If paging your results doesn't work for you, then the tr:hover CSS-only solution would really be the best way to go. JK -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of fambizzari Sent: Tuesday, November 06, 2007 2:29 AM To: jQuery (English) Subject: [jQuery] Re: PROBLEM: Adding hover to table rows on large tables The solution i adopted was CSS (tr:hover) for non-IE6 and only allow small tables to have hover-over using a class name to identify them. Any better solutions? On Nov 6, 10:45 am, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: The following code works fine on small tables: $(table tbody tr).mouseover(function(){$(this).addClass(over);}).mouseout(function(){$( this).removeClass(over);}); But on tables with 5,000-10,000 rows, it throws the A script on this page may be busy, or it may have stopped responding. You can stop the script now, open the script in the debugger, or let the script continue. Can anyone suggest a workaround? Thanks
[jQuery] Re: How to select by id where the id contains a dot?
Since the dot (.) has a special meaning in your css selector, you need to escape it, like so: $(#error\\.password) For more info, see: http://docs.jquery.com/Frequently_Asked_Questions#How_do_I_select_an_element_that_has_weird_characters_in_its_ID.3F - Richard On Nov 6, 2007 10:11 AM, Derek Alexander [EMAIL PROTECTED] wrote: Unless I'm mistaken, JQuery (1.2.1) doesn't appear to be able to select by id where the id contains a dot. e.g. span id=error.password/span ... // the following does nothing $(#error.password).append('Required field'); Is this correct, is there any workaround? Cheers, D.
[jQuery] remove() deletes events in jQuery 1.2.1. Why?
Hey, I recently upgraded my app from jQuery 1.3.1 to 1.2.1 and the transition was incredibly easy. However, yesterday I noticed that $().remove() now seems to behave differently then it did in 1.3.1. Thats because now it deletes any events attached to the element removed. This happens to be a problem in my app b/c I remove unneeded elements from the DOM instead of hiding them and inject them back in later on. So when they are injected again, they suddenly don't work anymore : ). Now I looked through the manual and it says this is going to be the expected behavior in 1.2.2: http://docs.jquery.com/Manipulation/remove Which confuses me b/c it already seems to be the case in 1.2.1 and I'm also wondering how I could remove DOM elements without deleting their events in future? I'm also curious about why this change is being made, is it some anti-memory leak thingy? Thanks a lot, -- Felix -- Blogger: http://www.thinkingphp.org/ Entrepreneur: http://www.posttask.com/ /-- currently in private beta, ask me for invite / password/ Freelancer: http://www.fg-webdesign.de/ AIM:theundefined87 Skype: TimeFor23 Other IM: felixge.de http://felixge.de/ Mobile (USA): +1 404 3888693 Mobile (GER): +49 162 9391612 Twitter:http://twitter.com/felixge
[jQuery] Re: PROBLEM: Adding hover to table rows on large tables
Why not try paging on scroll, similar to Google Reader? I think there was a plugin for just that a while ago. I'm just not a big fan of that technique from a usability standpoint. Regular non-techie people are not used to unexpected things happening when they scroll. If someone wants to load 10,000 rows into their browser at once (and apparently they do), that's their business. As long as the server is unaffected then it's ok by me. -- Josh
[jQuery] Use jQuery to initialise a variable from xml
OK, imagine I am a moron who has managed to get the following to work: A web page that displays one of 25 different pictures depending on the (manually declared) value of the variable 'picture'. Now, I am getting (or wish to get) the value from the value element in the following xml file (shown in all its glory): ?xml version=1.0 encoding=UTF-8 value1/value Now I seem to be reading the xml file into the page scripts OK but cannot get the variable 'picture' to initialise with a value from value. I am reading the file in as a DOM object using a readXMLData() function that is called in a body div of the file (function code is in the head). I have tried : var picture = 'node.firstChild.data' var picture = xmlDoc.selectSingleNode(value).nodeValue var picture = xmlDoc.getElementsByTagName(value) and even var picture = 'xsl:value-of select=value/ all instantiated from within the readXMLData() function and none of which worked. Can anyone help me? Please use baby steps and include such vital information as where in the file entries must be. Yours in desperation (I have wasted nearly 40 hours trying to get this to work!)
[jQuery] jQuery Cycle Plugin: how to fade the first image also...
I have discoverde the very best jQuery Cycle Plugin: i want to create a fading with a few image... alll work fine but it is possible to apply the fade effect at the first image also? Thank You Ciao!
[jQuery] hover select/
helo, Here is the goal: A box containing a form (with a select) should only be visible as long as the mouse pointer is inside it. I used jQuery's hover function on the box but when the mouse pointer is moved over the select box's drop down menu to select an item, the box disappears because browsers don't set the relatedTarget property of the event, causing jQuery's hover function to signal a mouse out. I worked around this by checking if the event's relatedTarget is set but wonder if this isn't something that should be implemented by jQuery? Here's the demo, play with it by toggling the only comment. !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http:// www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd html xmlns=http://www.w3.org/1999/xhtml; xml:lang=en lang=en head titlePage Title/title meta http-equiv=Content-Type content=text/html; charset=iso-8859-1/ script type=text/javascript src=jquery.js/script script type=text/javascript $(document).ready(function(){ $('#foo_form').hover(function(e) { }, function(e) { //if(e.relatedTarget) $('#foo_form').hide() }) }) /script /head body a href=# onclick=$('#foo_form').show()show green box/a form id=foo_form action=# style=background:#CFC; padding: 10px; width: 200px pThe green box shall disappear when you move the mouse out of (it#8217;s) bounds!/p select optionSelect/option optionTry to select me A/option optionTry to select me B/option optionTry to select me C/option /select pNow go ahead and try to select something from the dropdown using your mouse!/p /form /body /html
[jQuery] bind('load') on an img element doesn't return the image properly
I'm not sure if this is actually the problem or not, but it's the result. I am trying to build on Luke Lutman's preloading images snippet (http://www.mail-archive.com/[EMAIL PROTECTED]/ msg14399.html). Here's what I'm doing ( -- it's wrapped in $ (window).bind('load') -- ) : var toPreload = new Array(); // toPreload gets dynamically populated with a bunch of string values for image sources. // essentially no different than this: toPreload = [image1-on.gif, image2-on.gif, image3-on.gif] $('img').bind('load', function(e) { if(toPreload[1]) { this.src = toPreload.shift(); console.log(loaded: +e.target.nodeType); } }).trigger('load'); Now what that SHOULD (and does) do is preload all of the images. Once each load event completes, it will fire the 'trigger' call and load the next img src until the toPreload array is empty. Very nifty little cycle (thank you Luke..). Here's where the problem is: The output in firebug from the console.log() statement looks like this: --- loaded: 1 loaded: 9 loaded: 9 --- So that means that the first time 'load' is called, the eventObject.target is properly pointing to the img element that I've created to load into. BUT, every time after that, the eventObject.target is pointing to the document. WHY?? The reason this matters to me (the images still load properly) is that I am trying to build in error detection so that if one of the images in the toPreload array doesn't actually exist and can't be loaded, that image will be skipped, and the cycle will continue to load the rest of the images. As it stands, Luke's snippet breaks if any of the images cannot be found. I've chained a call to .error() after the .trigger() - which fires as soon as one of the images can't load. I haven't fully decided how I want to go about handling this, but having the proper reference to event.target inside the load handler would be a good start I think. Any thoughts? Thanks a lot! Carter
[jQuery] Tablesorter and numbers formatted with commas
Hi All, Does anyone know how to get the Tablesorter to properly sort numbers some of which have a comma separating the thousands. What I mean is I have a range of numbers anywhere from 0 to 10,000, and I want 958 to be above 1,104 but by default it's not. Any suggestions appreciaged. Thanks, -Roman
[jQuery] Re: PROBLEM: Adding hover to table rows on large tables
Why not try paging on scroll, similar to Google Reader? I think there was a plugin for just that a while ago. - jake On Nov 6, 2007 5:01 PM, Josh Nathanson [EMAIL PROTECTED] wrote: I had to do just that (add mouse events directly to the html elements) in a similar situation. Binding via jQuery was too slow when it got up to 1000 or so bindings. I was getting the long running script errors. A necessary evil in that scenario I'm afraid. In my case users can select how much data they want to view. Sometimes people like loading tons of data onto a page, as they prefer scrolling to paging. -- Josh - Original Message - From: Karl Swedberg To: jquery-en@googlegroups.com Sent: Tuesday, November 06, 2007 1:55 PM Subject: [jQuery] Re: PROBLEM: Adding hover to table rows on large tables You could add onmouseover and onmouseout directly to the trs. It's ugly (don't tell anyone I suggested it), but it might avoid the overhead. --Karl _ Karl Swedberg www.englishrules.com www.learningjquery.com On Nov 6, 2007, at 3:43 PM, fambizzari wrote: You guys are all right, but so many rows on one page are necessary here. I'll try to figure out an acceptable work-around. Thanks On Nov 6, 8:38 pm, Andy Matthews [EMAIL PROTECTED] wrote: I'd have to agree. I can't see any practical reason why you'd need to display that much data on one page. Aside from the download, and rendering time, the performance of the browser with that much data in memory would be horrible. Scrolling, copying, etc. would all be severely affected. andy -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Jeffrey Kretz Sent: Tuesday, November 06, 2007 9:21 AM To: jquery-en@googlegroups.com Subject: [jQuery] Re: PROBLEM: Adding hover to table rows on large tables Personally, I would recommend looking at a paging solution, rather than trying to deal with so many rows on a single HTML page. I tested a simple 10,000 row table with very little data in it clocked in at a 2mb download, requiring 4 seconds to download and render as a local file on FireFox (i.e. no network traffic, loading the .htm file out of my local file system). And the more DOM elements of the page the harder it is to manipulate with any kind of scripting. If paging your results doesn't work for you, then the tr:hover CSS-only solution would really be the best way to go. JK -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of fambizzari Sent: Tuesday, November 06, 2007 2:29 AM To: jQuery (English) Subject: [jQuery] Re: PROBLEM: Adding hover to table rows on large tables The solution i adopted was CSS (tr:hover) for non-IE6 and only allow small tables to have hover-over using a class name to identify them. Any better solutions? On Nov 6, 10:45 am, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: The following code works fine on small tables: $(table tbody tr).mouseover(function(){$(this).addClass(over);}).mouseout(function(){$( this).removeClass(over);}); But on tables with 5,000-10,000 rows, it throws the A script on this page may be busy, or it may have stopped responding. You can stop the script now, open the script in the debugger, or let the script continue. Can anyone suggest a workaround? Thanks
[jQuery] Re: PROBLEM: Adding hover to table rows on large tables
You could add onmouseover and onmouseout directly to the trs. It's ugly (don't tell anyone I suggested it), but it might avoid the overhead. --Karl _ Karl Swedberg www.englishrules.com www.learningjquery.com On Nov 6, 2007, at 3:43 PM, fambizzari wrote: You guys are all right, but so many rows on one page are necessary here. I'll try to figure out an acceptable work-around. Thanks On Nov 6, 8:38 pm, Andy Matthews [EMAIL PROTECTED] wrote: I'd have to agree. I can't see any practical reason why you'd need to display that much data on one page. Aside from the download, and rendering time, the performance of the browser with that much data in memory would be horrible. Scrolling, copying, etc. would all be severely affected. andy -Original Message- From: jquery-en@googlegroups.com [mailto:jquery- [EMAIL PROTECTED] On Behalf Of Jeffrey Kretz Sent: Tuesday, November 06, 2007 9:21 AM To: jquery-en@googlegroups.com Subject: [jQuery] Re: PROBLEM: Adding hover to table rows on large tables Personally, I would recommend looking at a paging solution, rather than trying to deal with so many rows on a single HTML page. I tested a simple 10,000 row table with very little data in it clocked in at a 2mb download, requiring 4 seconds to download and render as a local file on FireFox (i.e. no network traffic, loading the .htm file out of my local file system). And the more DOM elements of the page the harder it is to manipulate with any kind of scripting. If paging your results doesn't work for you, then the tr:hover CSS- only solution would really be the best way to go. JK -Original Message- From: jquery-en@googlegroups.com [mailto:jquery- [EMAIL PROTECTED] On Behalf Of fambizzari Sent: Tuesday, November 06, 2007 2:29 AM To: jQuery (English) Subject: [jQuery] Re: PROBLEM: Adding hover to table rows on large tables The solution i adopted was CSS (tr:hover) for non-IE6 and only allow small tables to have hover-over using a class name to identify them. Any better solutions? On Nov 6, 10:45 am, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: The following code works fine on small tables: $(table tbody tr).mouseover(function(){$(this).addClass(over);}).mouseout (function(){$( this).removeClass(over);}); But on tables with 5,000-10,000 rows, it throws the A script on this page may be busy, or it may have stopped responding. You can stop the script now, open the script in the debugger, or let the script continue. Can anyone suggest a workaround? Thanks
[jQuery] Re: Text finder in html
I wrote something exactly like this for a project. It's not 100% complete, but you're welcome to it. Maybe it'll help? // define the table var $table = $('#leadsTable tbody tr .leadName'); // the on keyDown event handler $('#filter').keyup(function(){ // get the current value of the text field var string = $(this).val().toUpperCase(); // loop over each item in $table $table.each(function(){ // set a string equal to the contents of the cell var contents = $('a',this).html().toUpperCase(); // check the string against that cell if ( !contents.match('^' + string) ){ // if what the user typed in doesn't match the cell then hide that TR. $(this).parent('tr').attr('class','hiddenTR'); } else { // if it does match, unhide it $(this).parent('tr').removeAttr('class','hiddenTR'); } }); }); // here my HTML table id=leadsTable thead tr td class=leadNameCustomer Name/td /tr /thead tbody !-- start: loop -- trtd class=leadName width=100%Customer Name/td/tr !-- end: loop -- /tbody /table -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of syg6 Sent: Tuesday, November 06, 2007 9:02 AM To: jQuery (English) Subject: [jQuery] Text finder in html I am trying to create a javascript-based text finder using jQuery. I have a table like this: table id=dataTable tr td data 1 /td /tr tr td data 2 /td /tr tr td data 3 /td /tr /table And I would like to be able to search for a text in any of the tds and highlight it. I tried something like this: function find() { text = jQuery(#findText).val(); columns = jQuery(table#dataTable td); for (i=0; icolumns.length; i++) { if (columns[i].innerHTML.indexOf(text) != -1) { jQuery(columns[i]).addClass(test); } } I have defined the test style like this: style type=text/css a.test { font-weight: bold; } /style When I run the script it does nothing. Not sure why. I've debugged it. jQuery(columns[i]) is an [Object] that has all the normal jQuery functions -- addClass(), append(), etc. but when I call any of them nothing happens. Can someone tell me what I am doing wrong? Thanks! Bob
[jQuery] tabs plugin, using remote option and onShow callback
on index.php im using the jquery tabs plugin with the remote option. the pages that are loaded when the tabs are clicked consist of an html form and a php script that calls a db to populate those form fields - all working fine now, some of the form fields should be tinyMCE textareas. before i started using the remote option in the tabs plugin, it worked fine. tinyMCE is loaded with a standard tinyMCE.init function. i can use the onShow callback of the forms plugin to show an alert(hey) message when the content of that tab is shown, but when i replace the alert with the tinyMCE.init function, it still doesnt get applied to the textareas. im guessing this is cause there is no link with the main tinymce.js file where the init function points to. could anyone tell me where im going wrong? surely i dont need to reload the whole tinymce.js file every time tabbed content is shown? thanks, stef
[jQuery] select and option Scripting
I want to run the JQuery script that is in the value attribute of my option tags, when they are selected. I know to use onchange= and probably 'this', but how do I get the string in the value tag to run as a function? select name=Add Criteria onchange= option value=$('#associate').removeClass('hidden');Associate/ option option value=$('#company').removeClass('hidden');Company/ option /select I feel like this should be simple, but I haven't been able to figure it out. I would be very appreciative of any help anyone can give me. Thank you very much!
[jQuery] Re: select and option Scripting
On Nov 6, 1:34 pm, Evan [EMAIL PROTECTED] wrote: I want to run the JQuery script that is in the value attribute of my option tags, when they are selected. I know to use onchange= and probably 'this', but how do I get the string in the value tag to run as a function? select name=Add Criteria onchange= option value=$('#associate').removeClass('hidden');Associate/ option option value=$('#company').removeClass('hidden');Company/ option /select I feel like this should be simple, but I haven't been able to figure it out. I would be very appreciative of any help anyone can give me. Thank you very much! How about: $(document).ready(function () { $('select[name=Add Criteria]').change(function () { if (this.value) { $('#'+this.value).removeClass('hidden'); } }); }); and: select name=Add Criteria option value=associateAssociate/option option value=companyCompany/option /select -Eric
[jQuery] Re: hover select/
Sorry...It takes forever for my responses to show up, but I think I responded to this with the wrong message.
[jQuery] Re: hover select/
On Nov 6, 2:07 pm, j05ef [EMAIL PROTECTED] wrote: helo, Here is the goal: A box containing a form (with a select) should only be visible as long as the mouse pointer is inside it. I used jQuery's hover function on the box but when the mouse pointer is moved over the select box's drop down menu to select an item, the box disappears because browsers don't set the relatedTarget property of the event, causing jQuery's hover function to signal a mouse out. I worked around this by checking if the event's relatedTarget is set but wonder if this isn't something that should be implemented by jQuery? Here's the demo, play with it by toggling the only comment. !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd; html xmlns=http://www.w3.org/1999/xhtml; xml:lang=en lang=en head titlePage Title/title meta http-equiv=Content-Type content=text/html; charset=iso-8859-1/ script type=text/javascript src=jquery.js/script script type=text/javascript $(document).ready(function(){ $('#foo_form').hover(function(e) { }, function(e) { //if(e.relatedTarget) $('#foo_form').hide() }) }) /script /head body a href=# onclick=$('#foo_form').show()show green box/a form id=foo_form action=# style=background:#CFC; padding: 10px; width: 200px pThe green box shall disappear when you move the mouse out of (it#8217;s) bounds!/p select optionSelect/option optionTry to select me A/option optionTry to select me B/option optionTry to select me C/option /select pNow go ahead and try to select something from the dropdown using your mouse!/p /form /body /html How about: $(document).ready(function () { $('select[name=Add Criteria]').change(function () { if (this.value) { $('#'+this.value).removeClass('hidden'); } }); }); and: select name=Add Criteria option value=associateAssociate/option option value=companyCompany/option /select -Eric
[jQuery] form submit on choosing select option
Hey guys, It seems that I'm unable to make up the right search term for google to find what I'm looking for: The eays jQuery way to make my form get submitted as soon as the user chooses an element from my select box. Should be easy,shouldn't it? Regards, Samy
[jQuery] Re: JSON + JQUERY Problem! Need help ASAP toJSONString not a function
Hi Bryan, Now that I look at the newer jQuery Ajax functions, I think you and I may be doing this the hard way. My how things change in just a month or two. I think you can just use the built-in function $.getJSON() and that should do what you need. Let me know if it doesn't. I'll look at trying this out in my project (if I have time!). Matt Penner -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Bryank Sent: Tuesday, November 06, 2007 6:01 AM To: jQuery (English) Subject: [jQuery] Re: JSON + JQUERY Problem! Need help ASAP toJSONString not a function Hi Matt, Thanks for the response. So when you say your solution was to use jQuery's JSON functions, do you pull in another JSON file, use the existing one, or something else. I would be awesome if you could list out the basic steps you took to solve your problem...maybe even with 1 example. I am not a JS guru by any stretch of the imagination, so I usually have to follow by example. Thanks, Bryan On Nov 5, 2:53 pm, Penner, Matthew [EMAIL PROTECTED] wrote: Hi Bryan, We had this problem as well. The solution was to use jQuery's JSON functions $.toJSON() .parseJSON() instead of those built into the JSON library. Matt Penner -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Bryank Sent: Monday, November 05, 2007 8:39 AM To: jQuery (English) Subject: [jQuery] JSON + JQUERY Problem! Need help ASAP toJSONString not a function Hi Everyone, First time poster on this group. We use JSON for various projects and one thing I am beginning to implement are some Jquery lightbox effects. Well, sure enough Jquery and JSON don't play nice in this regard. If I try one of the JSON No Augmenting JS files out on the web, that breaks the rest of our functionality that uses JSON. It typically barfs on a line that has something.toJSONString and says it is not a function. here is a snippet of example code. On th eline with postBody, it breaks. if (onException == null) onException = onExceptionDefault; var ajax = new Ajax.Request( url, { method: 'post', parameters: '', postBody: msg={ 'blahEvent' : + encodeURIComponent(blahEvent.toJSONString()) + }, IT BARFS HERE!!! // postBody: msg={'blahEvent' : + blahEvent.toJSONString() + }, onComplete: onComplete, onFailure: onFailure, onException: onException, asynchronous: curAsync }); Here is the FireBug output for the error: If you look closely on exceptionHappened, there are 2 undefined's. ===FIREBUG OUTPUT=== _makeRequest(Object _type=ajaxGetEvents type=ajaxGetEvents, eventsReceived(r), false, exceptionHappened(requestor, ex, doRedirect), undefined, undefined)gapsession.js (line 781) getBlahEvents()gapsession.js (line 717) getEventLoop()gapsession.js (line 23) handlePageLoad()idle.action# (line 172) onload(load ) = If I download one of the JSON plugins for Jquery as a solution, can you provide me an example of the code I just posted with the fix attached to it? Thanks, Bryan
[jQuery] Re: remove() deletes events in jQuery 1.2.1. Why?
Hi Felix, I presume you mean you upgraded from 1.1.3 to 1.2.1. The you're correct about the change being an anti-memory leak fix. You can do one of two things: 1. Use the native removeChild() method ( http://developer.mozilla.org/en/docs/DOM:element.removeChild ). This won't delete the events and will return the removed child so you can cache it for later. 2. Use the jQuery appendTo() method and append the elements to a hidden DIV. Karl Rudd On Nov 7, 2007 8:46 AM, Felix Geisendörfer [EMAIL PROTECTED] wrote: Hey, I recently upgraded my app from jQuery 1.3.1 to 1.2.1 and the transition was incredibly easy. However, yesterday I noticed that $().remove() now seems to behave differently then it did in 1.3.1. Thats because now it deletes any events attached to the element removed. This happens to be a problem in my app b/c I remove unneeded elements from the DOM instead of hiding them and inject them back in later on. So when they are injected again, they suddenly don't work anymore : ). Now I looked through the manual and it says this is going to be the expected behavior in 1.2.2: http://docs.jquery.com/Manipulation/remove Which confuses me b/c it already seems to be the case in 1.2.1 and I'm also wondering how I could remove DOM elements without deleting their events in future? I'm also curious about why this change is being made, is it some anti-memory leak thingy? Thanks a lot, -- Felix -- Blogger: http://www.thinkingphp.org/ Entrepreneur: http://www.posttask.com/ -- currently in private beta, ask me for invite / password Freelancer: http://www.fg-webdesign.de/ AIM: theundefined87 Skype: TimeFor23 Other IM: felixge.de Mobile (USA): +1 404 3888693 Mobile (GER): +49 162 9391612 Twitter: http://twitter.com/felixge
[jQuery] Re: form submit on choosing select option
This should do it: $(#myselectid).change(function() { document.formname.submit(); }); -- Josh - Original Message - From: Samuel Vogel To: jquery-en@googlegroups.com Sent: Tuesday, November 06, 2007 2:41 PM Subject: [jQuery] form submit on choosing select option Hey guys, It seems that I'm unable to make up the right search term for google to find what I'm looking for: The eays jQuery way to make my form get submitted as soon as the user chooses an element from my select box. Should be easy,shouldn't it? Regards, Samy
[jQuery] thickbox IE7 position
I am using a thickbox modal window to show an ajax routine on an ecommerce site. Everything's working great, except in IE7 where the thickbox is aligning to the bottom of the page, rather than centering vertically. (When the page is longer than the viewer's browser window,this results in part of the window being below the viewable area, with no way to scroll or otherwise get to the crucial select/cancel buttons that allow the user to continue from that point.) Is this a common thickbox issue, and if so, is there a sure-fire fix? Everything is fine in IE6 and in Firefox. I've seen other posts with the same problem, but none of the suggested fixes are fixing my page. If this isn't a stock 'the fix is abc' situation, I will post an example link (for now I'd rather keep the site from the spiders until its a bit further along) Any suggestions greatly appreciated. I did spend some time googling about the issue, but found more questions than answers. tia -- -- Michael Evangelista, Evangelista Design Web : www.mredesign.com Newsgroups: news://forums.mredesign.com Blog : www.miuaiga.com
[jQuery] Re: jQuery Cycle Plugin: how to fade the first image also...
I have discoverde the very best jQuery Cycle Plugin: i want to create a fading with a few image... alll work fine but it is possible to apply the fade effect at the first image also? Thank You Ciao! Hi Andrea, The Cycle Plugin does not currently support that behavior, but with jQuery v1.2 and later you could probably do this to achieve that effect: $(document).ready(function() { var slideTimeout = 4000; // 4 sec $('#slideshow').cycle({ delay: slideTimeout, timeout: slideTimeout }) .find('img:eq(0)') .hide() .queue(function() { var $this = $(this); setTimeout(function() { $this.dequeue(); }, slideTimeout); }) .fadeIn('slow'); }); Mike
[jQuery] Re: Use jQuery to initialise a variable from xml
On Nov 6, 1:13 pm, Stu [EMAIL PROTECTED] wrote: OK, imagine I am a moron who has managed to get the following to work: A web page that displays one of 25 different pictures depending on the (manually declared) value of the variable 'picture'. Now, I am getting (or wish to get) the value from the value element in the following xml file (shown in all its glory): ?xml version=1.0 encoding=UTF-8 value1/value Now I seem to be reading the xml file into the page scripts OK but cannot get the variable 'picture' to initialise with a value from value. I am reading the file in as a DOM object using a readXMLData() function that is called in a body div of the file (function code is in the head). I have tried : var picture = 'node.firstChild.data' var picture = xmlDoc.selectSingleNode(value).nodeValue var picture = xmlDoc.getElementsByTagName(value) and even var picture = 'xsl:value-of select=value/ all instantiated from within the readXMLData() function and none of which worked. Can anyone help me? Please use baby steps and include such vital information as where in the file entries must be. Yours in desperation (I have wasted nearly 40 hours trying to get this to work!) If the XML that you showed above it was you are using...it is the cause of your issue. It is not formatted correctly (it is missing the ending ? in the xml tag. I was able to get the following to work: var myxml = '?xml version=1.0 encoding=UTF-8?value1/value'; $(document).ready(function () { var xmlobject = (new DOMParser()).parseFromString(myxml, text/xml); var node = xmlobject.getElementsByTagName('value')[0]; alert(node.firstChild.data); }); HTH -Eric
[jQuery] Re: select and option Scripting
That's it! Thank you very very very much. I appreciate your time - thank you! On Nov 6, 4:59 pm, Eric Martin [EMAIL PROTECTED] wrote: On Nov 6, 1:34 pm, Evan [EMAIL PROTECTED] wrote: I want to run the JQuery script that is in the value attribute of my option tags, when they are selected. I know to use onchange= and probably 'this', but how do I get the string in the value tag to run as a function? select name=Add Criteria onchange= option value=$('#associate').removeClass('hidden');Associate/ option option value=$('#company').removeClass('hidden');Company/ option /select I feel like this should be simple, but I haven't been able to figure it out. I would be very appreciative of any help anyone can give me. Thank you very much! How about: $(document).ready(function () { $('select[name=Add Criteria]').change(function () { if (this.value) { $('#'+this.value).removeClass('hidden'); } }); }); and: select name=Add Criteria option value=associateAssociate/option option value=companyCompany/option /select -Eric
[jQuery] Re: form submit on choosing select option
On Nov 6, 2:41 pm, Samuel Vogel [EMAIL PROTECTED] wrote: Hey guys, It seems that I'm unable to make up the right search term for google to find what I'm looking for: The eays jQuery way to make my form get submitted as soon as the user chooses an element from my select box. Should be easy,shouldn't it? Yes, it should, and is =) What have you tried so far? http://docs.jquery.com/Events http://docs.jquery.com/Events/change#fn http://docs.jquery.com/Events/submit#fn example: $(document).ready(function () { // what you want to watch $('select').change(function () { var myform = $(this).parent(); // submit the form based on something? if ($(this).val() == 1) { myform.submit(); } }); });
[jQuery] Re: New Plugin jQuery.Rule
Thanks for the comments, I released version 0.6. The 'css' function works better, and it uses jQuery.prop. The rules can be now manipulated using the methods: not, is, filter, add, andSelf. Plus all they had before. I found a workaround for the fact that rules, in IE, don't have the attribute 'parentStyleSheet'. Sadly another problem arised, IE seems to blow if you try to even check an attribute of a rule, that is not inside a stylesheet. This seems like a big problem, and avoiding it seems to require BIG hacks... if anyone can suggest something.. that would be awesome :) Ariel Flesler On 6 nov, 14:48, polyrhythmic [EMAIL PROTECTED] wrote: I can see some awesome uses for this. I also really like the jQuery style. Cool! Charles On Nov 6, 5:37 am, Suni [EMAIL PROTECTED] wrote: I think the idea is great! The demo looks very promising, it's easy to see several ways this could be (ab)used :) Nice work, please keep us informed as it progresses!- Ocultar texto de la cita - - Mostrar texto de la cita -
[jQuery] Superfish v1.3.1 - ie third level menu clipping display problem
Hello all, I had a problem that was very similar (prol' the same as) this guys: http://groups.google.com/group/jquery-en/browse_thread/thread/6112ba78fd2acc1 In other words, I do not see my third-level menu when using the vertical.css and a few modifications. Mostly, I widened the width's to 18, reduced the padding, and used a bold verdana font at .9em. Everything's cool in Firefox; work's great! Even fourth level is beautiful. IE just doesn't show anything outside the bounding area of the containing second-level UL element. Otherwise, it seems to be passable up to two levels. I looked a little further into it, and what's happening is the bounding box of the second-level UL element is clipping the display of the menu, which is right next to the edge of the second-level containing UL element. It acts as if overflow: hidden is set for the ul.nav li ul, although adjusting this doesn't do anything in IE. To test this (and I feel like prove it, since it seems clear, using the test and lots of css debugging) I shortened the length of the LI elements to something like 16.5em or something. And sure enough, there it was! On the right side of the LI element with the submenu, you could see 1.5em's of the missing menu. But only what was inside that UL element bounding box! If I widen the containing second-level UL, I get the third level, but it's a flow panel, so the LI elements slide over for both the UL and the containing third-level UL. I want to try to get this to work right in IE. Thanks! Jared
[jQuery] Re: SITE: http://www.foodnetwork.com/
Thats actually really cool, my wife is on the site daily. Not to go off topic, (or to trump your post Andy) but does anyone know the name of the grease monkey script or firefox plugin for detecting jquery? On 11/6/07, Andy Matthews [EMAIL PROTECTED] wrote: Don't know if this has already been posted or not, but it appears that FoodTV giant FoodNetwork.com is using jQuery (1.1.4): http://www.foodnetwork.com/ We're taking over people...we'll soon be reaching critical mass where businesses will be LOOKING for people who know jQuery! hip hip hooray. andy -- Benjamin Sterling http://www.KenzoMedia.com http://www.KenzoHosting.com http://www.benjaminsterling.com
[jQuery] Re: SITE: http://www.foodnetwork.com/
That's just got to give John and the rest of the jQuery core crew the warm fuzzies, you know? It would if I were in their shoes! :o) Chris On Nov 6, 2007 7:28 PM, Andy Matthews [EMAIL PROTECTED] wrote: Don't know if this has already been posted or not, but it appears that FoodTV giant FoodNetwork.com is using jQuery (1.1.4): http://www.foodnetwork.com/ We're taking over people...we'll soon be reaching critical mass where businesses will be LOOKING for people who know jQuery! hip hip hooray. andy -- http://cjordan.us
[jQuery] Re: SITE: http://www.foodnetwork.com/
Hey, We're taking over people...we'll soon be reaching critical mass where businesses will be LOOKING for people who know jQuery! Are you kidding me? This has long happened! I've seen a ton of job / gig advertisements asking for jQuery expertise in the past : ). But yeah, eventually people will be like Moo...jo...proto...what : )? (Dojo might be an exception actually, I can see reasons people would want to use dojo). -- Felix -- Blogger: http://www.thinkingphp.org/ Entrepreneur: http://www.posttask.com/ /-- currently in private beta, ask me for invite / password/ Freelancer: http://www.fg-webdesign.de/ AIM:theundefined87 Skype: TimeFor23 Other IM: felixge.de http://felixge.de/ Mobile (USA): +1 404 3888693 Mobile (GER): +49 162 9391612 Twitter:http://twitter.com/felixge Andy Matthews wrote: Don't know if this has already been posted or not, but it appears that FoodTV giant FoodNetwork.com is using jQuery (1.1.4): http://www.foodnetwork.com/ We're taking over people...we'll soon be reaching critical mass where businesses will be LOOKING for people who know jQuery! hip hip hooray. andy
[jQuery] jQuery Site Detection Greasemonkey Script
Hi everyone. The number of jQuery-powered sites being listed is incredible and the numbers just continue to grow. One of the methods that I use to find sites is via Paul Bakaus' awesome jQuery Site Detection Greasemonkey Script. It's a small script that detects the jQuery object and displays a small icon in the lower-right corner of the browser if it finds a jQuery-powered site. To install it, just follow these simple instructions: This is a Greasemonkey user script. To install it, you need Greasemonkey 0.3 or later: http://greasemonkey.mozdev.org/ Restart Firefox and visit this script: http://paul.jquery.com/jquerydetector.user.js Under Tools, there will be a new menu item to Install User Script. Accept the default configuration and install. That's it! I want to thank Paul for this wonderful script. Rey... jQuery Project Team
[jQuery] Re: Scripts at the bottom of the page
If you click on one of the links, while it's loading that page if your mouse moves over the other one it will raise the Javascript warning... I've seen this exact behavior with other tip libraries jQuery based, and others. I didn't fully track down the issue, but managed to minimize it by wrapping all 'inline' and attached javascript calls inside document.ready. The presumption at the time was that some script loading tags took longer to process, and were doing so whilst the page was building, and events firing. And if so, I guess the fix is to include jquery in the head (as soon as possible) and the rest can still be in the footer... In this case we loaded in the head, so if we have the same issue, that may not correct it. Of course we may have the same symptoms, but entirely different issues. ~ ~ David
[jQuery] using thickbox with jquery live
Is this possible. i have a drop down called #sealprofile that puts an image into a div called #profilepreview i have this image set up with class=thickbox i think i have to register a plugin or something with jquery live. how do i go about doing that?
[jQuery] Re: JQModal size and position
OK I'm a little tired but I think the problem was that I was trying to use the class jqmWindow and jqModal owns that class, I guess? Anyway, when I used a different class it worked as expected. Thanks, E On Nov 6, 8:04 pm, Eeby [EMAIL PROTECTED] wrote: I would like to use the excellent JQModal library, but I'm having a hard time getting the dialog to show up where I want. In the CSS that comes with it, the dialog has this style: .jqmWindow display: none; position: fixed; top: 17%; margin-left: -300; width: 600px; I want something more like: position: absolute top: 50px; right: 200px; left: 200px; bottom: 20px; However, no matter what values I enter the dialog either ends up in the default position, or halfway off the screen. It does not seem to respond to the usual CSS positioning rules. I did some searching and found mention that the dialog is wrapped with a div of class jqmWrap. I tried setting styles for that but it had no effect. I also used FireBug to look for it, but there was no div.jqmWrap in the DOM. Any help would be very appreciated. Thanks, E
[jQuery] Re: PROBLEM: Adding hover to table rows on large tables
In the end, we've gone for pagination on the most commonly used application and a warning on the least used application recommending users to keep their lists short.
[jQuery] SITE: http://www.foodnetwork.com/
Don't know if this has already been posted or not, but it appears that FoodTV giant FoodNetwork.com is using jQuery (1.1.4): http://www.foodnetwork.com/ We're taking over people...we'll soon be reaching critical mass where businesses will be LOOKING for people who know jQuery! hip hip hooray. andy