[jQuery] keeping table header fix
Hello guys, I'd like to know if there is a way to keep a table header fixed on top of a div while I scroll the table rows. I have a div high 200px and the table itself is around 300px so when I scroll down I'd like to always see the header on top. I already use for the table tablesorter so the solution must be compatible with that plug-in. Thanks and have a nice day! Sig
[jQuery] Re: Superfish menu problem.
Drop-down menu is working, but it will no display due to overflow:hidden in clear. You have to make some changes. Add height width in tail-top-menu and remove clear class from that div. .tail-top-menu { height:30px; width:100% } and also add height in .sf-menu a sf-menu li class according to requirement ... I think this will resolve your problem. Thanks Rupak On Wed, Sep 16, 2009 at 11:04 AM, sholland suzanna.holl...@gmail.comwrote: Here aree the CSS styles being applied to that menu position by the template and by the superfish css. Thanks Suzanna ***TEMPLATE CSS* .tail-top-menu{ background:#f0f0f1 url(../images/top_menu_tail.gif) bottom left repeat-x;} ** body, td, th, div, p, label{ color:#838383; font:normal 12px/16px Arial, Helvetica, sans-serif; } a { color:#5D5D60; text-decoration:underline; } a:hover { color:#5D5D60 ; text-decoration:none } select{color:#878B8E; font-size:11px;} *** .clear{ width:100%; overflow:hidden;} *** * { padding:0px 0px 0px 0px; margin:0px 0px 0px 0px; } * ul { list-style-type: disc; list-style-image: none; list-style-position: outside; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 15px; } .menu { margin-top: 14px; margin-right: 0pt; margin-bottom: 0px; margin-left: 31px; list-style-type: none; list-style-image: none; list-style-position: outside; padding-top: 1px; } END TEMPLATE CSS **SUPERFISH CSS .sf-menu, .sf-menu * { margin-top: 0pt; margin-right: 0pt; margin-bottom: 0pt; margin-left: 0pt; padding-top: 0pt; padding-right: 0pt; padding-bottom: 0pt; padding-left: 0pt; list-style-type: none; list-style-image: none; list-style-position: outside; } .sf-menu { line-height: 1; } .sf-menu { float: left; margin-bottom: 1em; } a { color: #5d5d60; text-decoration: underline; } a:hover { color: #5d5d60; text-decoration: none; } .menu li a { color: #91caff; font-size: 13px; text-decoration: none; padding-top: 0pt; padding-right: 0pt; padding-bottom: 0pt; padding-left: 27px; } .menu li a:hover { color: #ff; text-decoration: underline; } .sf-menu, .sf-menu * { margin-top: 0pt; margin-right: 0pt; margin-bottom: 0pt; margin-left: 0pt; padding-top: 0pt; padding-right: 0pt; padding-bottom: 0pt; padding-left: 0pt; list-style-type: none; list-style-image: none; list-style-position: outside; } .sf-menu a { display: block; position: relative; } .sf-menu a { border-left-width-value: 1px; border-left-style-value: solid; border-left-color-value: #ff; border-left-width-ltr-source: physical; border-left-width-rtl-source: physical; border-left-style-ltr-source: physical; border-left-style-rtl-source: physical; border-left-color-ltr-source: physical; border-left-color-rtl-source: physical; border-top-width: 1px; border-top-style: solid; border-top-color: #cfdeff; padding-top: 0.75em; padding-right: 1em; padding-bottom: 0.75em; padding-left: 1em; text-decoration: none; } .sf-menu a, .sf-menu a:visited { color: #1133aa; } .sf-menu a, .sf-menu a:visited { color: #1133aa; } .sf-menu li:hover, .sf-menu li.sfHover, .sf-menu a:focus, .sf-menu a:hover, .sf-menu a:active { background-color: #cfdeff; background-image: none; background-repeat: repeat; background-attachment: scroll; background-position: 0% 0%; outline-color: -moz-use-text-color; outline-style: none; outline-width: 0pt; } .sf-menu li:hover, .sf-menu li.sfHover, .sf-menu a:focus, .sf-menu a:hover, .sf-menu a:active { background-color: #cfdeff; background-image: none; background-repeat: repeat; background-attachment: scroll; background-position: 0% 0%; outline-color: -moz-use-text-color; outline-style: none; outline-width: 0pt; } END SUPERFISH CSS
[jQuery] Re: Object doesn't support this property or method in IE
Hmm. No idea why it doesn't work in IE, but here are some general observations: You don't need the jQuery(function(){ part around the function. setTimeout(updateStatus, 2); // use the function object $(document).ready(updateStatus); //same here, pass the object, don't call the function. this can also go in the head script along with the rest See how that works out, here's the code: http://snipt.org/mogk And you could use some logic to make it less spaguetti too: http://snipt.org/mogl On Sep 15, 3:08 pm, knox203 sandf...@gmail.com wrote: Hello everyone, I have the following code that works great in Firefox, Opera, Safari, but fails to work in IE. Can anyone take a look and maybe tell me what I'm doing wrong? Thanks! head script type=text/javascript src=../conduit/jquery.js/script script function updateStatus(){ jQuery(function(){ $(#prov1hCount).load(source/provStats.php #prov1hCount); $(#prov1hOntime).load(source/provStats.php #prov1hOntime); $(#prov1hLate).load(source/provStats.php #prov1hLate); $(#prov1hPuAverage).load(source/provStats.php #prov1hPuAverage); $(#prov1hMTDPuAverage).load(source/provStats.php #prov1hMTDPuAverage); $(#prov2hCount).load(source/provStats.php #prov2hCount); $(#prov2hOntime).load(source/provStats.php #prov2hOntime); $(#prov2hLate).load(source/provStats.php #prov2hLate); $(#prov2hPuAverage).load(source/provStats.php #prov2hPuAverage); $(#prov2hDelAverage).load(source/provStats.php #prov2hDelAverage); $(#prov2hMTDPuAverage).load(source/provStats.php #prov2hMTDPuAverage); }); setTimeout(updateStatus(),2); } /script /head body ... /body script type=text/javascript $(document).ready(updateStatus()); /script
[jQuery] Re: Object doesn't support this property or method in IE
I have face similar problem . Just check is there any html open or close tag missing in provStats.php. Thanks Rupak On Wed, Sep 16, 2009 at 12:16 PM, Ricardo ricardob...@gmail.com wrote: Hmm. No idea why it doesn't work in IE, but here are some general observations: You don't need the jQuery(function(){ part around the function. setTimeout(updateStatus, 2); // use the function object $(document).ready(updateStatus); //same here, pass the object, don't call the function. this can also go in the head script along with the rest See how that works out, here's the code: http://snipt.org/mogk And you could use some logic to make it less spaguetti too: http://snipt.org/mogl On Sep 15, 3:08 pm, knox203 sandf...@gmail.com wrote: Hello everyone, I have the following code that works great in Firefox, Opera, Safari, but fails to work in IE. Can anyone take a look and maybe tell me what I'm doing wrong? Thanks! head script type=text/javascript src=../conduit/jquery.js/script script function updateStatus(){ jQuery(function(){ $(#prov1hCount).load(source/provStats.php #prov1hCount); $(#prov1hOntime).load(source/provStats.php #prov1hOntime); $(#prov1hLate).load(source/provStats.php #prov1hLate); $(#prov1hPuAverage).load(source/provStats.php #prov1hPuAverage); $(#prov1hMTDPuAverage).load(source/provStats.php #prov1hMTDPuAverage); $(#prov2hCount).load(source/provStats.php #prov2hCount); $(#prov2hOntime).load(source/provStats.php #prov2hOntime); $(#prov2hLate).load(source/provStats.php #prov2hLate); $(#prov2hPuAverage).load(source/provStats.php #prov2hPuAverage); $(#prov2hDelAverage).load(source/provStats.php #prov2hDelAverage); $(#prov2hMTDPuAverage).load(source/provStats.php #prov2hMTDPuAverage); }); setTimeout(updateStatus(),2); } /script /head body ... /body script type=text/javascript $(document).ready(updateStatus()); /script
[jQuery] Problem loading flash movie inside div
Hello, I have a div that already contains a flash movie and some code that adobe flash needs to display the movie: /// div id=mydiv !--url's used in the movie-- !--text used in the movie-- !-- p align=left/p p align=center/p -- !-- saved from url=(0013)about:internet -- script language=JavaScript type=text/javascript AC_FL_RunContent( 'codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,0,0', 'width', '800', 'height', '450', 'src', 'animation', 'quality', 'high', 'pluginspage', 'http://www.adobe.com/go/getflashplayer', 'align', 'middle', 'play', 'true', 'loop', 'true', 'scale', 'showall', 'wmode', 'window', 'devicefont', 'false', 'id', 'animation', 'bgcolor', '#ff', 'name', 'animation', 'menu', 'true', 'allowFullScreen', 'false', 'allowScriptAccess','sameDomain', 'movie', 'animation', 'salign', '' ); //end AC code /script noscript object classid=clsid:d27cdb6e-ae6d-11cf-96b8-44455354 codebase=http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,0,0; width=800 height=450 id=animation align=middle param name=allowScriptAccess value=sameDomain / param name=allowFullScreen value=false / param name=movie value=animation.swf /param name=quality value=high /param name=bgcolor value=#ff / embed src=animation.swf quality=high bgcolor=#ff width=800 height=450 name=animation align=middle allowScriptAccess=sameDomain allowFullScreen=false type=application/x-shockwave-flash pluginspage=http://www.adobe.com/go/getflashplayer; / /object /noscript /div // I'am attempting to load an html document that contains only a portion of html identical to the one in the div but pointing to another swf: / !--url's used in the movie-- !--text used in the movie-- !-- p align=left/p p align=center/p -- !-- saved from url=(0013)about:internet -- script language=JavaScript type=text/javascript AC_FL_RunContent( 'codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,0,0', 'width', '800', 'height', '450', 'src', 'animation2', 'quality', 'high', 'pluginspage', 'http://www.adobe.com/go/getflashplayer', 'align', 'middle', 'play', 'true', 'loop', 'true', 'scale', 'showall', 'wmode', 'window', 'devicefont', 'false', 'id', 'animation2', 'bgcolor', '#ff', 'name', 'animation2', 'menu', 'true', 'allowFullScreen', 'false', 'allowScriptAccess','sameDomain', 'movie', 'animation2', 'salign', '' ); //end AC code /script noscript object classid=clsid:d27cdb6e-ae6d-11cf-96b8-44455354 codebase=http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,0,0; width=800 height=450 id=animation2 align=middle param name=allowScriptAccess value=sameDomain / param name=allowFullScreen value=false / param name=movie value=animation2.swf /param name=quality value=high /param name=bgcolor value=#ff / embed src=animation2.swf quality=high bgcolor=#ff width=800 height=450 name=animation2 align=middle allowScriptAccess=sameDomain allowFullScreen=false type=application/x-shockwave-flash pluginspage=http://www.adobe.com/go/getflashplayer; / /object /noscript I'm using: $(#mydiv).load('swf.html') When I try to load it the content of the loaded html replaces the entire document, doesn't stay in div, why should it be?
[jQuery] Re: JQuery Cycle Plugin Random Timeout
Given that, how would you allocate a timeout for say the first 3 slides and then have the other slides all running at the default timeout? On Sep 9, 8:06 pm, Mike Alsup mal...@gmail.com wrote: On Sep 8, 6:48 pm, Mike Alsup mal...@gmail.com wrote: Hey thanks Mike, I got the random timeouts working, however all the slideshows fade in at the same time on the first transition... is there any way around that? Here is my code: script type=text/javascript $(document).ready(function() { $('.slideshow').cycle({ fx: 'fade', timeout: 1, pause: '1', random: '1', timeoutFn: calculateTimeout }); }); function calculateTimeout(numRand) { var numRand = Math.floor(Math.random()*5000)+2000; return numRand; } Hmmm, currently the first transition still respects the 'timeout' option (which is in milliseconds). So you would need to randomize that setting to achieve what you want. I will fix that bug so that the first timeout also uses thetimeoutFn. Mike This is now supported correctly in v2.72. Demo: http://www.malsup.com/jquery/cycle/timeout-random.html Download:http://www.malsup.com/jquery/cycle/download.html
[jQuery] Re: Blocking UI for synchronous ajax calls
Hi Mike: Thank you for your answer. I have understand what do you mean between lock the browser and block th UI. To test it I have put a sleep in my server (in the function that calls the synchronous ajax call ) and I have see that in IE7 and IE8, it´s true, but, in FF3, Opera 10, Chrome 2 the browser is not locked. Maybe there is a hack for this? I have written too much code in this way (for me, this is the logic way to make it) and I don´t want to change it if is not really necessary ;-( On 15 sep, 12:38, Mike Alsup mal...@gmail.com wrote: I have tested BlockUI Plugin but it does not start when I call it, because I can see with Firebub that the ajax calls are finished when BlockUI Plugin starts. And that is exactly the problem with making synchronous calls to the server - it locks the browser. I strongly recommend using asynchronous calls instead - I wish the XHR didn't even have a sync API because I don't believe it should ever be used. Asynchronous programming is only mildly more abstract that synchronous. Mike
[jQuery] Re: Blocking UI for synchronous ajax calls
Hi Mike: Thank you for your answer. I have understand what do you mean between lock the browser and block th UI. To test it I have put a sleep in my server (in the function that calls the synchronous ajax call ) and I have see that in IE7 and IE8, it´s true, but, in FF3, Opera 10, Chrome 2 the browser is not locked. Maybe there is a hack for this? I have written too much code in this way (for me, this is the logic way to make it) and I don´t want to change it if is not really necessary ;-( On 15 sep, 12:38, Mike Alsup mal...@gmail.com wrote: I have tested BlockUI Plugin but it does not start when I call it, because I can see with Firebub that the ajax calls are finished when BlockUI Plugin starts. And that is exactly the problem with making synchronous calls to the server - it locks the browser. I strongly recommend using asynchronous calls instead - I wish the XHR didn't even have a sync API because I don't believe it should ever be used. Asynchronous programming is only mildly more abstract that synchronous. Mike
[jQuery] Re: [autocompleter] how to change the separator from , to +
but where should I put it? On Sep 13, 5:47 pm, alexbodn.gro...@gmail.com wrote: multipleSeparator='+' On Sun, Sep 13, 2009 at 14:22, James spidman...@gmail.com wrote: hey, let me first thank for the great job you've done. could you please tell me how can I change the word separator from , to +? thanks in advance. -- alex smime.p7s 1KViewDownload
[jQuery] caching result of selector in object, reusing
Hi, I have some selectors - an example would be $(#LinkToPreviousHit) all of which work fine when used directly. If I use it to toggle the class, which also works, I might do - $(#LinkToPreviousHit).attr({class: activeNavButton}); since I am using my selectors in multiple places I figured I would remove the multiple class to the selector and move it into an object - here is what I have (names will probably be changed when working) var NavDisplay = { NextHitB: $(#LinkToNextHit), LastHitB: $(#LinkToPreviousHit), ToggleNext: function(switcher){ if(typeOf(switcher)==='undefined' || typeOf(switcher) === null){ switcher = Boolean(!navTrack.NextHitInactive); } if(switcher){ navTrack.NextHitInactive = true; NavDisplay.NextHitB.attr({class: inactiveNavButton}); }else{ navTrack.NextHitInactive = false; NavDisplay.NextHitB.attr({class: activeNavButton}); } }, ShowPrevious: function(switcher){ if(typeOf(switcher)==='undefined' || typeOf(switcher) === null){ switcher = Boolean(!navTrack.HasPrevious); } if(switcher){ if(!navTrack.HasPrevious){ NavDisplay.LastHitB.attr({class: activeNavButton}); navTrack.HasPrevious=true; } }else{ if(navTrack.HasPrevious){ NavDisplay.LastHitB.attr({class: inactiveNavButton}); navTrack.HasPrevious=false; } } } }; I have also tried using it as window.NavDisplay with no result. There are no errors raised and the properties of the navTrack object are changed correctly. However the class is never switched between inactiveNavButton and activeNavButton or vice versa. As soon as I use the selectors directly - for example as in the following: var NavDisplay = { NextHitB: $(#LinkToNextHit), LastHitB: $(#LinkToPreviousHit), NextHitInactive: function(){ navTrack.NextHitInactive = true; NavDisplay.NextHitB.attr({class: inactiveNavButton}); }, ToggleNext: function(switcher){ if(typeOf(switcher)==='undefined' || typeOf(switcher) === null){ switcher = Boolean(!navTrack.NextHitInactive); } if(switcher){ navTrack.NextHitInactive = true; $(#LinkToNextHit).attr({class: inactiveNavButton}); }else{ navTrack.NextHitInactive = false; $(#LinkToNextHit).attr({class: activeNavButton}); } }, ShowPrevious: function(switcher){ if(typeOf(switcher)==='undefined' || typeOf(switcher) === null){ switcher = Boolean(!navTrack.HasPrevious); } if(switcher){ if(!navTrack.HasPrevious){ $(#LinkToPreviousHit).attr({class: activeNavButton}); navTrack.HasPrevious=true; } }else{ if(navTrack.HasPrevious){ $(#LinkToPreviousHit).attr({class: inactiveNavButton}); navTrack.HasPrevious=false; } } } }; then it works fine. Is there any reason why my current caching of the selector is not working? And is there any way you can suggest whereby I can cache my selector that will work?
[jQuery] Safari 4 with jQuery/Json - anyone experience problems?
Hi everyone I've been working on an ajax call which activates a spellchecker when someone inputs a word (if it's incorrect) and returns a Json string of suggestions for the user to choose from, and then be able to replace the incorrect word. It seems to work the first couple of times but then Safari will hang and finally quit. I'm not sure what I've done wrong, but for some reason the console on FF doesn't register the call so I'm assuming something else is causing a problem - unless there's a compatibility issue with jQuery on Safari 4. Here's my function that calls the spellchecker (Sorry it's a bit long!) /**/ var SpellCheckOptions = { learn : false, serverScriptURL : 'spellchecker.php' }; function checkSpelling(type,targetId,exists,len,ulen) { var theid = #+targetId; var $spellcheckthis = $(theid); var thetext = $spellcheckthis.text(); var callback = function(textInfos) { if(type==textarea){ $(form)[0].reset(); // reset textarea content before populating it with the edited text } $spellcheckthis.text(textInfos[0].text); if(type==word){ // if we're spell checking a word/phrase if(exists == false){ // if that word doesn't exist in the userwords array if(len6){ words[targetId][1].push(textInfos[0].text); var userwordexists = false; for(var u=0;uulen;u++){ if(userwords[u][0] == targetId){ userwords[u][1] = textInfos[0].text; userwordexists = true; } } if(userwordexists == false){ // i.e. the id was not present in the userwords array... userwords.push(new Array(targetId, textInfos[0].text)); // create a new level to the userwords array. } }else{ words[targetId][1].splice(0,1,textInfos[0].text); var userwordexists = false; for(var u=0;uulen;u++){ if(userwords[u][0] == targetId){ userwords[u][1] = textInfos[0].text; userwordexists = true; } userwords[u][1] = textInfos[0].text; } } }return false; }else{ // it's a textarea, so no templated userwords need to be saved. alert(Spellcheck complete. Profile saved.); } }// end call back jQuery.ajax({ // send details to server type : 'POST', dataType : 'json', url : SpellCheckOptions.serverScriptURL, data : { words : thetext }, success : function(result) { if(result) { console.log(result); SpellCheckOptions.useServer=result; var spellcheck = JQSpellCheckDialog.create({text : thetext}, callback, SpellCheckOptions); spellcheck.open(); }else{if ( (!type)|| (type==undefined) ){if(exists == false){if(len6){words[targetId][1].push(thetext); var userwordexists = false;for(var u=0;uulen;u++){if(userwords[u][0] == targetId){userwords[u][1] = thetext; userwordexists = true;}}if(userwordexists == false){userwords.push (new Array(targetId, thetext));} }else{words[targetId][1].splice(0,1,thetext);userwords[targetId][1] = thetext;}}}else{ if(type=='textarea'){alert(Spellcheck complete. Profile saved.);}}}// end success function. }});// end ajax call } /**/ Of course, it may be another part of this function which is causing the hang - although like i say it works the first time around. Plus it's absolutely fine in FF and IE... Thanks for reading Mike
[jQuery] Re: [ first quest...]
thank´s you understand me! From: Ralph Whitbeck Sent: Tuesday, September 15, 2009 11:01 PM To: jquery-en@googlegroups.com Subject: [jQuery] Re: [ first quest...] So if I understand what you're trying to do correctly. You want to select the first p tag that has the index of 0 in the matched set AND you want to select all p tags after the 5th index in the same matched set. This will do that: $(p:eq(0), p:gt(5)); Documentation: http://docs.jquery.com/Selectors/eq#index http://docs.jquery.com/Selectors/gt#index http://docs.jquery.com/Selectors/multiple#selector1selector2selectorN On Tue, Sep 15, 2009 at 8:57 PM, Lord Gustavo Miguel Angel goosfanc...@gmail.com wrote: Hi, I have 3 or more p label. How i do to do this: if (p:eq(..) == 0) .and. p:eq() 5) then ... endif Thank´s
[jQuery] Re: Quicksearch. How to match only the beginning of a word?
I actually found the answer by myself. I edited two functions in the plugin itself (not in the options). Here it is for anyone who might need it. Original functions: function get_key() { var input = strip_html($('input[rel=' + options.randomElement + ']').val()); if (input.indexOf(' ') === -1) { return input; } else { return input.split( ); } } function test_key_string(k, value) { return (value.indexOf(k) -1); } Modified functions: function get_key() // Returns the entered text { var input = strip_html($('input[rel=' + options.randomElement + ']').val()); return input; } function test_key_string(k, value) { var reg = new RegExp((^+ k +| + k + ),i); return reg.test(value); } I hope this helps anyone. On Sep 11, 2:38 pm, minbo sansonh...@gmail.com wrote: Hello, I'm using theQuicksearchplug-in and it does everything I need except for one thing. If I have two rows, for example: Blood oranges and Green apples and I search for a, it's going to match both rows because it matches the a in oranges. What I need to is to match only the beginning of each word, so that typing a in this case would only give me Green apples. Does anyone know if this is possible? Thank you for your help!
[jQuery] Re: Timers plugin and IE8 trouble
I solved it. It was caching problem, adding random query string does the thing: $('.sidebar').load('getjobs.php?rnd=' + new Date().getTime() );
[jQuery] Re: jQuery cycle IE issue
Hi Mike, Thanks for taking the time to respond but it still doesn't work. I've tried #slideshow1 and #slideshow1 img but still no improvement. I'm still getting the DOM queuing slideshow error in my console but now the height and width do have values. Any more suggestions? Thanks in advance :) malsup wrote: Try adding style rules for the anchors - they are the actual slides in your case: #slideshow1 a { height: 463px; width: 841px; display: block; } Mike -- View this message in context: http://www.nabble.com/jQuery-cycle-IE-issue-tp25457791s27240p25469127.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] [forms] [ajax] Form submits, success message displayed but no data seems to be passed to php file
Hi all, I have this Jquery code, below, which I was hpoing would pass the data from the form over to form processing script but the problem I have is that the success is returned but the processing script does not seem to get the form data passed to it. I have tested the script is called by just firing a success email off. What am I doing wrong, I'm lost in the forest and can't see the trees! I am including jquery, jquery.validate and jquery.form $(document).ready(function() { $(#myform).validate({ submitHandler: function() { $.ajax({ type: POST, url: thanks.php, success: function() { $('#contact_form').html(div id='message'/div); $('#message').html(h2Contact Form Submitted!/h2) .append(pWe will be in touch soon./p) .hide() .fadeIn(1500, function() { $('#message').append(img id='checkmark' src='/images/ check.png' /); }); } }); } }); });
[jQuery] Re: [forms] [ajax] Form submits, success message displayed but no data seems to be passed to php file
You don't specify any data to submit in your ajax call. Use the data option, or better yet, the form's plugin ajaxSubmit method. It will handle the form serialization for you. Jörn On Wed, Sep 16, 2009 at 11:42 AM, HairyJim james.d...@gmail.com wrote: Hi all, I have this Jquery code, below, which I was hpoing would pass the data from the form over to form processing script but the problem I have is that the success is returned but the processing script does not seem to get the form data passed to it. I have tested the script is called by just firing a success email off. What am I doing wrong, I'm lost in the forest and can't see the trees! I am including jquery, jquery.validate and jquery.form $(document).ready(function() { $(#myform).validate({ submitHandler: function() { $.ajax({ type: POST, url: thanks.php, success: function() { $('#contact_form').html(div id='message'/div); $('#message').html(h2Contact Form Submitted!/h2) .append(pWe will be in touch soon./p) .hide() .fadeIn(1500, function() { $('#message').append(img id='checkmark' src='/images/ check.png' /); }); } }); } }); });
[jQuery] fadeIn with IE 8 Compatibility Mode forced off
Hi, are there problems with the animation with IE8 compatibility mode forced off? I am using meta http-equiv=X-UA-Compatible content=IE=EmulateIE8 to force IE 8 out of compatibility mode for my site, as I need to use the new CSS support that IE 8 finally properly implements (it's an internal site, so I'm not worried about any other browsers), but I notice that in doing that the fadeIn (and Out) no longer seems to work - the content the method is being applied to just sits there for the fade duration and then disappears. This isn't a great hardship, but it would be nice to be able to showcase what jQuery can do and these effects would add a bit more wow-factor to the site. Thx MH
[jQuery] Re: [autocompleter] how to change the separator from , to +
On Wed, Sep 16, 2009 at 11:17, James spidman...@gmail.com wrote: but where should I put it? as an additional argument to autocomplete(). On Sep 13, 5:47 pm, alexbodn.gro...@gmail.com wrote: multipleSeparator='+' On Sun, Sep 13, 2009 at 14:22, James spidman...@gmail.com wrote: hey, let me first thank for the great job you've done. could you please tell me how can I change the word separator from , to +? thanks in advance. -- alex smime.p7s 1KViewDownload -- alex smime.p7s Description: S/MIME Cryptographic Signature
[jQuery] Re: Facebook Connect jQuery
wow, that works brilliantly. thanks! On Aug 30, 6:50 pm, Stefan Klasen kla...@gmail.com wrote: Do you use the ruby gem facebooker? It's using prototype as it's default JavaScript framework. Call it this way to use jquery instead: %= init_fb_connect('XFBML', :js = :jquery) % hope this helps On Sunday, August 30, 2009, Avishai avishai.we...@gmail.com wrote: Hi, I've been trying to implement Facebook Connect on my site, which uses jQuery pretty extensively. However, the minute I insert the FB connect code into my page, I get this error: Element.observe is not a function new()new (line 32) Element.observe(window,'load', function() {\n which is: 32 Element.observe(window,'load', function() { 33 FB_RequireFeatures([XFBML], function() { 34 FB.Facebook.init('','/xd_receiver.html', {}); 35 36 }); 37 }); 38 39//]] Has anyone else experienced this issue and knows how to resolve it? Thanks! Avishai
[jQuery] Re: [forms] [ajax] Form submits, success message displayed but no data seems to be passed to php file
Sorry, I have no idea where to use the .ajaxSubmit() option in the code. What do I need to change to pass the data over to the processing file? Thanks James On Sep 16, 10:49 am, Jörn Zaefferer joern.zaeffe...@googlemail.com wrote: You don't specify any data to submit in your ajax call. Use the data option, or better yet, the form's plugin ajaxSubmit method. It will handle the form serialization for you. Jörn On Wed, Sep 16, 2009 at 11:42 AM, HairyJim james.d...@gmail.com wrote: Hi all, I have this Jquery code, below, which I was hpoing would pass the data from the form over to form processing script but the problem I have is that the success is returned but the processing script does not seem to get the form data passed to it. I have tested the script is called by just firing a success email off. What am I doing wrong, I'm lost in the forest and can't see the trees! I am including jquery, jquery.validate and jquery.form $(document).ready(function() { $(#myform).validate({ submitHandler: function() { $.ajax({ type: POST, url: thanks.php, success: function() { $('#contact_form').html(div id='message'/div); $('#message').html(h2Contact Form Submitted!/h2) .append(pWe will be in touch soon./p) .hide() .fadeIn(1500, function() { $('#message').append(img id='checkmark' src='/images/ check.png' /); }); } }); } }); });
[jQuery] jQuery PDF Viewer?
I'm looking for something that can display a PDF in a way similar to a typical jQuery image gallery (or a desktop PDF viewer, e.g. Acrobat or Preview). I tried out Mike Alsup's jQuery Media Plugin (www.malsup.com/jquery/media/), thinking that the iframe player might do the trick. But of course, I still get the default browser behavior for a PDF, which in most cases (like Firefox) is to not display it at all. Works great in Safari, though, especially with the AdobePDFViewer.plugin. So does anyone know of something that could enable PDFs to be displayed on the page?
[jQuery] Simple CSS selector Question
Hi, I am a beginner in Jquery who simply set up the configs and start exploring.please help me in following. I have starter kit html page. form Form 2 input name=bar value=YYY / input / /form p p class=stuffOkie this is hiding example /p /p In script tag following things do not take effects 1. alert($(inp...@name=bar]).val()); - it suppose to alert the value of this input. 2. $(p...@class]).hide(); - My understanding is inner p tag should get hide
[jQuery] Re: [forms] [ajax] Form submits, success message displayed but no data seems to be passed to php file
Here is an example: http://jquery.bassistance.de/validate/demo/ajaxSubmit-intergration-demo.html Jörn On Wed, Sep 16, 2009 at 12:39 PM, HairyJim james.d...@gmail.com wrote: Sorry, I have no idea where to use the .ajaxSubmit() option in the code. What do I need to change to pass the data over to the processing file? Thanks James On Sep 16, 10:49 am, Jörn Zaefferer joern.zaeffe...@googlemail.com wrote: You don't specify any data to submit in your ajax call. Use the data option, or better yet, the form's plugin ajaxSubmit method. It will handle the form serialization for you. Jörn On Wed, Sep 16, 2009 at 11:42 AM, HairyJim james.d...@gmail.com wrote: Hi all, I have this Jquery code, below, which I was hpoing would pass the data from the form over to form processing script but the problem I have is that the success is returned but the processing script does not seem to get the form data passed to it. I have tested the script is called by just firing a success email off. What am I doing wrong, I'm lost in the forest and can't see the trees! I am including jquery, jquery.validate and jquery.form $(document).ready(function() { $(#myform).validate({ submitHandler: function() { $.ajax({ type: POST, url: thanks.php, success: function() { $('#contact_form').html(div id='message'/div); $('#message').html(h2Contact Form Submitted!/h2) .append(pWe will be in touch soon./p) .hide() .fadeIn(1500, function() { $('#message').append(img id='checkmark' src='/images/ check.png' /); }); } }); } }); });
[jQuery] Re: jQuery PDF Viewer?
I have'nt tried this but it does look goodhttp://pdfobject.com/ - S 2009/9/16 benji++ bheneg...@speakeasy.net I'm looking for something that can display a PDF in a way similar to a typical jQuery image gallery (or a desktop PDF viewer, e.g. Acrobat or Preview). I tried out Mike Alsup's jQuery Media Plugin (www.malsup.com/jquery/media/), thinking that the iframe player might do the trick. But of course, I still get the default browser behavior for a PDF, which in most cases (like Firefox) is to not display it at all. Works great in Safari, though, especially with the AdobePDFViewer.plugin. So does anyone know of something that could enable PDFs to be displayed on the page?
[jQuery] Re: keeping table header fix
do you actually have the headers in a thead, with the content in tbody ? Most people forget about those. L macsig wrote: Hello guys, I'd like to know if there is a way to keep a table header fixed on top of a div while I scroll the table rows. I have a div high 200px and the table itself is around 300px so when I scroll down I'd like to always see the header on top. I already use for the table tablesorter so the solution must be compatible with that plug-in. Thanks and have a nice day! Sig No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.409 / Virus Database: 270.13.100/2375 - Release Date: 09/16/09 05:51:00
[jQuery] Re: Simple CSS selector Question
Take out the @ in your attribute selectors. The @ was depricated in jQuery 1.2 and taken out in 1.3. So your new selectors will look like... 1. $(input[name=bar]) 2. $(p[class]) documentation http://docs.jquery.com/Selectors/attributeHas#attribute http://docs.jquery.com/Selectors/attributeEquals#attributevalue Ralph On Wed, Sep 16, 2009 at 2:36 AM, pritisolanki pritiatw...@gmail.com wrote: Hi, I am a beginner in Jquery who simply set up the configs and start exploring.please help me in following. I have starter kit html page. form Form 2 input name=bar value=YYY / input / /form p p class=stuffOkie this is hiding example /p /p In script tag following things do not take effects 1. alert($(inp...@name=bar]).val()); - it suppose to alert the value of this input. 2. $(p...@class]).hide(); - My understanding is inner p tag should get hide
[jQuery] Re: caching result of selector in object, reusing
Never mind, it should have been obvious, the object properties weren't in my document.ready On Sep 16, 10:31 am, pantagruel rasmussen.br...@gmail.com wrote: Hi, I have some selectors - an example would be $(#LinkToPreviousHit) all of which work fine when used directly. If I use it to toggle the class, which also works, I might do - $(#LinkToPreviousHit).attr({class: activeNavButton}); since I am using my selectors in multiple places I figured I would remove the multiple class to the selector and move it into an object - here is what I have (names will probably be changed when working) var NavDisplay = { NextHitB: $(#LinkToNextHit), LastHitB: $(#LinkToPreviousHit), ToggleNext: function(switcher){ if(typeOf(switcher)==='undefined' || typeOf(switcher) === null){ switcher = Boolean(!navTrack.NextHitInactive);} if(switcher){ navTrack.NextHitInactive = true; NavDisplay.NextHitB.attr({class: inactiveNavButton}); }else{ navTrack.NextHitInactive = false; NavDisplay.NextHitB.attr({class: activeNavButton}); }}, ShowPrevious: function(switcher){ if(typeOf(switcher)==='undefined' || typeOf(switcher) === null){ switcher = Boolean(!navTrack.HasPrevious);} if(switcher){ if(!navTrack.HasPrevious){ NavDisplay.LastHitB.attr({class: activeNavButton}); navTrack.HasPrevious=true; } }else{ if(navTrack.HasPrevious){ NavDisplay.LastHitB.attr({class: inactiveNavButton}); navTrack.HasPrevious=false; } } } }; I have also tried using it as window.NavDisplay with no result. There are no errors raised and the properties of the navTrack object are changed correctly. However the class is never switched between inactiveNavButton and activeNavButton or vice versa. As soon as I use the selectors directly - for example as in the following: var NavDisplay = { NextHitB: $(#LinkToNextHit), LastHitB: $(#LinkToPreviousHit), NextHitInactive: function(){ navTrack.NextHitInactive = true; NavDisplay.NextHitB.attr({class: inactiveNavButton}); }, ToggleNext: function(switcher){ if(typeOf(switcher)==='undefined' || typeOf(switcher) === null){ switcher = Boolean(!navTrack.NextHitInactive);} if(switcher){ navTrack.NextHitInactive = true; $(#LinkToNextHit).attr({class: inactiveNavButton}); }else{ navTrack.NextHitInactive = false; $(#LinkToNextHit).attr({class: activeNavButton}); }}, ShowPrevious: function(switcher){ if(typeOf(switcher)==='undefined' || typeOf(switcher) === null){ switcher = Boolean(!navTrack.HasPrevious);} if(switcher){ if(!navTrack.HasPrevious){ $(#LinkToPreviousHit).attr({class: activeNavButton}); navTrack.HasPrevious=true; } }else{ if(navTrack.HasPrevious){ $(#LinkToPreviousHit).attr({class: inactiveNavButton}); navTrack.HasPrevious=false; } } } }; then it works fine. Is there any reason why my current caching of the selector is not working? And is there any way you can suggest whereby I can cache my selector that will work?
[jQuery] Re: [forms] [ajax] Form submits, success message displayed but no data seems to be passed to php file
hmmm Im getting nowhere with this :/ So following the code on the page you suggested and the notes made about .ajaxSubmit I transpose it like thus but nothing happens, it does not even call the referenced thanks.php. jQuery(function(){ var options = { type: POST, url: thanks.php, success: function() { $('#contact_form').html(div id='message'/div); $('#message').html(h2Contact Form Submitted!/h2) .append(pWe will be in touch soon./p) .hide() .fadeIn(1500, function() { $('#message').append(img id='checkmark' src='/images/ check.png' /); }); } }; jQuery(#myform).validate({ submitHandler: function(myform) { // inside event callbacks 'this' is the DOM element so we first // wrap it in a jQuery object and then invoke ajaxSubmit jQuery(myform).ajaxSubmit(options); } }); }); On Sep 16, 11:52 am, Jörn Zaefferer joern.zaeffe...@googlemail.com wrote: Here is an example:http://jquery.bassistance.de/validate/demo/ajaxSubmit-intergration-de... Jörn On Wed, Sep 16, 2009 at 12:39 PM, HairyJim james.d...@gmail.com wrote: Sorry, I have no idea where to use the .ajaxSubmit() option in the code. What do I need to change to pass the data over to the processing file? Thanks James On Sep 16, 10:49 am, Jörn Zaefferer joern.zaeffe...@googlemail.com wrote: You don't specify any data to submit in your ajax call. Use the data option, or better yet, the form's plugin ajaxSubmit method. It will handle the form serialization for you. Jörn On Wed, Sep 16, 2009 at 11:42 AM, HairyJim james.d...@gmail.com wrote: Hi all, I have this Jquery code, below, which I was hpoing would pass the data from the form over to form processing script but the problem I have is that the success is returned but the processing script does not seem to get the form data passed to it. I have tested the script is called by just firing a success email off. What am I doing wrong, I'm lost in the forest and can't see the trees! I am including jquery, jquery.validate and jquery.form $(document).ready(function() { $(#myform).validate({ submitHandler: function() { $.ajax({ type: POST, url: thanks.php, success: function() { $('#contact_form').html(div id='message'/div); $('#message').html(h2Contact Form Submitted!/h2) .append(pWe will be in touch soon./p) .hide() .fadeIn(1500, function() { $('#message').append(img id='checkmark' src='/images/ check.png' /); }); } }); } }); });
[jQuery] Re: jQuery PDF Viewer?
Bumpbox works in all modern browsers. based on mootools Here's a list in which browsers it has been successfully tested: - *Firefox 3 - 3.5* - *Internet Explorer 6 | 7 | 8* - *Google Chrome* - *Apple Safari 3 | 4* - *Opera 9.04* http://www.artviper.net/bumpbox.php 2009/9/16 benji++ bheneg...@speakeasy.net I'm looking for something that can display a PDF in a way similar to a typical jQuery image gallery (or a desktop PDF viewer, e.g. Acrobat or Preview). I tried out Mike Alsup's jQuery Media Plugin (www.malsup.com/jquery/media/), thinking that the iframe player might do the trick. But of course, I still get the default browser behavior for a PDF, which in most cases (like Firefox) is to not display it at all. Works great in Safari, though, especially with the AdobePDFViewer.plugin. So does anyone know of something that could enable PDFs to be displayed on the page? -- strikingconcepts www.strikingconcepts.nl webdesign 06 450 860 83
[jQuery] this.reset() doesn't work
Hi, I am trying to reset all the form element but it is not working can someone suggest the reason. !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; head meta http-equiv=Content-Type content=text/html; charset=ISO-8859-1 / titlejQuery Starterkit/title link rel=stylesheet type=text/css media=screen href=screen.css / script src=jquery-1.3.2.min.js type=text/javascript/script script src=custom.js type=text/javascript/script /head body SCRIPT LANGUAGE=JavaScript !-- $(document).ready(function() { $(#reset).click(function() { $(form).each(function() { this.reset(); }); }); }); //-- /SCRIPT h1jQuery Starterkit/h1 h2This page contains code to test the examples. Most of it is only relevant for a example./h2 a id=first href=#Some link/a br/br/hr/ p p style=visibility:displayHehehehe so think you can hide me :-p / p /p br/br/hr/ form id=form name=form1 Form 1 input name=foo value=XXX / /form form id=form name=form2 Form 2 input name=bar value=YYY / /form form id=form name=form3 Form 3 input type=checkbox / input type=checkbox checked=checked / /form br/br/hr/ a id=reset href=#Reset!/a /body /html
[jQuery] JQUERY listnav: includeAll Parameter translation
It would be nice, if the includeAll parameter could be changed or extended to work like the noMatchText: Instead of true or false it should be empty or the text for the link i.e All, Alle, tous, todos
[jQuery] Loop over all input elements in form
Hi All, I tried $(form).each(function() { alert(this.name); alert($(input).val()); }); in following HTML form id=form name=form1 Form 1 input name=foo value=XXX / /form form id=form name=form2 Form 2 input name=blr value=YYY / /form form id=form name=form3 Form 3 input type=checkbox / input type=checkbox checked=checked / /form it only alert XXX nothing else !!! any idea about this. My journey till now is difficult in jquery :-( .Hope to see some answers tomorrow.
[jQuery] serializeArray() only for enabled form elements
Hello. I noticed that serializeArray() method does only include those elements that does not have the 'disabled' attribute... I wonder if it's intentional or am I doing something wrong...? -- nowotny
[jQuery] Re: jQuery PDF Viewer?
On Wed, Sep 16, 2009 at 7:21 AM, Geert Baven geertba...@gmail.com wrote: Bumpbox works in all modern browsers not if you're running Linux it doesn't. -- Turtle, turtle, on the ground, Pink and shiny, turn around.
[jQuery] Re: How to check is element droppable
It's not clear. Are you trying to use an element with a tag name of 'droppable'? Are you using jQuery UI Droppable? - Richard On Tue, Sep 15, 2009 at 2:36 PM, Boris Trivic trivu...@gmail.com wrote: if question isn't clear, I can explain better :) On Sep 15, 7:33 pm, Boris Trivic trivu...@gmail.com wrote: Hi. How I can check this? I have next part of code where I must check is element tag = droppable. Instead code after // pseudo: i must add some function that check if element is droppable. If true it must write some text in that element (For example: $(tag).text('bla bla') ) // code / function help(){ // array generated by PHP: ?=$correct? // random num. from upper array: var rand = Math.floor( Math.random() * cor.length ); // Set tag if(rand != 0){ var tag = '#p'+rand; } // here goes code that check if tag is droppable... /// pseudo: if(tag is droppable){ alert('is dropable'); }} CODE /
[jQuery] Re: serializeArray() only for enabled form elements
Hi there, this is intentional. only successful controls, as defined by the W3C, are serialized. For your reference (emphasis mine): A successful control is valid for submission. Every successful control has its control name paired with its current value as part of the submitted form data set. A successful control must be defined within a FORM element and must have a control name. However: • Controls that are disabled cannot be successful. • If a form contains more than one submit button, only the activated submit button is successful. • All on checkboxes may be successful. • For radio buttons that share the same value of the name attribute, only the on radio button may be successful. • For menus, the control name is provided by a SELECT element and values are provided by OPTION elements. Only selected options may be successful. When no options are selected, the control is not successful and neither the name nor any values are submitted to the server when the form is submitted. • The current value of a file select is a list of one or more file names. Upon submission of the form, the contents of each file are submitted with the rest of the form data. The file contents are packaged according to the form's content type. • The current value of an object control is determined by the object's implementation. If a control doesn't have a current value when the form is submitted, user agents are not required to treat it as a successful control. There are a couple other caveats that I didn't paste here. For the full deal, follow this link: http://www.w3.org/TR/html401/interact/forms.html#h-17.13.2 --Karl Karl Swedberg www.englishrules.com www.learningjquery.com On Sep 16, 2009, at 7:31 AM, nowotny wrote: Hello. I noticed that serializeArray() method does only include those elements that does not have the 'disabled' attribute... I wonder if it's intentional or am I doing something wrong...? -- nowotny
[jQuery] Re: this.reset() doesn't work
It should be $(this).reset(); But since your using an id in the selector, that will reset only the particular form you want. If you wish to reset all the forms in the page you should do something similar to this : $('form').each(function(){ $(this).reset(); }); You should of course put this piece of code in the document ready function. Thanks Regards, Dhruva Sagar. Pablo Picassohttp://www.brainyquote.com/quotes/authors/p/pablo_picasso.html - Computers are useless. They can only give you answers. On Wed, Sep 16, 2009 at 1:45 PM, pritisolanki pritiatw...@gmail.com wrote: Hi, I am trying to reset all the form element but it is not working can someone suggest the reason. !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; head meta http-equiv=Content-Type content=text/html; charset=ISO-8859-1 / titlejQuery Starterkit/title link rel=stylesheet type=text/css media=screen href=screen.css / script src=jquery-1.3.2.min.js type=text/javascript/script script src=custom.js type=text/javascript/script /head body SCRIPT LANGUAGE=JavaScript !-- $(document).ready(function() { $(#reset).click(function() { $(form).each(function() { this.reset(); }); }); }); //-- /SCRIPT h1jQuery Starterkit/h1 h2This page contains code to test the examples. Most of it is only relevant for a example./h2 a id=first href=#Some link/a br/br/hr/ p p style=visibility:displayHehehehe so think you can hide me :-p / p /p br/br/hr/ form id=form name=form1 Form 1 input name=foo value=XXX / /form form id=form name=form2 Form 2 input name=bar value=YYY / /form form id=form name=form3 Form 3 input type=checkbox / input type=checkbox checked=checked / /form br/br/hr/ a id=reset href=#Reset!/a /body /html
[jQuery] Re: Loop over all input elements in form
This should help : $('form input').each(function() { alert(this.name); alert($(this).val()); }); Thanks Regards, Dhruva Sagar. Jonathan Swifthttp://www.brainyquote.com/quotes/authors/j/jonathan_swift.html - May you live every day of your life. On Wed, Sep 16, 2009 at 3:26 PM, pritisolanki pritiatw...@gmail.com wrote: Hi All, I tried $(form).each(function() { alert(this.name); alert($(input).val()); }); in following HTML form id=form name=form1 Form 1 input name=foo value=XXX / /form form id=form name=form2 Form 2 input name=blr value=YYY / /form form id=form name=form3 Form 3 input type=checkbox / input type=checkbox checked=checked / /form it only alert XXX nothing else !!! any idea about this. My journey till now is difficult in jquery :-( .Hope to see some answers tomorrow.
[jQuery] Re: Loop over all input elements in form
Alertnatively just for your reference these are also some ways to get what you desire : $('form').each(function(){ $(this).children('input').each(function(){ alert(this.name); alert($(this).val()); }) }); Thanks Regards, Dhruva Sagar. Samuel Goldwynhttp://www.brainyquote.com/quotes/authors/s/samuel_goldwyn.html - I'm willing to admit that I may not always be right, but I am never wrong. On Wed, Sep 16, 2009 at 3:26 PM, pritisolanki pritiatw...@gmail.com wrote: Hi All, I tried $(form).each(function() { alert(this.name); alert($(input).val()); }); in following HTML form id=form name=form1 Form 1 input name=foo value=XXX / /form form id=form name=form2 Form 2 input name=blr value=YYY / /form form id=form name=form3 Form 3 input type=checkbox / input type=checkbox checked=checked / /form it only alert XXX nothing else !!! any idea about this. My journey till now is difficult in jquery :-( .Hope to see some answers tomorrow.
[jQuery] Re: [ajax] Form submits, success message displayed but no data seems to be passed to php file
SOLVED! Damn it, bloomin' windows and its file based permissions. So I tried all sorts to get this working looking at examples etc and nothing was working. Out of complete curiosity I went to go look at the jquery.form.js file and I couldn;t ruddy read it because I did not have the corrcet priv's set for the internet user. Reset permissions on the files and voila the below code works for me now! $(document).ready(function() { $(#myform).validate({ submitHandler: function(myform) { jQuery(myform).ajaxSubmit({ type: POST, url: thanks.php, success: function() { $('#contact_form').html(div id='message'/div); $('#message').html(h2Contact Form Submitted!/h2) .append(pWe will be in touch soon./p) .hide() .fadeIn(1500, function() { $('#message').append(img id='checkmark' src='/images/ check.png' /); }); } }); } }); }); On Sep 16, 12:38 pm, HairyJim james.d...@gmail.com wrote: hmmm Im getting nowhere with this :/ So following the code on the page you suggested and the notes made about .ajaxSubmit I transpose it like thus but nothing happens, it does not even call the referenced thanks.php. jQuery(function(){ var options = { type: POST, url: thanks.php, success: function() { $('#contact_form').html(div id='message'/div); $('#message').html(h2Contact Form Submitted!/h2) .append(pWe will be in touch soon./p) .hide() .fadeIn(1500, function() { $('#message').append(img id='checkmark' src='/images/ check.png' /); }); } }; jQuery(#myform).validate({ submitHandler: function(myform) { // inside event callbacks 'this' is the DOM element so we first // wrap it in a jQuery object and then invoke ajaxSubmit jQuery(myform).ajaxSubmit(options); } }); }); On Sep 16, 11:52 am, Jörn Zaefferer joern.zaeffe...@googlemail.com wrote: Here is an example:http://jquery.bassistance.de/validate/demo/ajaxSubmit-intergration-de... Jörn On Wed, Sep 16, 2009 at 12:39 PM, HairyJim james.d...@gmail.com wrote: Sorry, I have no idea where to use the .ajaxSubmit() option in the code. What do I need to change to pass the data over to the processing file? Thanks James On Sep 16, 10:49 am, Jörn Zaefferer joern.zaeffe...@googlemail.com wrote: You don't specify any data to submit in your ajax call. Use the data option, or better yet, the form's plugin ajaxSubmit method. It will handle the form serialization for you. Jörn On Wed, Sep 16, 2009 at 11:42 AM, HairyJim james.d...@gmail.com wrote: Hi all, I have this Jquery code, below, which I was hpoing would pass the data from the form over to form processing script but the problem I have is that the success is returned but the processing script does not seem to get the form data passed to it. I have tested the script is called by just firing a success email off. What am I doing wrong, I'm lost in the forest and can't see the trees! I am including jquery, jquery.validate and jquery.form $(document).ready(function() { $(#myform).validate({ submitHandler: function() { $.ajax({ type: POST, url: thanks.php, success: function() { $('#contact_form').html(div id='message'/div); $('#message').html(h2Contact Form Submitted!/h2) .append(pWe will be in touch soon./p) .hide() .fadeIn(1500, function() { $('#message').append(img id='checkmark' src='/images/ check.png' /); }); } }); } }); });
[jQuery] New to JQuery
Hello All, I am new here and I would need your support in order to get started. Where can I get tutorials and wikibooks on JQuery? Also recommend books. Regards, Emeka
[jQuery] Loading content from a url inside of a div to the actual div
First let me explain my situation im trying to place dynamic content into a sharepoint wiki site, which does not allow for direct javascript to be entered in. In order to do this im seting a div src=mywebpage.html. I would like to use that simple format for multiple div's eg: div src=mywebpage1.html/div div src=mywebpage2.html/div What i have so far is: head script type=text/javascript src=http://ajax.googleapis.com/ajax/ libs/jquery/1.3.2/jquery.min.js/script script type=text/javascript $(document).ready(function(){ contentDisp(); }); function contentDisp() { var src = $(.content).attr(src); $(.content).load(src); } /script /head body div class=content src=chevy.html/div div class=content src=honda.html/div div class=content src=yugo.html/div /body The example is a standard webpage i plan to incorporate the actual .js into the webpart once i can get the code to run off a normal page The issue is that this seems to select the first src as the variable and does not cycle through for each div, i have tried using (this) to select but i couldn't get that to load properly Any help would be much appreciated, the more i learn the more i love it :)
[jQuery] Re: JQuery Cycle Plugin Random Timeout
Given that, how would you allocate a timeout for say the first 3 slides and then have the other slides all running at the default timeout? Keep a counter and reference/update it in the timeoutFn. After 3 calls to the timeoutFn, return false thereafter.
[jQuery] why getJSON in firefox takes longer than in other browses?
Hello I'm using jQuery and asp.net. jQuery using getJSON calls specific handler, lets say MyHandler.ashx $.getJSON(/MyHandler.ashx?param1=someVal, function(data) { ... some code; } In Opera and Explorer this is executed immediately. In FireFox it takes over 1s before request is executed. Even when I set breakpoint in my handler it will be hit after 1s... could you tell me why it is so slow? I got latest version of firefox.
[jQuery] javascript
hi i am new to javascript language i written a script and it works fine and i modified it a bit and it is not working . i don't know why this is not working but the later is working well please tell me what is wrong with this // not working SocialSite.Home.UserInfo = { options : { beforeSubmit: this.friendRequest, success: this.friendResponse }, friendRequest : function(formData, jqForm, options) { }, friendResponse : function (responseText, statusText) { } }; $(document).ready(function() { $('#addasfriendform').ajaxSubmit(SocialSite.Home.UserInfo.options); }; // working SocialSite.Home.UserInfo = { friendRequest : function(formData, jqForm, options) { }, friendResponse : function (responseText, statusText) { } }; $(document).ready(function() { var options = { beforeSubmit: SocialSite.Home.UserInfo.friendRequest, success: SocialSite.Home.UserInfo.friendResponse }; $('#addasfriendform').ajaxSubmit(options); };
[jQuery] Re: New to JQuery
Read jQuery in Action http://www.manning.com/bibeault/ to get Started and then read the api doc to master it On Wed, Sep 16, 2009 at 6:13 PM, Emeka emekami...@gmail.com wrote: Hello All, I am new here and I would need your support in order to get started. Where can I get tutorials and wikibooks on JQuery? Also recommend books. Regards, Emeka
[jQuery] Re: javascript
i don't know why this is not working but the later is working well please tell me what is wrong with this // not working SocialSite.Home.UserInfo = { options : { beforeSubmit: this.friendRequest, success: this.friendResponse }, friendRequest : function(formData, jqForm, options) { }, friendResponse : function (responseText, statusText) { } }; 'this' in your options object is not referencing what you need. Change that part to be like your example that is working.
[jQuery] How to wait until the DOM has been updated by a jquery load before executing subsequent JavaScript?
Newbie question: I'm using JQuery's load function to update a portion of my page with new content. This works okay but I would also like to attach event handlers to the newly loaded content after it is loaded. There is probably a best practice approach to doing so but I am not aware of it. If someone could point me in the right direction it would be much appreciated. The approach that I am trying is not working and I'm not sure why. When showFavorites() is invoked, I want the content of a div in my page to be updated with a table. I also want to attach event handlers to the rows of the table. Here is my code ... function showFavorites(link){ alert('loading...'); $('div').load('/quotations/quotes2.jsp', null, attachEventHandlers ()); } function attachEventHandlers() { alert('number of trs ' + $('tr').size()); } According to the jQuery documentation I expect the call to load to be complete b4 the callback method attachEventHandlers() is called. However, the behavior that I've observed is that it's alert box gets displayed even before the one in showFavorites(). I'm confused by this behavior.
[jQuery] Re: How to wait until the DOM has been updated by a jquery load before executing subsequent JavaScript?
You're calling the function attachEventHandlers instead of passing a reference to the function. Take the () off. On Wed, Sep 16, 2009 at 9:55 AM, alexryan alexander.j.r...@gmail.com wrote: Newbie question: I'm using JQuery's load function to update a portion of my page with new content. This works okay but I would also like to attach event handlers to the newly loaded content after it is loaded. There is probably a best practice approach to doing so but I am not aware of it. If someone could point me in the right direction it would be much appreciated. The approach that I am trying is not working and I'm not sure why. When showFavorites() is invoked, I want the content of a div in my page to be updated with a table. I also want to attach event handlers to the rows of the table. Here is my code ... function showFavorites(link){ alert('loading...'); $('div').load('/quotations/quotes2.jsp', null, attachEventHandlers ()); } function attachEventHandlers() { alert('number of trs ' + $('tr').size()); } According to the jQuery documentation I expect the call to load to be complete b4 the callback method attachEventHandlers() is called. However, the behavior that I've observed is that it's alert box gets displayed even before the one in showFavorites(). I'm confused by this behavior. -- Turtle, turtle, on the ground, Pink and shiny, turn around.
[jQuery] Re: New to JQuery
The Learning jQuery book is also another great book. Also take a look at http://learningjquery.com and http://15daysofjquery.com/is a great site to get started. Also you can post your questions to the group here and we'll help you out. Good Luck Ralph On Wed, Sep 16, 2009 at 10:50 AM, Anantha Kumaran ananthakuma...@gmail.comwrote: Read jQuery in Action http://www.manning.com/bibeault/ to get Started and then read the api doc to master it On Wed, Sep 16, 2009 at 6:13 PM, Emeka emekami...@gmail.com wrote: Hello All, I am new here and I would need your support in order to get started. Where can I get tutorials and wikibooks on JQuery? Also recommend books. Regards, Emeka
[jQuery] jqzoom and IE
If on this product page - http://www.shanghaitattoo.com/magento/jingpingshuiyi/c2001 - and you click on the second or third thumbnail, while using IE 6 or 7, the zoom function breaks. I think when you view the error in IE7 you can understand a little better what's going wrong. But to tell the truth, I have no clue what's going wrong O_o Again, opera, safari, chrome, ff no problemo, why
[jQuery] Re: How to wait until the DOM has been updated by a jquery load before executing subsequent JavaScript?
That was it. Thank you Mike.
[jQuery] Re: Conflict between Simplemodal and jquery-ui slider?
The problem is that you are including the basic.js file from my site, which is causing a conflict. Remove that script and use the following code: $(document).ready(function() { $('#basic-modal input.basic, #basic-modal a.basic').click(function (e) { e.preventDefault(); $('#basic-modal-content').modal({onShow: function (d) { $(#slider-vertical, d.container[0]).slider({ orientation: vertical, range: min, min: 50, max: 300, value: 100, slide: function(event, ui) { $(#amount).val(ui.value); } }); }}); }); }); -Eric On Sep 11, 7:54 pm, folder123 kjau...@gmail.com wrote: The behavior i'm seeing is the onShow only seems to run once. On subsequent modal window opens the contents in onShow don't seem to execute. -k On Sep 11, 7:31 pm, folder123 kjau...@gmail.com wrote: I'm still having issues with the code below, the slider now doesn't even show up on a 2nd window open. Any thoughts greatly appreciated, I'm sure i'm missing something simple. -k On Sep 11, 2:52 pm, Eric Martin emarti...@gmail.com wrote: Use the onShow callback inSimpleModalto call the slider init code: $('#basic-modal-content').modal({onShow: function (dialog) { $(#slider-vertical, dialog.container[0]).slider({ orientation: vertical, range: min, min: 50, max: 300, value: 100, slide: function(event, ui) { $(#amount).val(ui.value); } }); }}); -Eric On Sep 10, 2:30 pm, folder123 kjau...@gmail.com wrote: Summary - Slider does not work inSimpleModalwindow after more than once. Detail: Step 1: Click to open modal window Step 2: Observe slider working properly, with value being updated, close modal Step 3: Click to open modal window Step 4: Observe slider NOT working properly, NaN being returned If you open the modal with the slider, then close the window, then re- open the modal and attempt to move the slider NaN errors occur. Attached is a simple html document that demonstrates the problem. This has also been posted to theSimpleModalgoogle code group. Any thoughts would be greatly appreciated, thanks for all the hard work on jquery. To replicate, please cut and paste the following into a html document. html xmlns=http://www.w3.org/1999/xhtml; head link type=text/css href=http://jqueryui.com/latest/themes/base/ui.all.css; rel=stylesheet / script src=http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js; type=text/javascript/script script src=http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery- ui.min.js type=text/javascript/script script src='http://www.ericmmartin.com/simplemodal/js/jquery.simplemodal.js' type='text/javascript'/script script src='http://www.ericmmartin.com/simplemodal/js/basic.js' type='text/javascript'/script link type='text/css' href='http://www.ericmmartin.com/simplemodal/css/basic.css' rel='stylesheet' media='screen' / script type=text/javascript $().ready(function() { $('#basic-modal input.basic, #basic-modal a.basic').click(function (e) { e.preventDefault(); $('#basic-modal-content').modal(); }); $(function() { $(#slider-vertical).slider({ orientation: vertical, range: min, min: 50, max: 300, value: 100, slide: function(event, ui) { $(#amount).val(ui.value); } }); }); }); /script /head body div id=basic-modal-content input type=text id=amount style=border:0; color:#ff; font- weight:bold; width: 40px; background: #aa; / div id=slider-vertical style=height:200px;/div /div div id='basic-modal' h2Basic Modal Dialog/h2 form action='download/' method='post' input type='button' name='basic' value='Show modal' class='basic demo'/ /form /div /body- Hide quoted text - - Show quoted text -- Hide quoted text - - Show quoted text -
[jQuery] Re: SimpleModal Contact Form and Sidebar
Trent, I'm not quite sure what you are asking. Could you clarify your question? Thanks, Eric On Sep 12, 7:48 am, Trent 26g...@gmail.com wrote: How can I embedSimpleModalContact Formhttp://www.ericmmartin.com/projects/simplemodal/ in the sidebar, whose position is fixed on the scrolling map. No reference as in the example from the author: div id='contact-form'a href='#' class='contact'Demo/a a picture button.gif Code sidebar: div id=contact-form style=background: rgb(27, 27, 27); position: fixed; top: 136px; width: 25px; height: 119px; z-index: 8765; cursor: pointer; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous; right: 0pt;img src=images/button.gif alt=contact width=28 height=137 //div Menu takes the following form:http://www.askdev.ru/uploads/4aa/b616/4b612e/large.gif
[jQuery] Re: why getJSON in firefox takes longer than in other browses?
You have Firebug, right? And is this a fairly large JSON object? Disable Firebug and see what happens. If it goes at more the speed you expected, then the problem is the use of eval() in the current version of jQuery, which slows down badly with Firebug. This is fixed in the next release (it uses a Function constructor, which isn't slowed down by Firebug, instead of eval). If that's not it, post a link to a test page? -Mike On Wed, Sep 16, 2009 at 7:38 AM, PanMarcepan panmarce...@gmail.com wrote: Hello I'm using jQuery and asp.net. jQuery using getJSON calls specific handler, lets say MyHandler.ashx $.getJSON(/MyHandler.ashx?param1=someVal, function(data) { ... some code; } In Opera and Explorer this is executed immediately. In FireFox it takes over 1s before request is executed. Even when I set breakpoint in my handler it will be hit after 1s... could you tell me why it is so slow? I got latest version of firefox.
[jQuery] Re: $(this).css({color : red})
Try $(this).css({color:#FF}); Matt wrote: see that code in the subj.? i'm using FF 3.5, and no matter what i do, .css won't work!! any help? No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.409 / Virus Database: 270.13.99/2372 - Release Date: 09/15/09 05:59:00
[jQuery] Re: [asmselect] Remove link links to the main page
You say you click the remove link. What is the code / href of the remove link, and do you have a return false on the jQuery code to prevent that link being followed ? $(document).ready(function() { $(#removeLink).click(function() { // do whatever the link should do return false; // == VERY IMPORTANT TO PREVENT THE BROWSER NAVIGATING TO #, which would usually be to the top of the page }); }); a id=removeLink href=#Remove/a odlo wrote: Anytime when I click the remove link after selecting one or multiple items my browser jumps to the main page. It doesn't happen on _any_ system but only on _some_ systems. Is there any solutiuon? System: Vista Browser: FF 3, FF 3.5, IE 8, Seamonkey http://picasaweb.google.de/lh/sredir?uname=christoph.puppetarget=ALBUMid=5379203595117546545authkey=Gv1sRgCNLk55_C5s3RCgfeat=email cu oldo No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.409 / Virus Database: 270.13.89/2359 - Release Date: 09/10/09 05:50:00
[jQuery] Re: Simple Modal Height and Width
As long as the content being used in the modal has a height and width supplied, SimpleModal will use those values to size the dialog. For example, using the basic demo as a base and given the following: img src=image.jpg style=display:none; height=400 width=600 id=basic-modal-content/ CSS: #simplemodal-overlay {background-color:#000; cursor:wait;} #simplemodal-container {color:#bbb; background-color:#333; border:4px solid #444;} #simplemodal-container a.modalCloseImg {background:url(../img/basic/ x.png) no-repeat; width:25px; height:29px; display:inline; z-index: 3200; position:absolute; top:-15px; right:-16px; cursor:pointer;} JS: $('#basic-modal-content').modal(); I get a the image with a border and the dimensions at 400x600. Hope that helps. -Eric On Sep 9, 12:47 pm, Byron Matto bma...@gmail.com wrote: Question: Simple Modal has default height and width values of 200 and 300 pixels respectively. Is there a way to the modal conform to whatever content is present. In other words I want the modal to have height and width equal to the HxW of image modal is applied to ... automatically. Thoughts?
[jQuery] Quick announcement about CFJS for jQuery
Hi folks, I just wanted to drop a quick note letting everyone know that I've committed cfjs 1.1.10 to the repository on riaforge.org (http:// svn.riaforge.org/cfjs/). This new version includes HTMLCodeFormat() and HTMLEditFormat(). I'll be working on NumberFormat() soon as well as a short list of Array functions that have been on my to-do list for quite a while now. These include: ArrayAverage() ArrayClear() ArrayDeleteAt() ArrayInsertAt() ArraySum() You can visit the project page over at cfjs.riaforge.org, or read my blog articles about it over at http://cjordan.us/index.cfm/CFJS Hope folks are continuing to find this useful. :o)
[jQuery] Re: Object doesn't support this property or method in IE
Thanks Ricardo, your first revised block of code took away the error message in Internet Explorer. Doesn't look like the second block returned any of my data. I'm in the process of learning jQuery, so it's better that I play around with it anyways =) I'm still having a problem getting the data to show up in IE (with the first revised block of code you supplied). The data fills in the DIV's one by one in Firefox, but returns what appears to be NULL values in IE. I can see each DIV change in IE, but it does not look like it's filling it in with the data like Firefox does. Any ideas? Thanks! - Adam On Sep 15, 11:46 pm, Ricardo ricardob...@gmail.com wrote: Hmm. No idea why it doesn't work in IE, but here are some general observations: You don't need the jQuery(function(){ part around the function. setTimeout(updateStatus, 2); // use the function object $(document).ready(updateStatus); //same here, pass the object, don't call the function. this can also go in the head script along with the rest See how that works out, here's the code:http://snipt.org/mogk And you could use some logic to make it less spaguetti too:http://snipt.org/mogl On Sep 15, 3:08 pm, knox203 sandf...@gmail.com wrote: Hello everyone, I have the following code that works great in Firefox, Opera, Safari, but fails to work in IE. Can anyone take a look and maybe tell me what I'm doing wrong? Thanks! head script type=text/javascript src=../conduit/jquery.js/script script function updateStatus(){ jQuery(function(){ $(#prov1hCount).load(source/provStats.php #prov1hCount); $(#prov1hOntime).load(source/provStats.php #prov1hOntime); $(#prov1hLate).load(source/provStats.php #prov1hLate); $(#prov1hPuAverage).load(source/provStats.php #prov1hPuAverage); $(#prov1hMTDPuAverage).load(source/provStats.php #prov1hMTDPuAverage); $(#prov2hCount).load(source/provStats.php #prov2hCount); $(#prov2hOntime).load(source/provStats.php #prov2hOntime); $(#prov2hLate).load(source/provStats.php #prov2hLate); $(#prov2hPuAverage).load(source/provStats.php #prov2hPuAverage); $(#prov2hDelAverage).load(source/provStats.php #prov2hDelAverage); $(#prov2hMTDPuAverage).load(source/provStats.php #prov2hMTDPuAverage); }); setTimeout(updateStatus(),2); } /script /head body ... /body script type=text/javascript $(document).ready(updateStatus()); /script
[jQuery] Re: Object doesn't support this property or method in IE
Forget it, looks like it's working now with both of your replies, you guys rock! Ricardo, your code removed the java error in IE, thanks. Rupak, I went back and added html tags to my source file, and sure enough, IE is now returning the data like it's supposed to! Thanks again guys, - Adam On Sep 16, 12:05 am, rupak mandal rupakn...@gmail.com wrote: I have face similar problem . Just check is there any html open or close tag missing in provStats.php. Thanks Rupak On Wed, Sep 16, 2009 at 12:16 PM, Ricardo ricardob...@gmail.com wrote: Hmm. No idea why it doesn't work in IE, but here are some general observations: You don't need the jQuery(function(){ part around the function. setTimeout(updateStatus, 2); // use the function object $(document).ready(updateStatus); //same here, pass the object, don't call the function. this can also go in the head script along with the rest See how that works out, here's the code:http://snipt.org/mogk And you could use some logic to make it less spaguetti too: http://snipt.org/mogl On Sep 15, 3:08 pm, knox203 sandf...@gmail.com wrote: Hello everyone, I have the following code that works great in Firefox, Opera, Safari, but fails to work in IE. Can anyone take a look and maybe tell me what I'm doing wrong? Thanks! head script type=text/javascript src=../conduit/jquery.js/script script function updateStatus(){ jQuery(function(){ $(#prov1hCount).load(source/provStats.php #prov1hCount); $(#prov1hOntime).load(source/provStats.php #prov1hOntime); $(#prov1hLate).load(source/provStats.php #prov1hLate); $(#prov1hPuAverage).load(source/provStats.php #prov1hPuAverage); $(#prov1hMTDPuAverage).load(source/provStats.php #prov1hMTDPuAverage); $(#prov2hCount).load(source/provStats.php #prov2hCount); $(#prov2hOntime).load(source/provStats.php #prov2hOntime); $(#prov2hLate).load(source/provStats.php #prov2hLate); $(#prov2hPuAverage).load(source/provStats.php #prov2hPuAverage); $(#prov2hDelAverage).load(source/provStats.php #prov2hDelAverage); $(#prov2hMTDPuAverage).load(source/provStats.php #prov2hMTDPuAverage); }); setTimeout(updateStatus(),2); } /script /head body ... /body script type=text/javascript $(document).ready(updateStatus()); /script
[jQuery] ANN eyedropper color picker plugin
[cross posted from the plugin list, which seems to have died in February] Hey folks, I've been absent from the jquery lists for quite awhile, but just recently had the opportunity to build a cool little plugin for a project I'm working on so I decided to release it to the public. This plugin acts as an eyedropper-style color picker, allowing a user to select a color by clicking a pixel in an image. The plugin replaces selected img elements on the page with a canvas element, and provides click, mousemove and mouseout event callbacks. The callback is sent a color object (describing the color under the mouse for the event). It also shows a little hovering preview of the color near the cursor when over the image. You can find it on github with a simple demo included: http://github.com/sstrudeau/jquery-dropper I'm hoping to receive some feedback on things like: * callback function naming conventions * which other arguments would be useful appropriate to send via the callback * should I instead (or also) trigger events instead/as well as offer callbacks? * any best practice examples for making something like the color hover chip style-able, optional? * any other feedback No live demo yet -- but if I hear a clamor, I might find a place to tuck one. Notable limitations: doesn't work on IE (the VML canvas hack doesn't offer pixel-level access to images) and images must be hosted from the same domain as the origin page (canvas security limitation). Thanks, Scott
[jQuery] Re: Page load question
Here is my jQuery: script type=text/javascript $(document).ready(function(){ $('[id$=_questions],[id$=_questionsLink]').hide(); $('[id$=_y]').bind('click',function(){ var thiis = $(this).attr('id').charAt(1); $('#'+thiis+'_questions').show(); $('#'+thiis+'_questionsLink').show(); }); $('[id$=_n]').bind('click',function(){ var thiis = $(this).attr('id').charAt(1); $('[class$=_condition]').val(); $('[id$=_date]').find('option:first').attr ('selected','selected').parent('select'); $('#'+thiis+'_questions').hide(); $('#'+thiis+'_questionsLink').hide(); }); $('[id$=toggle]').bind('click',function(){ var thiis = $(this).attr('id').charAt(0); $('#'+thiis+'_questions').toggle(); $(this).val($(this).val() == 'hide additional questions' ? 'show additional questions' : 'hide additional questions'); }); }); /script Here is the code for the first question: table class=gray tr td colspan=3strong1./strong Have you ever had symptoms, been diagnosed with, or been treated for:/td /tr tr td class=subQuestion width=700px;label for=1astronga. /strong High Blood Pressure/label span id=a_questionsLinkinput type=button id=a_toggle value=hide additional questions style=font-size:10px; float:right; //span/td td style=white-space:nowrap;width:54px;label input type=radio name=1a value=yes id=1a_y/ Yes/label /td td style=white-space:nowrap;width:54px;label input type=radio name=1a value=no id=1a_n/ No/label /td /tr tr id=a_questions td colspan=3 align=center style=background- image:none table class=yesTable cellpadding=0 cellspacing=0 tr bgcolor=#e2e2e2 tdDisease, Injury, or Medical Condition? /td tdTreatment, Medication, Dosage?/td tdDate Treatment Began?/td tdDate Treatment Ended?/td /tr tr height=50px; td height=20px;input type=text class=1a_condition name=1a1//td td height=20px;input type=text class=1a_condition name=1a2//td td height=20px;input type=text class=1a_condition name=1a3//td td height=20px;input type=text class=1a_condition name=1a4//td /tr tr bgcolor=#e2e2e2 tdWas Individual Hospitalized?/td tdAttending Physician?/td tdPhysician Phone Number?/td tdDegree of Recovery?/td /tr tr height=50px; td height=20px; input type=radio name=1a5 value=yes class=1a_yes/Yes input type=radio name=1a5 value=no class=1a_no/No /td td height=20px;input type=text class=1a_condition name=1a6//td td height=20px;input type=text class=1a_condition name=1a7//td td height=20px;input type=text class=1a_condition name=1a8//td /tr /table /td /tr On Sep 9, 12:22 pm, Cesar Sanz the.email.tr...@gmail.com wrote: Well, can you show us some mark-up? - Original Message - From: the intern aaron.wal...@urs.org To: jQuery (English) jquery-en@googlegroups.com Sent: Tuesday, September 08, 2009 1:54 PM Subject: [jQuery] Page load question What I have is a form where people will answer yes or no questions. What I need is, that when the page is loaded, a way to go though the questions and check to see which ones are marked as yes. The reason for this is, when yes is checked, there are additional questions that open up using .show(). Right now, if the page is refreshed or reloaded, all the additional questions hide regardless if the yes is check or not. Thanks in advance Aaron
[jQuery] Re: How to check is element droppable
yes I'm using jQuery droppable. I am trying to check if some element is droppable. Example: /// code: script type=text/javascript $(#first).droppable(); ... ... /script div id=first/div div id=second/div /// end code now I need to check both divs (first and second) and find out which is droppable. In this example: script must write: div 'first' is droppable, div 'second' is not droppable Understand now? On Sep 16, 2:49 pm, Richard D. Worth rdwo...@gmail.com wrote: It's not clear. Are you trying to use an element with a tag name of 'droppable'? Are you using jQuery UI Droppable? - Richard On Tue, Sep 15, 2009 at 2:36 PM, Boris Trivic trivu...@gmail.com wrote: if question isn't clear, I can explain better :) On Sep 15, 7:33 pm, Boris Trivic trivu...@gmail.com wrote: Hi. How I can check this? I have next part of code where I must check is element tag = droppable. Instead code after // pseudo: i must add some function that check if element is droppable. If true it must write some text in that element (For example: $(tag).text('bla bla') ) // code / function help(){ // array generated by PHP: ?=$correct? // random num. from upper array: var rand = Math.floor( Math.random() * cor.length ); // Set tag if(rand != 0){ var tag = '#p'+rand; } // here goes code that check if tag is droppable... /// pseudo: if(tag is droppable){ alert('is dropable'); }} CODE /
[jQuery] Re: JQUERY listnav: includeAll Parameter translation
I like that, will definitely consider it for the next rev. If you want to change it in the version you have, look for this: ALL and change it to whatever you want: Alle Thx, Jack mansoft wrote: It would be nice, if the includeAll parameter could be changed or extended to work like the noMatchText: Instead of true or false it should be empty or the text for the link i.e All, Alle, tous, todos
[jQuery] jCarousel 0.2.3 hangs IE7 on window resize event
I've discovered that http://sorgalla.com/jcarousel/ will hang IE7 (but not IE8) when the this.funcResize handler (bound to window.onresize) is called. The setup for this is in init around line 226: $(window).unbind('resize', this.funcResize).bind('resize', this.funcResize); What happens is that IE7 fires off onresize every time a resize occurs - even when you are in the middle of servicing a resize event. The loop goes on and results in a frozen browser with ever increasing resource consumption. Something outside of jCarousel (jQuery UI tabs in my case to be specific) could cause the resize event to occur. I tried to employ the technique mentioned here - remove event handling for onresize then add it back when it's done: http://remysharp.com/2008/05/15/windowonresize-hangs-ie6-and-ie7/#comment-93255 ...this didn't work for me though. Admittedly, I didn't work that hard at it. In the end, I've disabled the jCarousel resizing smarts because I didn't need it for my purposes. But a permanent fix would be nice. At least that is what I think is going on - does anyone have a differing point of view?
[jQuery] ClueTip problem on initially hidden fields
I am using the clueTip plugin to show help hovers on my application. It works like a charm, except when I have initially hidden fields on the page. For example, several fields default to style=display:none; and then when an onchange event occurs on a dropdown, these fields are shown. When you mouseover the help image to see the clueTip on these fields which were initially hidden, the clueTip flashes and acts funny. Here is the jQuery: script type=text/javascript $(document).ready(function() { $('span.toolt...@title]').cluetip({ splitTitle: '|', arrows: true, dropShadow: false, positionBy: 'auto', cluetipClass: 'jtip'} ); }); /script Here is the html: td class=HiddenFields style=display:none; span class=formatClassHeading/span span class=tooltip title=Title of Tooltip|Description goes here img src=images/help.gif width=13 height=14 alt= border=0 /spanbr !--input or select HTML goes here--! /td I have updated the clueTip plugin to the latest version (1.0.4) and jQuery version 1.3.2. I am also including hoverIntent and bgiframe plugins for the clueTip. Has anyone ever had this problem or do you know how to fix it?
[jQuery] Re: How to check is element droppable
var isDroppable = $(#first).is(.ui-droppable); // boolean or var droppables = $(div).filter(.ui-droppable); // collection Also note, there's a separate list for jQuery UI questions, should you have any more: http://groups.google.com/group/jquery-ui - Richard On Wed, Sep 16, 2009 at 1:15 PM, Boris Trivic trivu...@gmail.com wrote: yes I'm using jQuery droppable. I am trying to check if some element is droppable. Example: /// code: script type=text/javascript $(#first).droppable(); ... ... /script div id=first/div div id=second/div /// end code now I need to check both divs (first and second) and find out which is droppable. In this example: script must write: div 'first' is droppable, div 'second' is not droppable Understand now? On Sep 16, 2:49 pm, Richard D. Worth rdwo...@gmail.com wrote: It's not clear. Are you trying to use an element with a tag name of 'droppable'? Are you using jQuery UI Droppable? - Richard On Tue, Sep 15, 2009 at 2:36 PM, Boris Trivic trivu...@gmail.com wrote: if question isn't clear, I can explain better :) On Sep 15, 7:33 pm, Boris Trivic trivu...@gmail.com wrote: Hi. How I can check this? I have next part of code where I must check is element tag = droppable. Instead code after // pseudo: i must add some function that check if element is droppable. If true it must write some text in that element (For example: $(tag).text('bla bla') ) // code / function help(){ // array generated by PHP: ?=$correct? // random num. from upper array: var rand = Math.floor( Math.random() * cor.length ); // Set tag if(rand != 0){ var tag = '#p'+rand; } // here goes code that check if tag is droppable... /// pseudo: if(tag is droppable){ alert('is dropable'); }} CODE /
[jQuery] Re: AJAX: Display raw XML Document
I still can't find a solution to simply print out the XML response from an AJAX call. I'm surprised jQuery can't handle something that simple, as it can otherwise do so much. The other js libraries don't seem to have a problem with it, it looks like jQuery just isn't up to the task, and I can't use it for this project. Disappointed. On Sep 14, 11:53 pm, Jonathan jonandke...@gmail.com wrote: I'm re-writing a test page for a RESTful web service with AJAX, and need to be able to display the XML or JSON response in a textarea or a div. I'm re-writing the web page to work off jQuery, but I'm stuck here. The best response I can get is: [Object XMLDocument] I have to set a custom Authorization header, set an HTTP method (get, put, post, or delete), send data, and display the raw XML (or JSON, depending on the request) response in the page. With firebug I see the XML response is there, but I can't figure out how to display that raw XML with jQuery. It worked with the prototype js, but I'm stumped trying to get it to work with jQuery. It seems like a simple enough task, the XML is there, I want to print it out on the page. I've spent hours searching through the jQuery docs and online examples to no avail. Any ideas?
[jQuery] Re: How to check is element droppable
thanks a lot, that's answer. Best regards! On Sep 16, 7:29 pm, Richard D. Worth rdwo...@gmail.com wrote: var isDroppable = $(#first).is(.ui-droppable); // boolean or var droppables = $(div).filter(.ui-droppable); // collection Also note, there's a separate list for jQuery UI questions, should you have any more: http://groups.google.com/group/jquery-ui - Richard On Wed, Sep 16, 2009 at 1:15 PM, Boris Trivic trivu...@gmail.com wrote: yes I'm using jQuery droppable. I am trying to check if some element is droppable. Example: /// code: script type=text/javascript $(#first).droppable(); ... ... /script div id=first/div div id=second/div /// end code now I need to check both divs (first and second) and find out which is droppable. In this example: script must write: div 'first' is droppable, div 'second' is not droppable Understand now? On Sep 16, 2:49 pm, Richard D. Worth rdwo...@gmail.com wrote: It's not clear. Are you trying to use an element with a tag name of 'droppable'? Are you using jQuery UI Droppable? - Richard On Tue, Sep 15, 2009 at 2:36 PM, Boris Trivic trivu...@gmail.com wrote: if question isn't clear, I can explain better :) On Sep 15, 7:33 pm, Boris Trivic trivu...@gmail.com wrote: Hi. How I can check this? I have next part of code where I must check is element tag = droppable. Instead code after // pseudo: i must add some function that check if element is droppable. If true it must write some text in that element (For example: $(tag).text('bla bla') ) // code / function help(){ // array generated by PHP: ?=$correct? // random num. from upper array: var rand = Math.floor( Math.random() * cor.length ); // Set tag if(rand != 0){ var tag = '#p'+rand; } // here goes code that check if tag is droppable... /// pseudo: if(tag is droppable){ alert('is dropable'); }} CODE /
[jQuery] [validate] Help with errorPlacement
Hello, I need help with targeting a class on a TD to hold error messages with jQuery form validator plug-in. This is my sampling of code: script errorPlacement: function(error, element){ error.appendTo( element.parent().next()); } / script tr style=border:0; td style=border:0; align=rightFirst Namespan style=color:#f00;*/span/td td style=border:0;input maxlength=40 name=first_name size=20 type=text //td /tr tr style=border:0; td style=border:0;/td td class=errorMsg style=border:0;/td /tr I want to target the TD with the class: errorMsg to hold the error message. I've tried error.appendTo( element.parent().next('.errorMsg')); to no avail. Any help would be much appreciated. Thanks
[jQuery] Re: ANN eyedropper color picker plugin
Since github seems to be suffering from a DoS attack, I posted a demo here: http://sstrudeau.com/jquery-dropper/demo/index.html Scott On Wed, Sep 16, 2009 at 12:47 PM, Scott Trudeau scott.trud...@gmail.comwrote: [cross posted from the plugin list, which seems to have died in February] Hey folks, I've been absent from the jquery lists for quite awhile, but just recently had the opportunity to build a cool little plugin for a project I'm working on so I decided to release it to the public. This plugin acts as an eyedropper-style color picker, allowing a user to select a color by clicking a pixel in an image. The plugin replaces selected img elements on the page with a canvas element, and provides click, mousemove and mouseout event callbacks. The callback is sent a color object (describing the color under the mouse for the event). It also shows a little hovering preview of the color near the cursor when over the image. You can find it on github with a simple demo included: http://github.com/sstrudeau/jquery-dropper I'm hoping to receive some feedback on things like: * callback function naming conventions * which other arguments would be useful appropriate to send via the callback * should I instead (or also) trigger events instead/as well as offer callbacks? * any best practice examples for making something like the color hover chip style-able, optional? * any other feedback No live demo yet -- but if I hear a clamor, I might find a place to tuck one. Notable limitations: doesn't work on IE (the VML canvas hack doesn't offer pixel-level access to images) and images must be hosted from the same domain as the origin page (canvas security limitation). Thanks, Scott
[jQuery] Re: Browser Stop call's ajax.Error
Thank you. Can you think up with a solution to this? How can I detect when the call is begin terminated? On Sep 14, 5:32 pm, MiKiTiE mikiji...@googlemail.com wrote: Probably because you're sending the data to the url, but stopping the process before it can produce a result. On Sep 13, 7:52 pm, nirazue...@gmail.com nirazue...@gmail.com wrote: Hi, I've noticed that when I click the Stop button on the browser, or navigate to another page, jQuery.ajax calls the error event. You can see the problem live at:http://www.pingmyport.com/ Code: this.getJson = function(timeout) { if(this.XMLHttpRequest) this.XMLHttpRequest.abort(); this.XMLHttpRequest = $.ajax({ complete: function(){$(#kitLoader).hide();}, data: { Address: him.Address, portNum: him.portNum, portType: him.portType }, dataType: json, error: him.serviceUnavailable, success: him.processJson, timeout: timeout, type: POST, url: http://www.pingmyport.com/checkPort.php; }); };
[jQuery] Re: keeping table header fix
Yes, I do but I don't see how that can help me out. Thanks On Sep 16, 4:01 am, Liam Byrne l...@onsight.ie wrote: do you actually have the headers in a thead, with the content in tbody ? Most people forget about those. L macsig wrote: Hello guys, I'd like to know if there is a way to keep a table header fixed on top of a div while I scroll the table rows. I have a div high 200px and the table itself is around 300px so when I scroll down I'd like to always see the header on top. I already use for the table tablesorter so the solution must be compatible with that plug-in. Thanks and have a nice day! Sig No virus found in this incoming message. Checked by AVG -www.avg.com Version: 8.5.409 / Virus Database: 270.13.100/2375 - Release Date: 09/16/09 05:51:00
[jQuery] Re: AJAX: Display raw XML Document
Just my two cents, I have to agree, it would be nice to be able to at a minimum dump the actual XML from the Ajax call. -Original Message- From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On Behalf Of Jonathan Sent: Wednesday, September 16, 2009 1:33 PM To: jQuery (English) Subject: [jQuery] Re: AJAX: Display raw XML Document I still can't find a solution to simply print out the XML response from an AJAX call. I'm surprised jQuery can't handle something that simple, as it can otherwise do so much. The other js libraries don't seem to have a problem with it, it looks like jQuery just isn't up to the task, and I can't use it for this project. Disappointed. On Sep 14, 11:53 pm, Jonathan jonandke...@gmail.com wrote: I'm re-writing a test page for a RESTful web service with AJAX, and need to be able to display the XML or JSON response in a textarea or a div. I'm re-writing the web page to work off jQuery, but I'm stuck here. The best response I can get is: [Object XMLDocument] I have to set a custom Authorization header, set an HTTP method (get, put, post, or delete), send data, and display the raw XML (or JSON, depending on the request) response in the page. With firebug I see the XML response is there, but I can't figure out how to display that raw XML with jQuery. It worked with the prototype js, but I'm stumped trying to get it to work with jQuery. It seems like a simple enough task, the XML is there, I want to print it out on the page. I've spent hours searching through the jQuery docs and online examples to no avail. Any ideas?
[jQuery] Superfish and IE8 - drop-down menus flashing down on page load
I have successfully installed superfish-powered drop-down menus in my horizontal nav bar, but I get an irritating (and inconsistent) issue when I click on a nav link: the drop-down menus briefly flash down as the new page loads. In fact the page as a whole flashes. This behavior only occurs in IE8 (haven't tried 7) - Firefox, Safari, Chrome are all fine. The url is: peacefulnations.org I'd appreciate any help. Thanks.
[jQuery] Attaching methods to identical forms, but only invoking the method on the current form
Hi, I have a form that is repeated through out the page by the backend, which I have no control over. form action= textarea class=your_comment rows=10 cols=70/textarea a href=# class=comment_form_cancelCancel/a /form I want to attach an event to the link to clear the textarea. $(.comment_form_cancel).live(click, function(event) { $(.your_comment).val(''); event.preventDefault(); }); This method would be attached to all instances of the form. However, I would like only the form the user is currently working on to trigger the method. For example, if there are 3 forms, I click the cancel link on the 3rd form, the clearing should only happen on the 3rd form, not all forms. Is there a way to do this? Thanks, Stephen
[jQuery] Re: AJAX: Display raw XML Document
I still can't find a solution to simply print out the XML response from an AJAX call. I'm surprised jQuery can't handle something that simple, as it can otherwise do so much. The other js libraries don't seem to have a problem with it, it looks like jQuery just isn't up to the task, and I can't use it for this project. Try hooking the 'complete' callback and access the responseText property of the XHR: $.ajax({ ... complete: function(xhr, status) { alert(xhr.responseText); } });
[jQuery] Re: [validate] Help with errorPlacement
You need to go up one more level: errorPlacement: function(error, element){ error.appendTo( element.parent().parent().next().find(.errorMsg) ); } Jörn On Wed, Sep 16, 2009 at 8:18 PM, Loony2nz loony...@gmail.com wrote: Hello, I need help with targeting a class on a TD to hold error messages with jQuery form validator plug-in. This is my sampling of code: script errorPlacement: function(error, element){ error.appendTo( element.parent().next()); } / script tr style=border:0; td style=border:0; align=rightFirst Namespan style=color:#f00;*/span/td td style=border:0;input maxlength=40 name=first_name size=20 type=text //td /tr tr style=border:0; td style=border:0;/td td class=errorMsg style=border:0;/td /tr I want to target the TD with the class: errorMsg to hold the error message. I've tried error.appendTo( element.parent().next('.errorMsg')); to no avail. Any help would be much appreciated. Thanks
[jQuery] From adult google group.
For jquery-en group members. HD tube adult movies. Sorted by rating of millions users http://www.2watch4.com/redsdkp/includes/db/www/
[jQuery] Re: Attaching methods to identical forms, but only invoking the method on the current form
I have a form that is repeated through out the page by the backend, which I have no control over. form action= textarea class=your_comment rows=10 cols=70/textarea a href=# class=comment_form_cancelCancel/a /form I want to attach an event to the link to clear the textarea. $(.comment_form_cancel).live(click, function(event) { $(.your_comment).val(''); event.preventDefault(); }); This method would be attached to all instances of the form. However, I would like only the form the user is currently working on to trigger the method. For example, if there are 3 forms, I click the cancel link on the 3rd form, the clearing should only happen on the 3rd form, not all forms. Is there a way to do this? This should work: $(.comment_form_cancel).live(click, function(event) { $(this).prev(.your_comment).val(''); event.preventDefault(); });
[jQuery] Re: [validate] Help with errorPlacement
o...duh :) i have to keep in mind that I have to traverse the DOM tree Thanks :) On Sep 16, 12:19 pm, Jörn Zaefferer joern.zaeffe...@googlemail.com wrote: You need to go up one more level: errorPlacement: function(error, element){ error.appendTo( element.parent().parent().next().find(.errorMsg) ); } Jörn On Wed, Sep 16, 2009 at 8:18 PM, Loony2nz loony...@gmail.com wrote: Hello, I need help with targeting a class on a TD to hold error messages with jQuery form validator plug-in. This is my sampling of code: script errorPlacement: function(error, element){ error.appendTo( element.parent().next()); } / script tr style=border:0; td style=border:0; align=rightFirst Namespan style=color:#f00;*/span/td td style=border:0;input maxlength=40 name=first_name size=20 type=text //td /tr tr style=border:0; td style=border:0;/td td class=errorMsg style=border:0;/td /tr I want to target the TD with the class: errorMsg to hold the error message. I've tried error.appendTo( element.parent().next('.errorMsg')); to no avail. Any help would be much appreciated. Thanks
[jQuery] Re: jquery validate and datepicker.
Thanks Karl. I will direct any ui questions to the UI group from now on. That said, I appreciate your help. :) Kind regards, William On Sep 14, 11:04 am, Karl Swedberg k...@englishrules.com wrote: Hi, Sorry you haven't received a response yet. Usually Jörn picks up questions about the validate picker, but he's been traveling for the past week. Also, datepicker questions are usually handled on the jquery-ui google group. In any case, it looks like the the validation message is triggered on blur of the field. I don't recall how datepicker works, but I would sort of expect the focus to go back to the date input element when a date is selected from the datepicker. Since that isn't happening now, you can make it happen by adding an onClose or onSelect method to your datepicker options:http://jqueryui.com/demos/datepicker/#event-onSelect That way, the validation thing will be triggered when the user clicks or tabs out of the field after that point. Hope that helps. --Karl Karl Swedbergwww.englishrules.comwww.learningjquery.com On Sep 13, 2009, at 6:45 PM, Williamk wrote: Was it something I said? Or didn't say? :/ On Sep 8, 8:28 am, Williamk bkopl...@gmail.com wrote: Oh, I put the demo page for the remember the milk with the datepicker on a site, so you can see what I am talking about. No porn or viagra or Nigerian cons or anything else dubious. If you are interested:http://avianflew.com/milk/ On Sep 7, 9:48 pm, Williamk bkopl...@gmail.com wrote: For some reason, and this is baffling me, if I use both the validation plugin and the datepicker plugin, some voodoo is occurring. I have to select the date twice for it to validate. For example, here are the steps I took: I try to submit the form without dates in the fields. The form is not sent and the date fields are flagged. If you open it once and select a date, the calendar closes, but it still shows as invalid. If you repeat this action, selecting the same exact field and opening the calendar and selecting the date again, then it shows as valid. I'm not sure how to shoehorn this into validating on the first click on the calendar. And to be honest, I'm terrified I'm going to get flamed over this. I generally consider myself pretty resourceful, but this is making me a little bit loco.
[jQuery] facebox over iframe
Hi all, I have a couple of iframes and one of them trigger facebox, and its opened within the iframe, I want it to open on the parent window. any help would be great.
[jQuery] Re: Attaching methods to identical forms, but only invoking the method on the current form
Hi Mike, Ah, the this object! I forgot about that. Thank you for code snippet! --Stephen On Sep 16, 3:38 pm, Mike Alsup mal...@gmail.com wrote: I have a form that is repeated through out the page by the backend, which I have no control over. form action= textarea class=your_comment rows=10 cols=70/textarea a href=# class=comment_form_cancelCancel/a /form I want to attach an event to the link to clear the textarea. $(.comment_form_cancel).live(click, function(event) { $(.your_comment).val(''); event.preventDefault(); }); This method would be attached to all instances of the form. However, I would like only the form the user is currently working on to trigger the method. For example, if there are 3 forms, I click the cancel link on the 3rd form, the clearing should only happen on the 3rd form, not all forms. Is there a way to do this? This should work: $(.comment_form_cancel).live(click, function(event) { $(this).prev(.your_comment).val(''); event.preventDefault(); });
[jQuery] Error using jCarousel on IE 8
I'm having some trouble getting the jCarousel plugin to work under IE 8. On this site: http://dev.kandeart.com/ I get this error: Webpage error details User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/ 4.0; Tablet PC 1.7; .NET CLR 1.0.3705; InfoPath.2) Timestamp: Wed, 16 Sep 2009 20:27:14 UTC Message: 'null' is null or not an object Line: 35 Char: 2 Code: 0 URI: http://dev.kandeart.com/scripts/kandeart.js It works fine in both FF3 and IE6, so I don't understand what's causing the problem. Any assistance would be appreciated.
[jQuery] Re: Ajax
thanks!! i also added a extra link to show both, id selectors for the tag On Tue, Sep 15, 2009 at 9:02 PM, Steven Yang kenshin...@gmail.com wrote: your first link works find the second one doesnt work because you have the wrong id on your a and the id is the same as your div On Tue, Sep 15, 2009 at 7:05 PM, Matthew Rolph marine.ro...@gmail.comwrote: well, i fixed that at least the source shows right now can you see any probs. now? On Mon, Sep 14, 2009 at 9:15 PM, Steven Yang kenshin...@gmail.comwrote: hi this is all i see in the source of your page !DOCTYPE html html head titleAjax - jQuery Tests/title script src=http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.js; /script style i dont think its complete. Might be something wrong on your serverside program. On Tue, Sep 15, 2009 at 9:02 AM, Matt marine.ro...@gmail.com wrote: I made a page that would load 2 html pages, had a footer to show both, 2 links to show indivually, the divs to load them in, and the sticky footer css. My js seems valid, but the page is just completely blank. URL: http://testingspot.hostcell.net/sandbox/tests/jquery/ajax/ajax.html
[jQuery] Re: this.reset() doesn't work
@Dhruva- It should be $(this).reset(); That won't work. Note that reset() is a method that is available on raw form elements in the DOM, but not on a jQuery-wrapped set. // Example for Firebug console.log(jQuery.fn.reset) // undefined @pritisolanki - You can't expect the selector engine (or your page, for that matter) to work properly when you have several ID's that are the same. You have three forms that all have an id=form in your sample HTML. This is non-compliant with W3C standards and can cause a whole mess of problems. If you need to select them all, use the class attribute instead. Furthermore, you are using the name and ID attribute in a way which contributes to what is often called the deadly expando. You should definitely consider avoiding ID and name attributes such as form, submit, text, etc as described in these articles - http://ejohn.org/blog/deadly-expandos/ and http://jibbering.com/faq/names/ . form as an ID doesn't directly induce this phenomena, but the principle is the same: don't use attribute values which might conflict with DOM properties. Change your ID's to be unique and all should be good. For reuse, you could create a simple plugin: $.fn.reset = function() { return this.each(function() { // Check against forms, and for the reset method if (this.tagName.toLowerCase() === form this.reset) { this.reset(); } }); } Usage: $(#myForm).reset(); On Sep 16, 7:50 am, Dhruva Sagar dhruva.sa...@gmail.com wrote: It should be $(this).reset(); But since your using an id in the selector, that will reset only the particular form you want. If you wish to reset all the forms in the page you should do something similar to this : $('form').each(function(){ $(this).reset(); }); You should of course put this piece of code in the document ready function. Thanks Regards, Dhruva Sagar. Pablo Picassohttp://www.brainyquote.com/quotes/authors/p/pablo_picasso.html - Computers are useless. They can only give you answers. On Wed, Sep 16, 2009 at 1:45 PM, pritisolanki pritiatw...@gmail.com wrote: Hi, I am trying to reset all the form element but it is not working can someone suggest the reason. !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; head meta http-equiv=Content-Type content=text/html; charset=ISO-8859-1 / titlejQuery Starterkit/title link rel=stylesheet type=text/css media=screen href=screen.css / script src=jquery-1.3.2.min.js type=text/javascript/script script src=custom.js type=text/javascript/script /head body SCRIPT LANGUAGE=JavaScript !-- $(document).ready(function() { $(#reset).click(function() { $(form).each(function() { this.reset(); }); }); }); //-- /SCRIPT h1jQuery Starterkit/h1 h2This page contains code to test the examples. Most of it is only relevant for a example./h2 a id=first href=#Some link/a br/br/hr/ p p style=visibility:displayHehehehe so think you can hide me :-p / p /p br/br/hr/ form id=form name=form1 Form 1 input name=foo value=XXX / /form form id=form name=form2 Form 2 input name=bar value=YYY / /form form id=form name=form3 Form 3 input type=checkbox / input type=checkbox checked=checked / /form br/br/hr/ a id=reset href=#Reset!/a /body /html
[jQuery] Re: ANN eyedropper color picker plugin
Sounds cool, consider this some clamor for a live demo :-) Thanks, Jack Scott Trudeau wrote: [cross posted from the plugin list, which seems to have died in February] Hey folks, I've been absent from the jquery lists for quite awhile, but just recently had the opportunity to build a cool little plugin for a project I'm working on so I decided to release it to the public. This plugin acts as an eyedropper-style color picker, allowing a user to select a color by clicking a pixel in an image. The plugin replaces selected img elements on the page with a canvas element, and provides click, mousemove and mouseout event callbacks. The callback is sent a color object (describing the color under the mouse for the event). It also shows a little hovering preview of the color near the cursor when over the image. You can find it on github with a simple demo included: http://github.com/sstrudeau/jquery-dropper I'm hoping to receive some feedback on things like: * callback function naming conventions * which other arguments would be useful appropriate to send via the callback * should I instead (or also) trigger events instead/as well as offer callbacks? * any best practice examples for making something like the color hover chip style-able, optional? * any other feedback No live demo yet -- but if I hear a clamor, I might find a place to tuck one. Notable limitations: doesn't work on IE (the VML canvas hack doesn't offer pixel-level access to images) and images must be hosted from the same domain as the origin page (canvas security limitation). Thanks, Scott
[jQuery] Re: Superfish and IE8 - drop-down menus flashing down on page load
It seems like the submenu UL is being hidden on load via the javascript. Can you set the CSS to display:none and that should make it load without showing the submenu. Ralph On Wed, Sep 16, 2009 at 2:37 PM, graykiwi rjcatk...@gmail.com wrote: I have successfully installed superfish-powered drop-down menus in my horizontal nav bar, but I get an irritating (and inconsistent) issue when I click on a nav link: the drop-down menus briefly flash down as the new page loads. In fact the page as a whole flashes. This behavior only occurs in IE8 (haven't tried 7) - Firefox, Safari, Chrome are all fine. The url is: peacefulnations.org I'd appreciate any help. Thanks.
[jQuery] Re: ANN eyedropper color picker plugin
great, thanks. This would be really handy as a greasemonkey script. I use a FF plugin that does the eyedropper thing a lot (during design work), but it has it's shortcomings. If a greasemonkey script gave me the eyedropper and a box with the sampled color and hex value, that'd be rad. - Jack Scott Trudeau wrote: Since github seems to be suffering from a DoS attack, I posted a demo here: http://sstrudeau.com/jquery-dropper/demo/index.html Scott On Wed, Sep 16, 2009 at 12:47 PM, Scott Trudeau scott.trud...@gmail.com mailto:scott.trud...@gmail.com wrote: [cross posted from the plugin list, which seems to have died in February] Hey folks, I've been absent from the jquery lists for quite awhile, but just recently had the opportunity to build a cool little plugin for a project I'm working on so I decided to release it to the public. This plugin acts as an eyedropper-style color picker, allowing a user to select a color by clicking a pixel in an image. The plugin replaces selected img elements on the page with a canvas element, and provides click, mousemove and mouseout event callbacks. The callback is sent a color object (describing the color under the mouse for the event). It also shows a little hovering preview of the color near the cursor when over the image. You can find it on github with a simple demo included: http://github.com/sstrudeau/jquery-dropper I'm hoping to receive some feedback on things like: * callback function naming conventions * which other arguments would be useful appropriate to send via the callback * should I instead (or also) trigger events instead/as well as offer callbacks? * any best practice examples for making something like the color hover chip style-able, optional? * any other feedback No live demo yet -- but if I hear a clamor, I might find a place to tuck one. Notable limitations: doesn't work on IE (the VML canvas hack doesn't offer pixel-level access to images) and images must be hosted from the same domain as the origin page (canvas security limitation). Thanks, Scott
[jQuery] [validate] Custom functions onfocusin / -out
Hi! I added a nice little tweak which allows me to define custom functions called on (un) focussing a form element: jquery.validate.js got three additional lines at the end of onfocusin function (line 200): if (this.settings.focusFunction) { this.settings.focusFunction(element); } and at the end of onfocusout function: if (this.settings.blurFunction) { this.settings.blurFunction(element); } By defining a focusFunction / blurFunction within a jQuery ('#...').validate({})-block I was able to add a custom behaviour to those two events without writing additional JavaScript code. In my case I simply display or hide a div containing some help for the form element. Maybe this little code change will help somebody or even find its way to the official release. Kind regards and thank you for your validator! Philipp
[jQuery] Re: Page load question
Never mind, a seem to have figured it out Here is the code that I used to do this script type=text/javascript $(document).ready(function(){ e = $('[id$=_y]'); for (i = 0; i e.length; i++) if (e[i].checked == true) { $('#' + ($(e[i]).attr('id').charAt(1)) + '_questionsLink').show(); $('#' + ($(e[i]).attr('id').charAt(1)) + '_toggle').val('show additional questions'); } }); /script
[jQuery] Re: ANN eyedropper color picker plugin
This wouldn't be too difficult to turn into a greasemonkey script. It wouldn't work for images that are hosted from a domain other than the parent page, however, which is a frequent case; Firefox will throw canvas security exceptions for every img element not in the domain if you do $('img').dropper(). You could probably do a $('img').each() loop and check that the src attribute is in the page domain before making the image pickable, but you would only be able to pick from a subset of (possibly 0) images on the page. You could also turn it into a bookmarklet a la Karl Swedberg's jquerify bookmarklet (same caveats apply, greasemonkey not required): http://www.learningjquery.com/2009/04/better-stronger-safer-jquerify-bookmarklet Scott On Wed, Sep 16, 2009 at 5:45 PM, Jack Killpatrick j...@ihwy.com wrote: great, thanks. This would be really handy as a greasemonkey script. I use a FF plugin that does the eyedropper thing a lot (during design work), but it has it's shortcomings. If a greasemonkey script gave me the eyedropper and a box with the sampled color and hex value, that'd be rad. - Jack Scott Trudeau wrote: Since github seems to be suffering from a DoS attack, I posted a demo here: http://sstrudeau.com/jquery-dropper/demo/index.html Scott On Wed, Sep 16, 2009 at 12:47 PM, Scott Trudeau scott.trud...@gmail.comwrote: [cross posted from the plugin list, which seems to have died in February] Hey folks, I've been absent from the jquery lists for quite awhile, but just recently had the opportunity to build a cool little plugin for a project I'm working on so I decided to release it to the public. This plugin acts as an eyedropper-style color picker, allowing a user to select a color by clicking a pixel in an image. The plugin replaces selected img elements on the page with a canvas element, and provides click, mousemove and mouseout event callbacks. The callback is sent a color object (describing the color under the mouse for the event). It also shows a little hovering preview of the color near the cursor when over the image. You can find it on github with a simple demo included: http://github.com/sstrudeau/jquery-dropper I'm hoping to receive some feedback on things like: * callback function naming conventions * which other arguments would be useful appropriate to send via the callback * should I instead (or also) trigger events instead/as well as offer callbacks? * any best practice examples for making something like the color hover chip style-able, optional? * any other feedback No live demo yet -- but if I hear a clamor, I might find a place to tuck one. Notable limitations: doesn't work on IE (the VML canvas hack doesn't offer pixel-level access to images) and images must be hosted from the same domain as the origin page (canvas security limitation). Thanks, Scott
[jQuery] Re: [validate] Custom functions onfocusin / -out
You could also just bind focus and blur events to each element for the same effect, without requiring a change to the plugin code. Jörn On Wed, Sep 16, 2009 at 11:32 PM, Philipp philipp.ma...@googlemail.com wrote: Hi! I added a nice little tweak which allows me to define custom functions called on (un) focussing a form element: jquery.validate.js got three additional lines at the end of onfocusin function (line 200): if (this.settings.focusFunction) { this.settings.focusFunction(element); } and at the end of onfocusout function: if (this.settings.blurFunction) { this.settings.blurFunction(element); } By defining a focusFunction / blurFunction within a jQuery ('#...').validate({})-block I was able to add a custom behaviour to those two events without writing additional JavaScript code. In my case I simply display or hide a div containing some help for the form element. Maybe this little code change will help somebody or even find its way to the official release. Kind regards and thank you for your validator! Philipp
[jQuery] Re: jQuery PDF Viewer?
On Sep 16, 3:54 am, Sam Sherlock sam.sherl...@gmail.com wrote: I have'nt tried this but it does look goodhttp://pdfobject.com/ - S Thanks, Sam, but that one works the same as Alsup's mentioned above. If your browser doesn't have the Adobe Reader plugin, then it just gives you a message saying you don't have PDF support and asks if you want to download the PDF instead -- which is exactly the kind of user decision I'm trying to avoid.
[jQuery] Re: jQuery PDF Viewer?
On Sep 16, 5:21 am, Geert Baven geertba...@gmail.com wrote: Bumpbox works in all modern browsers. based on mootools Here's a list in which browsers it has been successfully tested: - *Firefox 3 - 3.5* - *Internet Explorer 6 | 7 | 8* - *Google Chrome* - *Apple Safari 3 | 4* - *Opera 9.04* This one too only works if the browser has the Adobe Reader plugin, otherwise you just get the browser's default behavior. So it's a lot of showbiz with all that boingy window for no result. I tried it in Firefox and the window boinged open, but then I just got the usual Firefox dialog asking if I wanted to download the PDF. Thanks anyway for the suggestion though. The plugin looks good otherwise, I just wouldn't say that it supports PDF, really.
[jQuery] Re: AJAX: Display raw XML Document
That did it. I was using success which did not provide access to the xml as a string I could output, but complete works great. Thanks! Now I cane easily get the text, the HTTP Response code. On Sep 16, 1:32 pm, Mike Alsup mal...@gmail.com wrote: I still can't find a solution to simply print out the XML response from an AJAX call. I'm surprised jQuery can't handle something that simple, as it can otherwise do so much. The other js libraries don't seem to have a problem with it, it looks like jQuery just isn't up to the task, and I can't use it for this project. Try hooking the 'complete' callback and access the responseText property of the XHR: $.ajax({ ... complete: function(xhr, status) { alert(xhr.responseText); } });
[jQuery] Re: (validate), submitHandler and custom function
Any Idea? thanks On Sep 15, 12:17 pm, bgumbiker bogumil.bial...@gmail.com wrote: Indeed the message is sent with $.post(...) however it looks like the following code is not called: jQuery.ajaxSetup({ 'beforeSend': function(xhr) {xhr.setRequestHeader(Accept, text/ javascript)} }); and the server side code does not handle the request properly. Thanks! Bogumil On Sep 13, 10:01 pm, Jörn Zaefferer joern.zaeffe...@googlemail.com wrote: Try this: submitHandler: function(form) { $.post(form.action, $(this).serialize(), null, script); } Jörn On Sun, Sep 13, 2009 at 12:42 AM, bgumbiker bogumil.bial...@gmail.com wrote: Hello, I am looking for a way to call successfully custom function from submitHandler to do proper ajax post. Here is my custom function: jQuery.fn.submitWithAjax = function() { this.submit(function() { $.post(this.action, $(this).serialize(), null, script); return false; }) return this; }; Before using validate plugin I had following which worked fine: $(document).ready(function() { $(#my_form).submitWithAjax(); } Now I have added the validation part and have no idea how to call my custom submitWithAjax function?? $(document).ready(function() { $(#my_form).validate({ /*Validations - works perfectly!! */ }, submitHandler: function(form) { /* $(#my_form).submitWithAjax(); - this works but introduces recursion */ /* how to call custom subitWithAjax() ? */ } }); }) Thanks!