[jQuery] Re: form select...
Thank you. What's the code if I want the index of the selected item? On Sep 28, 12:53 am, Alex Weber <[EMAIL PROTECTED]> wrote: > $('#fruits').val() > > On Sep 28, 2:12 am, GARIL <[EMAIL PROTECTED]> wrote: > > > How do I use jQuery to determine which item was selected from the > > forms below? > > Thank you for the help. > > > > > Select your favorite fruit: > > > > Apple > > Orange > > Pineapple > > Banana > > > > > > > > > Select your favorite fruit: > > > > All fruits > > Some only... > > > >
[jQuery] Re: form select...
$('#fruits').val() On Sep 28, 2:12 am, GARIL <[EMAIL PROTECTED]> wrote: > How do I use jQuery to determine which item was selected from the > forms below? > Thank you for the help. > > > Select your favorite fruit: > > Apple > Orange > Pineapple > Banana > > > > > Select your favorite fruit: > > All fruits > Some only... > >
[jQuery] form select...
How do I use jQuery to determine which item was selected from the forms below? Thank you for the help. Select your favorite fruit: Apple Orange Pineapple Banana Select your favorite fruit: All fruits Some only...
[jQuery] Re: Traversing table
I think you want an event handler for the input elements. Maybe something like this? Instead of finding the column in the row above, I just looked for the Nth price in the row above. That turned out to be the most complicated part. The DOM defines a .rowIndex property for TR elements but there is no .colIndex property for TD elements. $(document).ready(function() { $("input").bind("keyup focus", function(){ var $inp= $(this); var pos = $inp.parent("tr").children().index($inp.parent("td")); $inp.next("span").text( // span following input (+$inp.val() || 0) * // value of input times price in row above $inp.parent("tr").prev().find(".price").eq(pos).text() ); }).trigger("keyup"); }); I probably left a mistake or two in there...
[jQuery] Re: jFrame does load with IE7
Hi, Unfortunately, that's not a whole lot to go on. We really need some code to look at and preferably a link that lets us see the action. Rey... yvonney wrote: Hi All... Great to be here... So, I've finally managed to get my some lumbering code I pieced together to work with FF3. Doesn't do a thing in IE7. I know I'm not giving much to go on though I would love to hear that other are having similar problems before I attempt to be clearer. Many thanks for reading!
[jQuery] Scrolling animation problem in Safari
Hi, Firstly, excuse my newbness if I am asking a stupid question. I have a click function on a list span that scrolls down to the top of the list to make sure the about to be revealed content is in the viewport and then shows the content. My problem is that in Safari, Opera & Chrome, when another list span is clicked, I get a nasty flash of the top of the document,(in Opera's case it scrolls up and back down again) whereas in FF & IE7, the page stays put and the next div is revealed nicely. I figure I need to stop the scroll animation if it has already happened to prevent the flash of the top of the page, but can't work out how. Any suggestions appreciated, or any pointers on my general code structure if it looks rubbish! thanks Kim title some text text1 text2 text1 Some Text text2 Some Text function showContent(){ /*scroll to navigation list - Safari problem flash of top of document animation code http://www.learningjquery.com/2007/09/animated-scrolling-with-jquery-12*/ var targetOffset = $('#services ul').offset().top; $('html,body').animate({scrollTop: targetOffset}, 1000); //get the span text so can be checked against the div title text var $spanText = $(this).text(); //get the content divs var $divCont = $('#services').children('div'); //get the h3 of the div to compare later with span text var $divh3 = $divCont.children('h3'); //if there were any divs showing, hide them $divCont.hide(); $('#services ul li span').removeClass('selectedItem'); $(this).addClass('selectedItem'); //loop thru div h3 text, find match with span text, show matched div & exit for(var i=0; i < $divCont.length; i++){ var $isTitle = $divh3.get([i]); var $isTitle = $($isTitle).text(); if ($isTitle == $spanText){ var $showDiv = $divCont.get([i]); $($showDiv).fadeIn('slow') break; }; }; return false; }; $ (this).children('ul').children('li').children('span').bind('click',showContent);
[jQuery] jFrame does load with IE7
Hi All... Great to be here... So, I've finally managed to get my some lumbering code I pieced together to work with FF3. Doesn't do a thing in IE7. I know I'm not giving much to go on though I would love to hear that other are having similar problems before I attempt to be clearer. Many thanks for reading!
[jQuery] puzzles with "siblings"
the following is the example taked from "http://docs.jquery.com/Traversing/siblings#expr"; The third li in the first ul does not colored with red in my FF3.0.3 and IE6.0 I supposed this is a bug. by the way, the style in IE6.0 is ugly http://www.w3.org/TR/html4/loose.dtd";> http://code.jquery.com/jquery-latest.js";> $(document).ready(function(){ var len = $(".hilite").siblings() .css("color", "red") .length; $("b").text(len); }); ul { float:left; margin:5px; font-size:16px; font-weight:bold; } p { color:blue; margin:10px 20px; font-size:16px; padding:5px; font-weight:bolder; } .hilite { background:yellow; } One Two Three Four Five Six Seven Eight Nine Ten Eleven Unique siblings:
[jQuery] Re: Find all tags without an tag inside
> Attach a click event to: > List item without link > > Do not attach click event to: > Link 1 How about this? $("li").not($("li:has(a)")).click( ... )
[jQuery] Re: My scripts executes two times a controller
Hmmm. This doesn't seem to relate to jQuery. If this is Zend-related, your best bet would be the Zend support forum. Rey... debussy007 wrote: Hi, All my controllers which are located in the default module extends 'MyZend_Default_Controller_Action' which extends 'MyZend_Default_Common_Action' which finally extends Zend_Action_Controller When I do a request for the main page (IndexController/indexAction), the scripts executes once the 'MyZend_Default_Controller_Action', but when I try to execute another controller, 'MyZend_Default_Controller_Action' gets executed twice ! I can't understand why ... I do not even know how to debug this behaviour, can anyone help me with this ? Thank you.
[jQuery] add/remove with ordered information
i have built a simple add/remove chapter form. when "add new chapter" clicked; ajax get fired, retrieves php file, and appends new chapter. newly appended chapter is a added to ol#append-chapter. the script also keeps track of chapter count and displays current chapter count in h4. issues: 1. when i remove a chapter, it does not recalculate the number of chapters on the page. say i click add chapter 4 times (1, 2, 3, 4), if i remove chapter two, my list reorders to (1,3,4) and if i click add new chapter it displays (1, 3,4,2). to make it worse, if i add two more chapters the new order becomes (1,3,4,2,3,4) - i would like the chapters to display correct order/count when added or removed. using example above...if i remove chapter 2 i would get (1,2,3), and adding new chapters would proceed sequentially. 2. i'm adding the remove chapter to ; each time i add a new chapter the script executes and appends another remove chapter to every h4, even if it already has one. ex. if i have two chapters: - chapter 1 remove chapter remove chapter - chapter 2 remove chapter other than these issues, script works fine. any help tacking these final bugs would be great. thanks! set-up: Click to add chapter ("#chapter-append").click(function() { var chapterCount = new Number($("#chapter-count").val()); if (chapterCount <1) chapterCount=0; chapterCount = chapterCount +1; $("#chapter-count").val(chapterCount); var queryString = "add-chapter.php?chapter-number="+chapterCount; //alert(queryString); $.get(queryString, function(html) { // append the "ajax'd" data to the table body $("ol#add-chapter").append(html); $("ol#add-chapter li h4").append(removeChapter).bind('click', function() { var newChapter = "#chapter-"+chapterCount+"-container"; $(newChapter).remove(); chapterCount = chapterCount -1; $("#chapter-count").val(chapterCount); return false; }); }); return false; }); var removeChapter = 'Remove chapter'; this is the piece added via ajax: Chapter $x Chapter Title: Chapter Web Description: Chapter Full Description: Thumbnail URL: Dimensions Chapter Start Time: Time format Chapter End Time: Time format EOS; ?> -- View this message in context: http://www.nabble.com/add-remove-with-ordered-information-tp19708456s27240p19708456.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] I want to reduce the header calls
Hello, I want to reduce the header calls for a flash file used repeatedly on a page. There are 24 HTTP requests for a file that is already downloaded.. So My question is how would I call it once and then not again for the rest of the page? the code area is like this ex.1) src: (p.path || '').replace(/([^\/])$/, '$1/') + (p.font || ele.css('fontFamily').replace(/^\s+|\s+$|,[\S|\s]+|'|"|(,)\s+/g, '$1')).replace(/([^\.][^s][^w][^f])$/, '$1.swf'), ex.2) var SORUCE = 'Scripts/flash/rounded_rectangle.swf'; $('.Round_gen53').attr('rel',''+SORUCE +':::transparent: 45:0:100:57:0:0x00:0xecffa4:15:2:2'); $('.Round_gen54').attr('rel',''+SORUCE +':::transparent: 45:0:100:57:0:0x00:0xecffa4:15:2:2'); and the functions get ran for each element... but I don't see why the repeated HTTP request is needed and it's slowing my site down... So says YSlow lol Any ideas on how to fix/write this? thank you for the help. jeremyBass Some other things... Configure ETags Expires header are set as well as Header set Cache-Control "max-age=604800" Thank again
[jQuery] Re: i was patient, now i'm frustrated
alas, it is very likely a traffic issue. Did you notice one of the requests that took 17 seconds to complete is from google- analytics.com ? On Sep 27, 9:12 pm, ricardobeat <[EMAIL PROTECTED]> wrote: > Something wrong there. Loads in about 5 seconds here, sometimes > faster. Maybe it's a traffic issue between the USA and Europe? > > On Sep 27, 6:36 am, Giovanni Battista Lenoci <[EMAIL PROTECTED]> > wrote: > > > ricardobeat ha scritto:> As of no.jquery.comanddocs.jquery.com are > > loading faster than > > > ever, and I'm in Brazil! > > > I'm from italy, docs.jquery.com loads in about a minute: > > >http://lab.gianiaz.com/docs.jquery.com.jpg > > > -- > > gianiaz.net - web solutions > > p.le bertacchi 66, 23100 sondrio (so) - italy > > +39 347 7196482
[jQuery] Re: i was patient, now i'm frustrated
Something wrong there. Loads in about 5 seconds here, sometimes faster. Maybe it's a traffic issue between the USA and Europe? On Sep 27, 6:36 am, Giovanni Battista Lenoci <[EMAIL PROTECTED]> wrote: > ricardobeat ha scritto:> As of no.jquery.comand docs.jquery.com are > loading faster than > > ever, and I'm in Brazil! > > I'm from italy, docs.jquery.com loads in about a minute: > > http://lab.gianiaz.com/docs.jquery.com.jpg > > -- > gianiaz.net - web solutions > p.le bertacchi 66, 23100 sondrio (so) - italy > +39 347 7196482
[jQuery] Re: re[jQuery] -bind, only on first "add"
append() ==> add inside after() ==> add after - Suppose the following plain HTML: Content inside div - append() $('#theTags').append(textTag + ' < a href=\"/text/removetag/tagid/' + i + '\" id=\"removeTag\" class=\"underline\" >x< /a >'); Result: Content inside div textTag < a href="/text/removetag/tagid/i" id="removeTag" class="underline">x --- after() $('#theTags').after(textTag + ' < a href=\"/text/removetag/tagid/' + i + '\" id=\"removeTag\" class=\"underline\" >x< /a >'); Result: Content inside div textTag < a href="/text/removetag/tagid/i" id="removeTag" class="underline">x -Mensagem Original- De: "johannesf" <[EMAIL PROTECTED]> Para: Enviada em: sábado, 27 de setembro de 2008 18:04 Assunto: [jQuery] Re: re[jQuery] -bind, only on first "add" hmm, I just found out that if I use "after" insted of "append", things are working... like this: $('#theTags').after(textTag + ' < a href=\"/text/removetag/tagid/' + i + '\" id=\"removeTag\" class=\"underline\" >x< /a >'); how to explain that? / johannes -- View this message in context: http://www.nabble.com/re-bind%2C-only-on-first-%22add%22-tp19706233s27240p19706420.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Re: Find all tags without an tag inside
wounldn't not work here? $("#LHNav").find("li").not('a').bind("click", function(){ //do something }); On Sep 27, 1:56 pm, flycast <[EMAIL PROTECTED]> wrote: > I am stumped. I have nested unordered lists. I want to attach a click > event to all the list items that do not directly contain an tag. > > Attach a click event to: > List item without link > > Do not attach click event to: > Link 1 > > I have this code which attaches the event to both types of tags: > $("#LHNav").find("li").bind("click", function(){ > //do something > }); > > Ideas anyone?
[jQuery] Re: Find all tags without an tag inside
Hi, you can try the .filter(fn) method: $('#LHNav li').filter(function() { return !$(this).children('a').length; }).bind('click', function (){...}); -- Bohdan Ganicky
[jQuery] My scripts executes two times a controller
Hi, All my controllers which are located in the default module extends 'MyZend_Default_Controller_Action' which extends 'MyZend_Default_Common_Action' which finally extends Zend_Action_Controller When I do a request for the main page (IndexController/indexAction), the scripts executes once the 'MyZend_Default_Controller_Action', but when I try to execute another controller, 'MyZend_Default_Controller_Action' gets executed twice ! I can't understand why ... I do not even know how to debug this behaviour, can anyone help me with this ? Thank you. -- View this message in context: http://www.nabble.com/My-scripts-executes-two-times-a-controller-tp19707241s27240p19707241.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Re: problem with mouseover / mouseout
try this plz $(document).ready(function() { $('a.view').hover(function() { $(this).stop().fadeTo ('normal', 1); }, function () { $(this).stop().fadeTo ('normal', 0.33); }); }); eewan wrote: I'm trying to make script that has faded image at start 30%, after hover sets opacity to 100% and on mouse out puts it back to 30%. so i did this: $(document).ready(function(){ $('a.view').fadeTo('fast', 0.33); $('a.view').mouseover(function () { $(this).fadeTo('normal', 1); }); $("a.view").mouseout(function () { $(this).fadeTo('normal', 0.33); }); }); Problem appears because i have 15 elements and when i hover over them fast few times script gets bugged and repeats that process xx times. I want to repeat effect only when fadeout is finished :) mycitysolutions.com - address so u can understand it better :) Thx in advance
[jQuery] Re: Find all tags without an tag inside
dunno if there's a simple jquery way of doing it, but you could do: $('#LHNav li').each(function(){ if ($('> a',this).length==0) { //no A href, add it } else { //do something else } }); flycast wrote: I am stumped. I have nested unordered lists. I want to attach a click event to all the list items that do not directly contain an tag. Attach a click event to: List item without link Do not attach click event to: Link 1 I have this code which attaches the event to both types of tags: $("#LHNav").find("li").bind("click", function(){ //do something }); Ideas anyone?
[jQuery] Re: jEditable Clone Referring to the Original Element, livequery ok to use?
Quickly looking over the jEditable docs, 'editable' isn't an actual event. You can instead use a function based live query like this: $('.editable, .bline_measure caption').livequery(function(){ $(this).editable(function(value, settings) { ... }); }); -- Brandon Aaron On Fri, Sep 26, 2008 at 4:24 PM, Wayne <[EMAIL PROTECTED]> wrote: > > I was trying to put livequery in place on the site, but it seems to > attach to pre-known events, like click, instead of new events, like > editable. > > For instance, I'm trying to do this: > >$(".editable, .bline_measure caption").livequery("editable", > function(value, settings) { > > > Wanting to watch these items and rebind editable to the newly created > captions when I clone them. Is this not a good job for livequery? > > -Wayne > > On Sep 22, 9:06 am, Wayne <[EMAIL PROTECTED]> wrote: > > Thanks, Mike. This info helps. Great work, btw. > > > > -Wayne > > > > On Sep 20, 12:22 pm, Mika Tuupola <[EMAIL PROTECTED]> wrote: > > > > > On Sep 19, 2008, at 6:20 PM, Wayne wrote: > > > > > > In short, I can clone jEditable items, but I can't edit them in place > > > > without a page reload and rewriting from the server side. Am I > > > > ignoring something or do I need to reset a binding somewhere when I > do > > > > the DOM modification? > > > > > This should help: > > > > >http://docs.jquery.com/Frequently_Asked_Questions#Why_do_my_events_st. > .. > > > > > basically you need to rebind events to cloned elements. > > > > > -- > > > Mika Tuupolahttp://www.appelsiini.net/ >
[jQuery] Re: suggestion - enable() / disable() functions
So it could! Thanks! On Sep 27, 9:59 am, Scott González <[EMAIL PROTECTED]> wrote: > That could be easily reduced to this: > > $.fn.disable = function() { > return this.attr('disabled', true).addClass('disabled'); > > } > > $.fn.enable = function() { > return this.removeClass('disabled').attr('disabled', false); > > } > > On Sep 26, 2:28 pm, livefree75 <[EMAIL PROTECTED]> wrote: > > > I actually *JUST* created enable & disable functions: > > > (function($) { > > /** > > * Disables the matched form elements, and adds the disabled > var> class > > * to them. > > * @return jQuery The matched elements. > > */ > > $.fn.disable = function() { > > $(this).each(function() { > > $(this).attr("disabled", true).addClass("disabled"); > > }); // $(this).each() > > return $(this); > > }; // $.fn.disable() > > > /** > > * Removes the disabled class from the matched form > > elements, and > > * re-enables them. > > * @return jQuery The matched elements. > > */ > > $.fn.enable = function() { > > $(this).each(function() { > > $(this).removeClass("disabled").attr("disabled", > > false); > > }); // $(this).each() > > return $(this); > > }; // $.fn.enable() > > > })(jQuery); > > > Enjoy! > > > Jamie > > > On Sep 26, 7:55 am, Martin <[EMAIL PROTECTED]> wrote: > > > > Dear all, > > > > I like jQuery much but I do not like the way the enabling, disabling > > > elements is handled. This is a pretty common task and the current > > > solution based on changing attributes is not in accord with jQuery’s > > > “write less” philosophy. > > > The enable() / disable() functions would be MUCH more elegant and in > > > light with the jQuery gospel. > > > Could this be included in the next release ? > > > > Best > > > Martin
[jQuery] Find all tags without an tag inside
I am stumped. I have nested unordered lists. I want to attach a click event to all the list items that do not directly contain an tag. Attach a click event to: List item without link Do not attach click event to: Link 1 I have this code which attaches the event to both types of tags: $("#LHNav").find("li").bind("click", function(){ //do something }); Ideas anyone?
[jQuery] Re: re[jQuery] -bind, only on first "add"
hmm, I just found out that if I use "after" insted of "append", things are working... like this: $('#theTags').after(textTag + ' < a href=\"/text/removetag/tagid/' + i + '\" id=\"removeTag\" class=\"underline\" >x< /a >'); how to explain that? / johannes -- View this message in context: http://www.nabble.com/re-bind%2C-only-on-first-%22add%22-tp19706233s27240p19706420.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] re[jQuery] -bind, only on first "add"
Hi I have some problem to re-bind after adding data to a page using append and a click-function, never used that before! If I add one "textTag" that one can use the "removeTag" but if I add more then one "textTag" I get alla the alerts "test" on the first add and the rest gest none?? Some advise please/ Johannes // globals var i = 0; var tagArr = []; var theTag = ''; // ad new tag $('#addTag').click(function() { // grab the tag var textTag = $("#textTag").val(); if(textTag != ''){ // appand to page $('#theTags').append(textTag + ' \"/text/removetag/tagid/' x '); // remove tag, inside to re-bind new elements $("a#removeTag").click(function(){ alert('test'); return false; }); // clear gui $('#textTag').val(''); // increase key i++; } $("#textTag").focus(); return false; }); -- View this message in context: http://www.nabble.com/re-bind%2C-only-on-first-%22add%22-tp19706233s27240p19706233.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Re: Designing ajax applications / DOM issues
You'll want to look into the Live Query plugin: http://plugins.jquery.com/project/livequery/ On Sep 27, 2:55 pm, "silk.odyssey" <[EMAIL PROTECTED]> wrote: > I am getting started with jQuery and I think I understand the basics. > I want to get into ajax and while I can communicate with the server I > don't know exactly how to structure my application so that everything > fits together. What happens is that I would try to apply effects to > elements that don't exist yet. For instance if I would try to assign > click event handlers to certain elements within the DOM and these > elements may not exist when the document loads as some of the elements > are read from the server when a DOM element is clicked. What I want to > know is how to structure my application to avoid these type of > problems. Or how do i make jQuery aware of new DOM elements?
[jQuery] jquery.form not working (comment system using jquery)
Im trying to integrate a comment system using jquery into my project but it doesn't work I need some help finding where the error could be: javascript: $(document).ready(function() { jQuery('#newComment').after(''); jQuery('#submit').after('http://192.168.0.5/flog/ loading.gif" id="loading" alt="loading..." />'); jQuery('#loading').hide(); var form = jQuery('#newComment'); var err = jQuery('#error'); var error = "error"; form.submit(function(evt) { if(form.find('#author')[0]) { if(form.find('#author').val() == '') { err.html('Enter Name'); return false; } // end if if(form.find('#comment').val() == '') { err.html('Enter Comment'); return false; } // end if jQuery(this).ajaxSubmit({ beforeSubmit: function() { jQuery('#loading').show(); jQuery('#submit').attr('disabled','disabled'); }, // end beforeSubmit error: function(request){ err.empty(); var data = request.responseText; err.html(''+ data[1] +''); jQuery('#loading').hide(); jQuery('#submit').removeAttr("disabled"); return false; }, // end error() success: function(data) { try { var response = jQuery("").html(data); if (jQuery(document).find('.commentlist')[0]) { jQuery('.commentlist').append(response.find('.commentlist li:last')); } else { jQuery('#respond').before(response.find('.commentlist')); } // end if if (jQuery(document).find('#comments')[0]) { jQuery('#comments').html(response.find('#comments')); } else { jQuery('.commentlist').before(response.find('#comments')); } // end if err.empty(); form.remove(); // REMOVE THIS IF YOU DON'T WANT THE FORM TO DISAPPEAR jQuery('#respond').hide(); err.html('Your comment has been added. span>'); jQuery('#submit').removeAttr("disabled"); jQuery('#loading').hide(); } catch (e) { jQuery('#loading').hide(); jQuery('#submit').removeAttr("disabled"); alert(error+'\n\n'+e); } // end try } // end success() }); // end ajaxSubmit() return false; }); // end form.submit() }); // end document.ready() my form: http://192.168.0.5/flog/add.php"; method="post"> Nombre Mensaje: my add.php: When I submit the form it goes to add.php... it does add the comment but it seems to ignore my jquery code, I don't know what might be causing this I've test the simple code using jquery.form and it works but then when I add all my checks and effects to the form it doesn't do nothing.
[jQuery] Designing ajax applications / DOM issues
I am getting started with jQuery and I think I understand the basics. I want to get into ajax and while I can communicate with the server I don't know exactly how to structure my application so that everything fits together. What happens is that I would try to apply effects to elements that don't exist yet. For instance if I would try to assign click event handlers to certain elements within the DOM and these elements may not exist when the document loads as some of the elements are read from the server when a DOM element is clicked. What I want to know is how to structure my application to avoid these type of problems. Or how do i make jQuery aware of new DOM elements?
[jQuery] Re: Control form submitting
why dont you do the checks before submit? Example: Inside submit function... make sure you got a div to display errors: var err = jQuery('#error'); //Enter Name'); return false; } // end if //then check if email is correct... if(form.find('#email').val() == '') { err.html(''+enter_email+''); return false; } // end if var filter = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA- Z0-9]{2,4})+$/; if(!filter.test(form.find('#email').val())) { err.html(''+enter_valid+''); if (evt.preventDefault) {evt.preventDefault();} return false; } // end if } // end if }); end of submit... Hope this help alittle =)
[jQuery] Re: R: [jQuery] mouseover / mouseout
Thank you very much - it worked like charm. I'll try to understand every step of the way :) On Sep 27, 7:00 pm, diego valobra <[EMAIL PROTECTED]> wrote: > Ifixer try this > > $('a.view').css('opacity',0.33); > $('a.view').hover(function() { > $(this).stop().animate({ > opacity : 1 > }, 600); > }, > function(){ > $(this).stop().animate({ > opacity : 0.33 > }, 800); > > }); > > Diego Valobra > > --- Sab 27/9/08, eewan <[EMAIL PROTECTED]> ha scritto: > Da: eewan <[EMAIL PROTECTED]> > Oggetto: [jQuery] mouseover / mouseout > A: "jQuery (English)" > Data: Sabato 27 settembre 2008, 16:59 > > Hey guys, > I have problem and my programmer isn't around to help me :( > Look at main page:http://www.mycitysolutions.com/ > > I used $('a.view').fadeTo('fast', 0.33) to fade out images on > load and > $('a.view').mouseover(function () { > $(this).fadeTo('normal', 1);}); > > $("a.view").mouseout(function () { > $(this).fadeTo('normal', 0.33); > > }); > > to make them change opacity on image hover. But if you try numerous > times to run trough image animation will take some time :D > So i need some event listener or ... how do i solve this so it repeats > normally :) > > Thx in advance > > __ > Do You Yahoo!? > Poco spazio e tanto spam? Yahoo! Mail ti protegge dallo spam e ti da tanto > spazio gratuito per i tuoi file e i messaggihttp://mail.yahoo.it
[jQuery] Re: how to submit features to someone else's plugin (masked input)
was my last mail sent?... On Sep 27, 12:16 pm, Eric C <[EMAIL PROTECTED]> wrote: > Hello: > > I've added some features to Josh Bush's Masked Input plugin, but I > can't seem to get in touch with him via his website. > > I've added a suggested setting, which suggests a character that would > be used in a character position in the field, e.g. > (".monthNumber").mask("99", {suggested: "0"} ) will fill in the first > character in the field: 0_ and set the caret at the first non- > suggested character. It also accepts a sparse array: > (".incrementByHalfpoint").mask("99.9",{suggested:[,,,0]}) would > initalize the input field as __.0. > > I also added an overlay setting, which will put an overlay character > in the field in place of the suggested character, for example: > (".monthNumber").mask("99",{suggested: "0", overlay:"1"} ) would > automatically change the month field to 1_ when the user backspaced or > left arrowed over the 0 in the field. > > I also put a couple other touches in to make user input more > intuitive. I'm hoping Josh looks over this list every once in a > while. If not, what do I do? I'd like to get these changes in the > plugin, because they address the primary weakness in the plugin. > > Thanks > Eric
[jQuery] R: [jQuery] mouseover / mouseout
Ifixer try this $('a.view').css('opacity',0.33); $('a.view').hover(function() { $(this).stop().animate({ opacity : 1 }, 600); }, function(){ $(this).stop().animate({ opacity : 0.33 }, 800); }); Diego Valobra --- Sab 27/9/08, eewan <[EMAIL PROTECTED]> ha scritto: Da: eewan <[EMAIL PROTECTED]> Oggetto: [jQuery] mouseover / mouseout A: "jQuery (English)" Data: Sabato 27 settembre 2008, 16:59 Hey guys, I have problem and my programmer isn't around to help me :( Look at main page: http://www.mycitysolutions.com/ I used $('a.view').fadeTo('fast', 0.33) to fade out images on load and $('a.view').mouseover(function () { $(this).fadeTo('normal', 1); }); $("a.view").mouseout(function () { $(this).fadeTo('normal', 0.33); }); to make them change opacity on image hover. But if you try numerous times to run trough image animation will take some time :D So i need some event listener or ... how do i solve this so it repeats normally :) Thx in advance __ Do You Yahoo!? Poco spazio e tanto spam? Yahoo! Mail ti protegge dallo spam e ti da tanto spazio gratuito per i tuoi file e i messaggi http://mail.yahoo.it
[jQuery] Re: how to submit features to someone else's plugin (masked input)
try this mask plugin: http://meiocodigo.com/meiomask/docs/ On Sep 27, 12:16 pm, Eric C <[EMAIL PROTECTED]> wrote: > Hello: > > I've added some features to Josh Bush's Masked Input plugin, but I > can't seem to get in touch with him via his website. > > I've added a suggested setting, which suggests a character that would > be used in a character position in the field, e.g. > (".monthNumber").mask("99", {suggested: "0"} ) will fill in the first > character in the field: 0_ and set the caret at the first non- > suggested character. It also accepts a sparse array: > (".incrementByHalfpoint").mask("99.9",{suggested:[,,,0]}) would > initalize the input field as __.0. > > I also added an overlay setting, which will put an overlay character > in the field in place of the suggested character, for example: > (".monthNumber").mask("99",{suggested: "0", overlay:"1"} ) would > automatically change the month field to 1_ when the user backspaced or > left arrowed over the 0 in the field. > > I also put a couple other touches in to make user input more > intuitive. I'm hoping Josh looks over this list every once in a > while. If not, what do I do? I'd like to get these changes in the > plugin, because they address the primary weakness in the plugin. > > Thanks > Eric
[jQuery] Re: Traversing table
On Sep 8, 10:38�pm, Jayzon <[EMAIL PROTECTED]> wrote: > What I'd like to do: If an input filed is focussed, a price should be > calculated. To keep the script as efficient as possible, I want to > travel up from the input field to thecellabove it (i.e. one row up, > second or thirdcellin that row). My problem is: How can I traverse > the DOM in this way? I had a similar problem, I post the solution (valid for what I wanted to achieve), maybe could be helpful to you. Regards oreste.parlatano.com Just jquery: $('td').click(function() { var i = $(this).attr('cellIndex'); var t = $(this).text(); var r = $(this).parent().find('td:eq(0)').text(); var c = $(this).parent().parent().parent().find('th').eq(i).text(); alert ('cell text = '+t+'\n'+'1st cell = '+r+'\n'+'col title = '+c); }); The whole page: http://www.w3.org/1999/xhtml"; xml:lang="en-US" lang="en- US"> Table cell $(function() { $('td').click(function() { var i = $(this).attr('cellIndex'); var t = $(this).text(); var r = $(this).parent().find('td:eq(0)').text(); var c = $(this).parent().parent().parent().find('th').eq(i).text(); alert ('cell text = '+t+'\n'+'1st cell = '+r+'\n'+'col title = '+c); }); }); body, html {font-family : Arial;} body {background: #333; color: #fff;font-size: 76%; padding: 0 1em;} .tabtit{background: #00;} .riga{background: #ff;} ID Tipo documento Titulo Ano publica��o Descri��o 1 Dossier restauro iygiu kjbikujb kjubiub 2 Notas de campo lalal�o wekrjgwergn erhg erh srtyj yl gg 3 Esposi�oes ��es owqe woeif oqweh oweh woe
[jQuery] Control form submitting
Hi all, is there some way how to control form submittin within succes or error calback functions within beforeSubmit callback function? In my my code I validate form data at client side, when form is valid I send data to server by callback function beforeSubmit. Server does another validation and return response. By this response I need to decide whether to submit or do not submit. But then (I guess) I cannot control return value by beforeSubmit function. $(document).ready(function() { var v = jQuery("#registration").validate({ submitHandler: function(form) { jQuery(form).ajaxSubmit({ url: '/registration/form/', success: function(response) { // user has been registered }, beforeSubmit: function(formData) { $.ajax({ type: "POST", url: "/registration/check/", data: formData, processData: true, success: function(response){ // process response }, error: function(){ // some error occured } }); } }); } }); });
[jQuery] Re: Greetings from Boston/AJAX Experience
If anyone wants to follow/add to the twitter/identi.ca/blog activity streams for these events, see here: jQuery Conference 2008 Activity Stream http://whoisi.com/e/jquerycon2008 The Ajax Experience 2008 Activity Stream http://whoisi.com/e/tae2008 If you're at either event, just create an account on whoisi.com (no reg. required) and add an alias like @jquerycon2008 or @tae2008. Then your twitter/identi.ca/blog posts will be added to the stream. One of the really neat features of whoisi.com is it works like a wiki. So if you know someone is at the event, you can create/update a whoisi account for them. And if someone has created an account for you, and you want to correct/add something, you can do that too. Here's more about whoisi.com: http://ejohn.org/blog/whoisi/ http://www.0xdeadbeef.com/weblog/?p=348 http://whoisi.com/about - Richard On Sat, Sep 27, 2008 at 12:20 PM, MorningZ <[EMAIL PROTECTED]> wrote: > > So i'm at the hotel bar of the conference's hotel for this weeks > event, i'll be running some items on my blog with pictures and some > talk of tomorrow's jQuery Event and then Mon-Wed's AJAX Experience > > Today is just a travel and relax day as I flew up from Florida this > morning and am awaiting my cousin to get here so we can head over to > Fenway Park for today's Sox/Yankees game (weather permitting, but > should be good) > > For those coming in, these tropical storms are going to be an issue > for most this time of the event, but for now it's just gloomy and no > rain > > I look forward to four straight days of jQuery, and hope others enjoy > the pics > > My blog: > http://www.morningz.com > >
[jQuery] Greetings from Boston/AJAX Experience
So i'm at the hotel bar of the conference's hotel for this weeks event, i'll be running some items on my blog with pictures and some talk of tomorrow's jQuery Event and then Mon-Wed's AJAX Experience Today is just a travel and relax day as I flew up from Florida this morning and am awaiting my cousin to get here so we can head over to Fenway Park for today's Sox/Yankees game (weather permitting, but should be good) For those coming in, these tropical storms are going to be an issue for most this time of the event, but for now it's just gloomy and no rain I look forward to four straight days of jQuery, and hope others enjoy the pics My blog: http://www.morningz.com
[jQuery] Re: infinite jQuery
No, a hard loop like while(true){} will not do you any good in any browser, now or in the foreseeable future. I doubt if it will work in Flash or Sliverlight either. It doesn't crash your browser, it merely locks it up. After all, it *is* an infinite loop. Most browsers will eventually put out a "script is taking too long" message and give you an opportunity to stop the script. You need to use setInterval or setTimeout if you want to repeat an action indefinitely. -Mike > I'm really excited about jQuery, just as all the rest here. > I've found out that it is really easy to create an animation. > However, one day I stumbled upon the following question: is > it possible to run one animation infinitely (repeat one > statement the whole time, in my case). > Is that even possible with Javascript? And by this, I really mean: > while(true); > > My webbrowser always seems to crash when I do infinite > javascript. And I feel really dissapointed, because it looks > like there is a constrait here with ECMA. Should I really use > other technologies like Flash or Silverlight? > > I would like to hear your ideas about infinite loops in > Javascript. Is this a possibility? Even if you think it might > be a commodity in the future, say so. Thank you.
[jQuery] Re: Can jQuery do it again and again?
If you used each then it should repeat for each DIV with the class of box on the page. $(document).ready(function(){ $("div.box").each(function() { $("div.box> *").wrapAll(''); $("div.box").append(''+''+''+''); }); }); What exactly are you trying to achieve though? Couldn't you just have all the DIVs laid out already and then style them with CSS to make them look the same? On Sep 26, 2:17 pm, thelemondropkid <[EMAIL PROTECTED]> wrote: > Thanks to the help I have received on this group, I am making > progress. > But now that all is working fine, the question beckons: Can jQuery do > it all over again? > > This is my code: > > > some header > > Lorem ipsum dolor sit amet. > > > And the jQuery: > > $(document).ready(function(){ > $("div.box> *").wrapAll(''); > $("div.box").append(''+' div>'+''+''); > > }); > > The problem: > > I would have thought that jQuery would repeat the above process if I > created another div with a class of "box" below the previous one. I > was wrong! > > Is there a way to do that because I would like to create various boxes > with a class of "box" and have them all look the same. > > Thanks folks
[jQuery] problem with mouseover / mouseout
I'm trying to make script that has faded image at start 30%, after hover sets opacity to 100% and on mouse out puts it back to 30%. so i did this: $(document).ready(function(){ $('a.view').fadeTo('fast', 0.33); $('a.view').mouseover(function () { $(this).fadeTo('normal', 1); }); $("a.view").mouseout(function () { $(this).fadeTo('normal', 0.33); }); }); Problem appears because i have 15 elements and when i hover over them fast few times script gets bugged and repeats that process xx times. I want to repeat effect only when fadeout is finished :) mycitysolutions.com - address so u can understand it better :) Thx in advance
[jQuery] mouseover / mouseout
Hey guys, I have problem and my programmer isn't around to help me :( Look at main page: http://www.mycitysolutions.com/ I used $('a.view').fadeTo('fast', 0.33) to fade out images on load and $('a.view').mouseover(function () { $(this).fadeTo('normal', 1); }); $("a.view").mouseout(function () { $(this).fadeTo('normal', 0.33); }); to make them change opacity on image hover. But if you try numerous times to run trough image animation will take some time :D So i need some event listener or ... how do i solve this so it repeats normally :) Thx in advance
[jQuery] how to submit features to someone else's plugin (masked input)
Hello: I've added some features to Josh Bush's Masked Input plugin, but I can't seem to get in touch with him via his website. I've added a suggested setting, which suggests a character that would be used in a character position in the field, e.g. (".monthNumber").mask("99", {suggested: "0"} ) will fill in the first character in the field: 0_ and set the caret at the first non- suggested character. It also accepts a sparse array: (".incrementByHalfpoint").mask("99.9",{suggested:[,,,0]}) would initalize the input field as __.0. I also added an overlay setting, which will put an overlay character in the field in place of the suggested character, for example: (".monthNumber").mask("99",{suggested: "0", overlay:"1"} ) would automatically change the month field to 1_ when the user backspaced or left arrowed over the 0 in the field. I also put a couple other touches in to make user input more intuitive. I'm hoping Josh looks over this list every once in a while. If not, what do I do? I'd like to get these changes in the plugin, because they address the primary weakness in the plugin. Thanks Eric
[jQuery] Re: Completion callback after events
> function selectTown(country, state, town) { > $('#country').val(country); > $('#country').change(); // <- this will load the states in the select > // once the country has been selected > // and select element containing states has been populated, then do > // $('#state').val(state); > // $('#state').change(); How about this. The country change handler will make an ajax request. Before starting that request you could set the state and town input autocomplete fields to the values passed to selectTown and clear the state select. In the success handler for the state ajax request, populate the state select and see if the value in the state autocomplete matches one of these values. If so, set the state select value and fire its change event. Do a similar thing in the state change handler so that town is populated and selected properly. Ajax requests are asynchronous, so the user can still type or click while the ajax is going on. I wasn't sure if the user actually saw the autocomplete input fields, but if they did it would be perfectly fine for them to type in a new state/town name different than the one passed to selectTown while the ajax is in progress. The match occurs when the ajax completes and it will match whatever is in the autocomplete field at that instant. If you didn't want them to do that for some reason, you could set disabled=true on those fields while the ajax was in progress.
[jQuery] Re: Form Plugin - JSON upload problem
It should be noted that the portion of the form is cloned and inserted when a user clicks a link. I think that part of the problem is that the plugin isn't detecting the value of the file input even though it is present in the data (seen via the console). On Sep 27, 11:06 am, Adam <[EMAIL PROTECTED]> wrote: > Hi Mike and all > > I've read the documentation on uploading a file via the form plugin > and JSON, but I simply can't get it to work. The form plugin dies as > soon as I submit it... no error is thrown, but it posts the whole page > like a normal form and no response is given. > > Here's my form code: > > http://localhost/media/add"; method="post" class="form- > std" id="form-add-media" enctype="multipart/form-data"> > > > > > > > > Choose an image to upload > > > > > > type="submit"> > > > Here's my JS: > > $('#form-add-media').ajaxForm({ > beforeSubmit: function(a,f,o) { > o.dataType = 'json'; > var queryString = $.param(a); > console.log(queryString); > //return false; > }, > success: function(d) { > if(d.error) { > $('#add-m-e').html(d.msg); > } > else { > $('#add-m-e').empty(); > } > } > }); > > Thanks for any help you can provide!
[jQuery] Form Plugin - JSON upload problem
Hi Mike and all I've read the documentation on uploading a file via the form plugin and JSON, but I simply can't get it to work. The form plugin dies as soon as I submit it... no error is thrown, but it posts the whole page like a normal form and no response is given. Here's my form code: http://localhost/media/add"; method="post" class="form- std" id="form-add-media" enctype="multipart/form-data"> Choose an image to upload Here's my JS: $('#form-add-media').ajaxForm({ beforeSubmit: function(a,f,o) { o.dataType = 'json'; var queryString = $.param(a); console.log(queryString); //return false; }, success: function(d) { if(d.error) { $('#add-m-e').html(d.msg); } else { $('#add-m-e').empty(); } } }); Thanks for any help you can provide!
[jQuery] Re: Can jQuery do it again and again?
> I would have thought that jQuery would repeat the above process if I > created another div with a class of "box" below the previous one. I can understand that, since it's the way CSS rules work. If you declare a CSS rule p.big { font-size: 200% } then any p with class big will have bigger text no matter when it is added to the document. However, jQuery is not declarative, it is procedural. It just uses CSS selector syntax to select nodes. The selection happens at the point where the jQuery code is executed, in your case in the ready() handler right after the document loads. Anything added after that isn't affected by the code that was executed earlier. Like MorningZ says, you can use the LiveQuery plugin to do what you describe. That's especially useful when you're inserting HTML into a page and not quite sure what's in it, such as the response from an AJAX transaction. If I am inserting an element and I know it needs a handler, I prefer to attach the handler then because it avoids the overhead of LiveQuery.
[jQuery] Re: suggestion - enable() / disable() functions
That could be easily reduced to this: $.fn.disable = function() { return this.attr('disabled', true).addClass('disabled'); } $.fn.enable = function() { return this.removeClass('disabled').attr('disabled', false); } On Sep 26, 2:28 pm, livefree75 <[EMAIL PROTECTED]> wrote: > I actually *JUST* created enable & disable functions: > > (function($) { > /** > * Disables the matched form elements, and adds the disabled var> class > * to them. > * @return jQuery The matched elements. > */ > $.fn.disable = function() { > $(this).each(function() { > $(this).attr("disabled", true).addClass("disabled"); > }); // $(this).each() > return $(this); > }; // $.fn.disable() > > /** > * Removes the disabled class from the matched form > elements, and > * re-enables them. > * @return jQuery The matched elements. > */ > $.fn.enable = function() { > $(this).each(function() { > $(this).removeClass("disabled").attr("disabled", > false); > }); // $(this).each() > return $(this); > }; // $.fn.enable() > > })(jQuery); > > Enjoy! > > Jamie > > On Sep 26, 7:55 am, Martin <[EMAIL PROTECTED]> wrote: > > > Dear all, > > > I like jQuery much but I do not like the way the enabling, disabling > > elements is handled. This is a pretty common task and the current > > solution based on changing attributes is not in accord with jQuery’s > > “write less” philosophy. > > The enable() / disable() functions would be MUCH more elegant and in > > light with the jQuery gospel. > > Could this be included in the next release ? > > > Best > > Martin
[jQuery] How can I use "remote" option in asp.net
Hi, everybody I have some questions for the "remote" option in asp.net page, If I have some value need to be verified in order to make it is unique, for example: . . userName:{ required: true, remote: "verify.aspx" } about the verify.aspx, I don't know how to output the result. I appreciate you feedback. thanks,
[jQuery] Re: Completion callback after events
This is the concrete situation for which I cannot find a solution: I have several 'select' elements which contain information like: country, state, town. [...] [...] [...] When a country is selected, I populate all the states of the country in the state 'select' by an ajax request, then when a state is selected, I populate all the towns of the selected state in the town 'select' A user can also select a town by typing in an input field with auto-completion. If he chooses a town among the auto-completion item list, I want to select automatically the appropiate country/state/town in the above select elements. (When he chooses an item in the autocompletion list, I have the country, state and town) function selectTown(country, state, town) { $('#country').val(country); $('#country').change(); // <- this will load the states in the select // once the country has been selected // and select element containing states has been populated, then do // $('#state').val(state); // $('#state').change(); } Richard D. Worth-2 wrote: > > On Sat, Sep 27, 2008 at 3:35 AM, debussy007 <[EMAIL PROTECTED]> wrote: > >> >> >> Hi, >> >> For a lot of asynschronous calls, like the effects, jQuery provides >> completion callbacks which are very useful. >> Unfortunately it doesn't provide completion callbacks for events. >> >> How am I able to know when an event has been completely processed ? >> Once a specific event has been processed, I would like to perform other >> instructions. > > > Can you describe what you mean by "when an event has been completely > processed"? Maybe provide a concrete example? Events occur or fire, they > don't process. So you can be notified when events occur/are triggered > using: > > $("#myEl").bind("keydown", function() { ... }) > //or > $("#myEl").keydown(function() { ... }) > > and same for any events (click, mousedown, mousemove, mouseup, change, > etc). > At what other time would you want to be notified? keyup and keypress are > separate events (to complete this example). > > - Richard > > -- View this message in context: http://www.nabble.com/Completion-callback-after-events-tp19700454s27240p19702806.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Portìng a Mootools ticker script to Jquery
All, new here and just wondering if anyone would pick up the challenge ;) I am a poor coder, I tried but can't figure it out. The thing is that I implement various jquery stuff in some projects and I feel comfortable with that. I do not want to mix mootools and jquery library, so it's all or nothing. I would love to have the following socalled Newsvine news ticker ported to jQuery: http://woork.blogspot.com/2008/07/fantastic-news-ticker-newsvine-like.html I think it looks great, and far better than any ticker script I have seen based on Jquery. Thanks anyway! btw, Is this the right group for such a selfish request?
[jQuery] infinite jQuery
Hi all, I'm really excited about jQuery, just as all the rest here. I've found out that it is really easy to create an animation. However, one day I stumbled upon the following question: is it possible to run one animation infinitely (repeat one statement the whole time, in my case). Is that even possible with Javascript? And by this, I really mean: while(true); My webbrowser always seems to crash when I do infinite javascript. And I feel really dissapointed, because it looks like there is a constrait here with ECMA. Should I really use other technologies like Flash or Silverlight? I would like to hear your ideas about infinite loops in Javascript. Is this a possibility? Even if you think it might be a commodity in the future, say so. Thank you.
[jQuery] Re: jQuery and Zend Framework validation integration
Next idea, is there some jQuery API to trigger/display an error label associated with a specific form field? J. 2008/9/27 Jörn Zaefferer <[EMAIL PROTECTED]> > Setup ajaxForm with dataType:"json". Then your success-callback will > get a parsed JavaScript object as the first argument. > > $("#myform").ajaxForm({ > dataType: "json", > success: function(data) { >// iterate over data.messages and display labels? > } > }); > > Jörn > > On Fri, Sep 26, 2008 at 11:56 PM, jnemec <[EMAIL PROTECTED]> wrote: > > > > Hi all, > > > > I am going to use server-side Zend_Form data validation process and > > its result show with jQuery. I send form data via ajaxForm(); function > > and Zend controller validates data a returns information about > > validation result in json format: > > > > {"status":"error","messages":{"email":{"isEmpty":"Value is empty, but > > a non-empty value is required"},"password":{"isEmpty":"Value is empty, > > but a non-empty value is required"},"password2":{"isEmpty":"Value is > > empty, but a non-empty value is required"},"city":{"isEmpty":"Value is > > empty, but a non-empty value is required"},"zip":{"isEmpty":"Value is > > empty, but a non-empty value is required"},"street":{"isEmpty":"Value > > is empty, but a non-empty value is required"}}} > > > > Do anybody know how to parse it a how to display these messages in > > proper form error labels? > > > > Thank you, J. > > >
[jQuery] Re: jQuery and Zend Framework validation integration
I have found the beforeSubmit(); callback function which will probably works for me. I would like to within this function call via Ajax the server, pass form data and process its response. But, there is one problem with sending data to server, because this piece of my code sends to server only string "[object Object]", probably I do something incorrectly, do I need to transform data argument into something (?) which is then possible to procees at server? Do you have some advice for me? Thank you very much in advance. $(document).ready(function() { var v = jQuery("#registration").validate({ submitHandler: function(form) { jQuery(form).ajaxSubmit({ dataType: 'json', url: '/registration/save/', beforeSubmit: function(data){ // sends data to server a process response and return true/false according to server response } }); } }); }); 2008/9/27 Jörn Zaefferer <[EMAIL PROTECTED]> > Whats comes closest to that is the validation plugin: > http://bassistance.de/jquery-plugins/jquery-plugin-validation/ > > You can pass messages to the internal showErrors method: > http://docs.jquery.com/Plugins/Validation/Validator/showErrors > > Jörn > > On Sat, Sep 27, 2008 at 11:56 AM, Jiří Němec <[EMAIL PROTECTED]> wrote: > > Next idea, is there some jQuery API to trigger/display an error label > > associated with a specific form field? > > > > J. > > > > 2008/9/27 Jörn Zaefferer <[EMAIL PROTECTED]> > >> > >> Setup ajaxForm with dataType:"json". Then your success-callback will > >> get a parsed JavaScript object as the first argument. > >> > >> $("#myform").ajaxForm({ > >> dataType: "json", > >> success: function(data) { > >>// iterate over data.messages and display labels? > >> } > >> }); > >> > >> Jörn > >> > >> On Fri, Sep 26, 2008 at 11:56 PM, jnemec <[EMAIL PROTECTED]> wrote: > >> > > >> > Hi all, > >> > > >> > I am going to use server-side Zend_Form data validation process and > >> > its result show with jQuery. I send form data via ajaxForm(); function > >> > and Zend controller validates data a returns information about > >> > validation result in json format: > >> > > >> > {"status":"error","messages":{"email":{"isEmpty":"Value is empty, but > >> > a non-empty value is required"},"password":{"isEmpty":"Value is empty, > >> > but a non-empty value is required"},"password2":{"isEmpty":"Value is > >> > empty, but a non-empty value is required"},"city":{"isEmpty":"Value is > >> > empty, but a non-empty value is required"},"zip":{"isEmpty":"Value is > >> > empty, but a non-empty value is required"},"street":{"isEmpty":"Value > >> > is empty, but a non-empty value is required"}}} > >> > > >> > Do anybody know how to parse it a how to display these messages in > >> > proper form error labels? > >> > > >> > Thank you, J. > >> > > > > > >
[jQuery] Re: [validate] jQuery validation plugin in Drupal
Yes, an example would help a lot. Jörn On Sat, Sep 27, 2008 at 12:45 PM, Jeroen Coumans <[EMAIL PROTECTED]> wrote: > > Thanks, I tried that but it doesn't seem to work. Drupal applies the > classes "required" to required form fields, and they're picked up > correctly. But any rule I add doesn't work at all. Even a single rule > to make an extra field required doesn't get picked up. > > Would it help if I setup an example of what I'm trying to achieve? > > Thanks, > Jeroen > > On 27 sep, 02:57, "Jörn Zaefferer" <[EMAIL PROTECTED]> > wrote: >> Yes, details can be found >> here:http://docs.jquery.com/Plugins/Validation/Reference#Fields_with_compl... >> >> Jörn >> >> On Sat, Sep 27, 2008 at 2:34 AM, Jeroen Coumans <[EMAIL PROTECTED]> wrote: >> >> > Hi, >> >> > When trying to use the validator plugin, I get the following error: >> >> > missing : after property id >> > edit-name: "required", >> >> > It seems like it has problems with the "-" that Drupal puts in the >> > id's of each form field. Is there a workaround possible? >> >> > Thanks, >> > Jeroen Coumans >
[jQuery] Re: jQuery and Zend Framework validation integration
Whats comes closest to that is the validation plugin: http://bassistance.de/jquery-plugins/jquery-plugin-validation/ You can pass messages to the internal showErrors method: http://docs.jquery.com/Plugins/Validation/Validator/showErrors Jörn On Sat, Sep 27, 2008 at 11:56 AM, Jiří Němec <[EMAIL PROTECTED]> wrote: > Next idea, is there some jQuery API to trigger/display an error label > associated with a specific form field? > > J. > > 2008/9/27 Jörn Zaefferer <[EMAIL PROTECTED]> >> >> Setup ajaxForm with dataType:"json". Then your success-callback will >> get a parsed JavaScript object as the first argument. >> >> $("#myform").ajaxForm({ >> dataType: "json", >> success: function(data) { >>// iterate over data.messages and display labels? >> } >> }); >> >> Jörn >> >> On Fri, Sep 26, 2008 at 11:56 PM, jnemec <[EMAIL PROTECTED]> wrote: >> > >> > Hi all, >> > >> > I am going to use server-side Zend_Form data validation process and >> > its result show with jQuery. I send form data via ajaxForm(); function >> > and Zend controller validates data a returns information about >> > validation result in json format: >> > >> > {"status":"error","messages":{"email":{"isEmpty":"Value is empty, but >> > a non-empty value is required"},"password":{"isEmpty":"Value is empty, >> > but a non-empty value is required"},"password2":{"isEmpty":"Value is >> > empty, but a non-empty value is required"},"city":{"isEmpty":"Value is >> > empty, but a non-empty value is required"},"zip":{"isEmpty":"Value is >> > empty, but a non-empty value is required"},"street":{"isEmpty":"Value >> > is empty, but a non-empty value is required"}}} >> > >> > Do anybody know how to parse it a how to display these messages in >> > proper form error labels? >> > >> > Thank you, J. >> > > >
[jQuery] Re: [validate] jQuery validation plugin in Drupal
Thanks, I tried that but it doesn't seem to work. Drupal applies the classes "required" to required form fields, and they're picked up correctly. But any rule I add doesn't work at all. Even a single rule to make an extra field required doesn't get picked up. Would it help if I setup an example of what I'm trying to achieve? Thanks, Jeroen On 27 sep, 02:57, "Jörn Zaefferer" <[EMAIL PROTECTED]> wrote: > Yes, details can be found > here:http://docs.jquery.com/Plugins/Validation/Reference#Fields_with_compl... > > Jörn > > On Sat, Sep 27, 2008 at 2:34 AM, Jeroen Coumans <[EMAIL PROTECTED]> wrote: > > > Hi, > > > When trying to use the validator plugin, I get the following error: > > > missing : after property id > > edit-name: "required", > > > It seems like it has problems with the "-" that Drupal puts in the > > id's of each form field. Is there a workaround possible? > > > Thanks, > > Jeroen Coumans
[jQuery] Re: i was patient, now i'm frustrated
ricardobeat ha scritto: As of now www.jquery.com and docs.jquery.com are loading faster than ever, and I'm in Brazil! I'm from italy, docs.jquery.com loads in about a minute: http://lab.gianiaz.com/docs.jquery.com.jpg -- gianiaz.net - web solutions p.le bertacchi 66, 23100 sondrio (so) - italy +39 347 7196482
[jQuery] Re: Completion callback after events
On Sat, Sep 27, 2008 at 3:35 AM, debussy007 <[EMAIL PROTECTED]> wrote: > > > Hi, > > For a lot of asynschronous calls, like the effects, jQuery provides > completion callbacks which are very useful. > Unfortunately it doesn't provide completion callbacks for events. > > How am I able to know when an event has been completely processed ? > Once a specific event has been processed, I would like to perform other > instructions. Can you describe what you mean by "when an event has been completely processed"? Maybe provide a concrete example? Events occur or fire, they don't process. So you can be notified when events occur/are triggered using: $("#myEl").bind("keydown", function() { ... }) //or $("#myEl").keydown(function() { ... }) and same for any events (click, mousedown, mousemove, mouseup, change, etc). At what other time would you want to be notified? keyup and keypress are separate events (to complete this example). - Richard
[jQuery] Re: jQuery and Zend Framework validation integration
Hi, I use exactly the same code as you mentioned: $(document).ready(function() { $('#registration').ajaxForm({ dataType: 'json', url: '/registration/check/', success: function(data) { alert(data); } } ); But I do not want to show labels by hand and duplicate jQuery's error label showing process. I would rather to parse returned data into some normalized (if any...?) format and this pass to jQuery to show in its proper way. Is there some way how to do it? J. On Sep 27, 2:56 am, "Jörn Zaefferer" <[EMAIL PROTECTED]> wrote: > Setup ajaxForm with dataType:"json". Then your success-callback will > get a parsed JavaScript object as the first argument. > > $("#myform").ajaxForm({ > dataType: "json", > success: function(data) { > // iterate over data.messages and display labels? > } > > }); > > Jörn > > On Fri, Sep 26, 2008 at 11:56 PM, jnemec <[EMAIL PROTECTED]> wrote: > > > Hi all, > > > I am going to use server-side Zend_Form data validation process and > > its result show with jQuery. I send form data via ajaxForm(); function > > and Zend controller validates data a returns information about > > validation result in json format: > > > {"status":"error","messages":{"email":{"isEmpty":"Value is empty, but > > a non-empty value is required"},"password":{"isEmpty":"Value is empty, > > but a non-empty value is required"},"password2":{"isEmpty":"Value is > > empty, but a non-empty value is required"},"city":{"isEmpty":"Value is > > empty, but a non-empty value is required"},"zip":{"isEmpty":"Value is > > empty, but a non-empty value is required"},"street":{"isEmpty":"Value > > is empty, but a non-empty value is required"}}} > > > Do anybody know how to parse it a how to display these messages in > > proper form error labels? > > > Thank you, J.
[jQuery] Re: i was patient, now i'm frustrated
@Andy, yes there are more resources out there. I don't rely on those resources so I need to find them. This somewhat distracts my train of thought at the time when if I mosied on down to the jQuery docs I would have completed my task a lot quicker, I want to be able to rely on the jquery resources. All is fine now once again :) On Sep 27, 4:29 am, ricardobeat <[EMAIL PROTECTED]> wrote: > As of no.jquery.comand docs.jquery.com are loading faster than > ever, and I'm in Brazil! > > - ricardo > > On Sep 26, 12:21 pm, DejanNenov <[EMAIL PROTECTED]> wrote: > > > John - > > > There are quite a few of us who are big fans and have plenty of data > > center capacity. I am sure the community would be happy to mirror the > > site (you can have one of our small older server in our rack any > > time). Furthermore - RIMU hosting are great (I am a former client) if > > you need an app server, but for static content (as I think most of the > > jQuery site is) - EC2 may be better - and unlikely to suffer a > > "power outage" > > > Cheers & keep up the great work, > > > Dejan > > > On Sep 26, 8:46 am, "John Resig" <[EMAIL PROTECTED]> wrote: > > > > This is a completely unrelated issue - we host jQuery.com (the > > > homepage, blog, and dev) on a separate server with Rimuhosting. There > > > was a power outage at the server facility and they're working ot bring > > > it back > > > up:http://rimuhosting.com/maintenance.jsp?server_maint_oid=68009362 > > > > The other sub-domains should be responding fine (docs, plugins, ui, code). > > > > --John > > > > On Fri, Sep 26, 2008 at 4:35 AM, Richard W <[EMAIL PROTECTED]> wrote: > > > > > How long does it take to sort out hosting issues? > > > > 1 month, 2 months? > > > > I've been reading all the comments from frustrated developers who are > > > > unable to do their job because the jQuery site does not load. I > > > > thought those people should understand the situation and be patient. > > > > Now it's my turn to complain, because now this is affecting my job. > > > > Media Template obviously don't have the knowledge or capacity to > > > > correctly host a high traffic site. What's the problem, really, i'm > > > > curious why this SERIOUS issue has not been resolved after so long?
[jQuery] Re: Tabs with multiple CSS classes
On 27 Sep., 01:06, "Dan Baughman" <[EMAIL PROTECTED]> wrote: > Is looking at the noncompressed code the best way to figure that stuff out > with out having to ask? The best way is reading the documentation: http://docs.jquery.com/UI/Tabs *But*: In this special case you wouldn't have had luck, because that special option is not (yet) documented. --Klaus
[jQuery] Re: jEditable Plugin question
On Sep 25, 2008, at 1:42 AM, 3apo wrote: edit_2. and want to toggle between the two edits based upon some criterion. So if do a $(this).removeClass('edit_1'); $(this).addClass('edit_2'); This doesnt really propagate thru, and the editable area is still stuck with edit_1 options. You need to bind editable again after changing DOM. Although without testing I am not sure how it will work if you bind a plugin to element twice. -- Mika Tuupola http://www.appelsiini.net/
[jQuery] Re: jEditable Clone Referring to the Original Element, livequery ok to use?
On Sep 27, 2008, at 12:24 AM, Wayne wrote: I was trying to put livequery in place on the site, but it seems to attach to pre-known events, like click, instead of new events, like editable. Brandon would be the correct person to answer this. He knows the internals on livquery the best. -- Mika Tuupola http://www.appelsiini.net/
[jQuery] Completion callback after events
Hi, For a lot of asynschronous calls, like the effects, jQuery provides completion callbacks which are very useful. Unfortunately it doesn't provide completion callbacks for events. How am I able to know when an event has been completely processed ? Once a specific event has been processed, I would like to perform other instructions. Thank you for any help! -- View this message in context: http://www.nabble.com/Completion-callback-after-events-tp19700454s27240p19700454.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.