[jQuery] input fields and change
Is there some better way than change() to check if an input field's content has changed? As you all probably know, change() only fires when you remove the focus from the input field, but I want to trigger an event every time the content of an input field changes either by typing something, using crtl-v, pasting from the selection buffer (middle click on *nix), or rightclicking and selecting 'paste'. Is there an existing solution for that, or will I need to write something that just checks the field periodically using setInterval()? Jonathan -- Jonathan Vanherpe - Tallieu Tallieu NV - jonat...@tnt.be
[jQuery] Re: input fields and change
good idea,but difficult. 2009/7/10 Jonathan Vanherpe (T T NV) jonat...@tnt.be Is there some better way than change() to check if an input field's content has changed? As you all probably know, change() only fires when you remove the focus from the input field, but I want to trigger an event every time the content of an input field changes either by typing something, using crtl-v, pasting from the selection buffer (middle click on *nix), or rightclicking and selecting 'paste'. Is there an existing solution for that, or will I need to write something that just checks the field periodically using setInterval()? Jonathan -- Jonathan Vanherpe - Tallieu Tallieu NV - jonat...@tnt.be
[jQuery] Re: input fields and change
Jonathan Vanherpe (T T NV) wrote: Is there some better way than change() to check if an input field's content has changed? As you all probably know, change() only fires when you remove the focus from the input field, but I want to trigger an event every time the content of an input field changes either by typing something, using crtl-v, pasting from the selection buffer (middle click on *nix), or rightclicking and selecting 'paste'. Is there an existing solution for that, or will I need to write something that just checks the field periodically using setInterval()? Jonathan Found the answer myself here: http://furrybrains.com/tag/jquery/ works like a charm (with a small modification) Jonathan -- Jonathan Vanherpe - Tallieu Tallieu NV - jonat...@tnt.be
[jQuery] Re: Autocomplete selection Issue
Ofcourse not dude.. i am in search of a autocomplete that should be similar to the given link: http://www.hscripts.com/scripts/JavaScript/autocomplete-form.php?text=arrangement in preview,if you type j the list will be java/junction.if you keydown to any one of the option,the highlighted will be shown in the textbox... i want this functionality..is this possiblw with the jquery??? On Thu, Jul 9, 2009 at 7:41 PM, 刘永杰 liuyongjie...@gmail.com wrote: is this ad? 2009/7/9 jazz bharathbhooshan.amb...@gmail.com Hi Can any body suggest me how to do this by jquery..i have seen some autocomplete examples but i am not getting the correct application like this: first we type a letter,then it will show a list from that we scroll down the mouse(either mouse or keypad) the highlighted value should be placed in the textbox..which is similar to the link: http://www.hscripts.com/scripts/JavaScript/autocomplete-form.php?text=arrangement please give me idea Regards, Bhatath -- భరత్ భూషణ్ అంబటి
[jQuery] Re: Turn off caching (still caches) för que ries with charaters 'å', 'ä' and 'ö'
UPDATE: I made a mistake and hadn't set the matchContains option to true (which was the backend method we used). This ment that when I continued to add more characters it only kept the terms that started with the input query (using the cache - i.e. no new ajax request was made). However, as I had set the cacheLength to 1 I believe it shouldn't have used the cache at all but maybe it always caches the current result... On 9 Juli, 14:33, cl2csand mikael.san...@gmail.com wrote: When I use theautocompleteplugin with cacheLength set to 1 it still seems to caches som queries. Although I have only seen the problem with queries containing the characters (swedish) å, ä or ö. Maybe the problem lies there. To solve this I have to call the flushCache function first in the formatTerm function which seems a bit unnecessary. Eg: If I start to write fö it makes an ajax request and return say 25 rows. If I then continue and write an r I only get a list of 3 terms although about 10 items (of the first 25) contains för. This time no ajax request was made which makes me believe that it is a problem with the caching. If I call flushCache in formatItem it always makes a new ajax request with each modification of the search term and the correct results are displayed.
[jQuery] Re: Autocomplete selection Issue
sorry,i make a mistake. 2009/7/10 bharathbhooshan ambati bharathbhooshan.amb...@gmail.com Ofcourse not dude.. i am in search of a autocomplete that should be similar to the given link: http://www.hscripts.com/scripts/JavaScript/autocomplete-form.php?text=arrangement in preview,if you type j the list will be java/junction.if you keydown to any one of the option,the highlighted will be shown in the textbox... i want this functionality..is this possiblw with the jquery??? On Thu, Jul 9, 2009 at 7:41 PM, 刘永杰 liuyongjie...@gmail.com wrote: is this ad? 2009/7/9 jazz bharathbhooshan.amb...@gmail.com Hi Can any body suggest me how to do this by jquery..i have seen some autocomplete examples but i am not getting the correct application like this: first we type a letter,then it will show a list from that we scroll down the mouse(either mouse or keypad) the highlighted value should be placed in the textbox..which is similar to the link: http://www.hscripts.com/scripts/JavaScript/autocomplete-form.php?text=arrangement please give me idea Regards, Bhatath -- భరత్ భూషణ్ అంబటి
[jQuery] Re: Autocomplete selection Issue
better to ask Dr.Google. http://www.google.co.in/search?q=jquery+autocomplete+plugin the first result points to http://bassistance.de/jquery-plugins/jquery-plugin-autocomplete/
[jQuery] Re: jQuery on IE
It worked just fine :) Thanks a lot, you guys ^^ On Jul 9, 6:20 pm, Ricardo ricardob...@gmail.com wrote: I was wondering how noone had noticed it. I know that application/ javascript, which should be the current standard, does not work in IE. application/x-javascript probably doesn't as well. On a side note, you're wasting function calls, as you're already using native element creation set the .id attribute directly: $(document).ready(function(){ var nome = post = ; var html = document.createElement(div); html.id = submenu; . }); or do it all with jQuery: $('div id=submenu /'); then you have the benefit of short code instead :) On Jul 9, 5:50 pm, Peter Edwards p...@bjorsq.net wrote: Why is the type attribute of the script tag set to application/x-javascript rather than text/javascript ? on 09/07/2009 21:40 Paulodemoc said:: the address to js is correct, it opens just fine. I created a new document: !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=utf-8 / titleAstral/title link href=?php echo base_url();?css/style.css rel=stylesheet type=text/css / script language=javascript src=?php echo base_url();?js/ jquery.js type=application/x-javascript /script script alert($); /script /head body /body /html and it also showed the error message saying that $ is not defined. but on firefox, it showed: function (selector, context) { return new (jQuery.fn.init)(selector, context); } u_U (man, i hate IE) On Jul 9, 5:30 pm, Matt Kruse m...@thekrusefamily.com wrote: So now enter this in IE's address bar: http://servidor/astral/web/js/jquery.js Does it load? If yes, then create this document: htmlhead script language=javascript src=http://servidor/astral/web/js/ jquery.js type=application/x-javascript /script script alert($); /script /head/html What does it alert? Make sure IE's settings are such that errors will be shown. Matt Kruse On Jul 9, 3:27 pm, Paulodemoc paulode...@gmail.com wrote: The generated code is script language=javascript src=http://servidor/astral/web/js/ jquery.js type=application/x-javascript /script I tryied to add the alert('jQuery not loaded'); but no alert was shown But still, the error persists... I will paste here the full code, so you guys can see: !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.1//EN http://www.w3.org/ TR/xhtml11/DTD/xhtml11.dtd html xmlns=http://www.w3.org/1999/xhtml; head meta http-equiv=Content-Type content=text/html; charset=UTF-8 / titleAstral/title link rel=stylesheet href=?php echo base_url(); ?css/ thickbox.css type=text/css / link href=?php echo base_url();?css/style.css rel=stylesheet type=text/css / script language=javascript src=?php echo base_url();?js/ jquery.js type=application/x-javascript /script script language=javascript src=?php echo base_url();?js/ thickbox.js type=application/x-javascript /script script function showSubProdutos() { $(#submenu).fadeIn(slow); }; function hideSubProdutos() { $(#submenu).fadeOut(fast); }; function showProjetos() { $(#submenu2).fadeIn(slow); }; function hideProjetos() { $(#submenu2).fadeOut(fast); }; function hideAll() { $(#submenu).fadeOut(fast); $(#submenu2).fadeOut(fast); }; function changeSubject() { if($(#assunto).find('option').filter(':selected').text() == Receita) { //$(#msg-cont).toggle(2000, function(){ $(#recipe-cont).toggle (2000); }); $(#msg-cont).slideUp(slow, function(){ $(this).hide(); $(#recipe-cont).slideDown(2000); }); } else { $(#recipe-cont).slideUp(slow, function(){ $(#msg-cont).slideDown(slow); }); } }; $(document).ready(function(){ var nome = ; var pos = ; var html = document.createElement(div); $(html).attr(id, submenu); $(html).css(z-index, 30); $(html).css(position, relative); $(html).css(background-color, #D7);
[jQuery] jquery dialog, closeOnEscape problem with modal dialogs
Hi, whilst trying out new things for the web application I'm developing I ran into a bit of a problem. If I have two modal dialogs, one launched from inside the other (if it matters), both with the closeOnEscape: true setting, hitting esc while on the topmost dialog either closes them both or the one at the bottom. This seems to change between refreshes. In short, very confusing. Problem is, I'm too bogged down by the other dev work to properly test recreate the situation, but has anyone here heard of such problems in the past? or is it just my code behaving oddly. Not a major thing (I and the users can live without closeOnEscape), but I just wanted to check here first.
[jQuery] Jquery UI Blind + javascript fckeditor not working in ie8 but works in other browsers...help
Hello, im fairly new to Jquery and I am learning alot. I right now am trying to get FCKEditor via javascript inside my jquery div. Basically what i have going on is the tabs ui, and inside one of the tabs is the accordian ui and at the bottom of the accordian ui i have a Link that you click to show the div that is holding the fckeditor text area. When i click this link, ONLY in IE at least 8, it does the blind effect i have, then you see it then it goes white. I have tried to alter my css for that div to a set width and height along with position and display. I cannot figure this out I would really like to use fck but right now I dont think IE supports javascript inside a jquery altered element. :S code: script type=text/javascript $(document).ready(function(){ $(#pro_wall_post).hide(); $(#showpost).click(function () { $(#pro_wall_post).show(blind, { direction: vertical }, 600); var oFCKeditor = new FCKeditor( 'postarea' ) ; oFCKeditor.BasePath = /java/fckeditor/ ; oFCKeditor.ReplaceTextarea(); }); }); /script a href=javascript:void(0); id=showpostClick Here to Post on TMPL_VAR NAME=FIRSTNAME's Wall/a div id=pro_wall_post class=ui-effects-transfer form type=post action= Subject: input id=pro_wall_post2 type=textfield size=50/inputbr/ textarea id=postarea name=postarea cols=107 rows=2OMGSH/textarea input id=pro_wall_post_submit type=submit value=Post name=submit /form /div Thanks for any helpers out there. -Scott
[jQuery] Problem with jQuery Validation
Hello... this is my code: $(#form_atividades).validate({ rules: { ds_atividades: { required: true, minlength: 10 }, 'hr_inicial[0]': { required: true }, 'hr_final[0]': { required: true } }, messages: { ds_atividades: { required: É obrigatório preencher a Descrição da Atividade, minlength: É obrigatório preencher a Descrição da Atividade com pelo menos 10 caracteres }, hr_inicial[0]: { required: É obrigatório preencher o 1º Horário Inicial dos Períodos }, hr_final[0]: { required: É obrigatório preencher o 1º Horário Final dos Períodos } } }); but when I click on the field ds_descricao, it's the following error in Firebug: validator is undefined http://localhost/js/jquery.validate.js Line 287 Somebody heelp! i must solve this problem with urgency! Thks a lot for attention... []s
[jQuery] webkit width issue
I'm having an issue with getting and setting widths on table cells in webkit browsers. It appears that webkit is assigning the wrong offsetWidth such that borders are not included in the width. The result is that width() returns the innerWidth and outerWidth returns the correct non-outer width. Setting the width seems to have a similar issue. If you set the width of a cell and then ask for it back, it will be the width you set, minus your borders. I set up a demo of this behavior: http://www.avencia.com/pickup/widthtest.html Everything should print as expected in Firefox/IE, but in Chrome/ Safari the width values are incorrectly altered. This may just be a webkit bug/issue, but should jQuery handle it? Has only else experienced this or know a workaround? thanks.
[jQuery] Jcarousel problems in the buttins with IE6
Hi all, I have a big problem with Jcarousel. I don't know what to do! In IE6, when I open my page, the button NEXT is disabled and so I can't view the other photos. Any help, please? Thanks a lot Bye Andrea
[jQuery] $.getScript callback doesn't work as expected
The docs say: Callback A function to be executed whenever the data is loaded successfully. function (data, textStatus) { // data should be javascript this; // the options for this ajax request } however if I do $.getScript(url, function(data){console.log(data);}) it prints null. The script is loaded fine. I'm trying to load the script and assign the source to an object, should I avoid this function altogether and use eval() and a GET?
[jQuery] $.post callback broken in safari in new window.open()
hello I'm opening a new window with window.open() In the new window a file is loaded with the following post data function: function ajaxPost(url,data){ $.post(url,data, function(data){ alert(data) }); , json); } If I call this function form within the new window everything is fine - If I call it from the opener window the callback function is broken - only in safari - ff works fine. any work around for this? 1000 thanks
[jQuery] Sony Drop down menu in jquery
Hi, Is the horizontal drop down menu in Sony (http://www.sony.com/ index.php) can be done in Jquery?. I like the 2 columns like shop or electronics and the sub menu just expand when it is being click. Is there already done solution like this on the web? Thanks!
[jQuery] Jquery and fckeditor with ie8 inside a div using ui blind not working but works in other browsers help.
Hello, im fairly new to Jquery and I am learning alot. I right now am trying to get FCKEditor via javascript inside my jquery div. Basically what i have going on is the tabs ui, and inside one of the tabs is the accordian ui and at the bottom of the accordian ui i have a Link that you click to show the div that is holding the fckeditor text area. When i click this link, ONLY in IE at least 8, it does the blind effect i have, then you see it then it goes white. I have tried to alter my css for that div to a set width and height along with position and display. I cannot figure this out I would really like to use fck but right now I dont think IE supports javascript inside a jquery altered element. :S code: script type=text/javascript $(document).ready(function(){ $(#pro_wall_post).hide(); $(#showpost).click(function () { $(#pro_wall_post).show(blind, { direction: vertical }, 600); var oFCKeditor = new FCKeditor( 'postarea' ) ; oFCKeditor.BasePath = /java/fckeditor/ ; oFCKeditor.ReplaceTextarea(); }); }); /script a href=javascript:void(0); id=showpostClick Here to Post on TMPL_VAR NAME=FIRSTNAME's Wall/a div id=pro_wall_post class=ui-effects-transfer form type=post action= Subject: input id=pro_wall_post2 type=textfield size=50/inputbr/ textarea id=postarea name=postarea cols=107 rows=2OMGSH/textarea input id=pro_wall_post_submit type=submit value=Post name=submit /form /div Thanks for any helpers out there. -Scott
[jQuery] convert character in event code
Hi, I'm new to this list. I have a question: is there any way to convert characters in event code (the output of e.which) and vice versa? For example: character § = code 32 code 732 = character ~ Thanks Greg
[jQuery] Cool Sony Horizontal Drop Down menu in JQuery?
Hi, Sony.com (http://www.sony.com/index.php) has a very cool horizontal menu, My question is can this be done in unordered list with JQuery? I like the 2 columns menu that expand (it can be seen under shop or electronics) and also would expand to its sub menu. Is there already done solution for this? Thanks!
[jQuery] mcDropdown jQuery Plug-in v1.2.07
I am using this FANTASTIC drop down plugin for jQuery, but wondered how I can customise it so that rather than hit the button ont he right, I can click the whole active area to get the dropdown to appear. I currently have the menu attached to a single line text box and would like it to open up when ever I click in the text box, or on the dropdown arrow? Also, how can I specify some default text in the text box that is acting as my dropdown launchpad? Regards Darren
[jQuery] Using the object literal notation
Hi, the other day I read this article by Alan Storm called Using jQuery and the Object Literal Singleton/Module Pattern (http://alanstorm.com/ jquery_object_literal_oop), as well as the interesting appendix chapter JavaScript that you need to know but might not! (you can find a nice article on this one here: http://11heavens.com/everything-is-a-property-of-an-object-in-javascript) Now I'm wondering if any of you are writing jQuery code using the object literal notation a lot? I'd be happy to check some code examples and/or get advise on when it actually makes sense to use this notation. I'd also be interested in hearing of people who try to take an even more object oriented approach on jQuery using something like jquery- klass. Thanks
[jQuery] Re: jQuery on IE
Thanks for the tips :) Learning is always good ;) I will try text/javascript and let you know the results ... On Jul 9, 6:20 pm, Ricardo ricardob...@gmail.com wrote: I was wondering how noone had noticed it. I know that application/ javascript, which should be the current standard, does not work in IE. application/x-javascript probably doesn't as well. On a side note, you're wasting function calls, as you're already using native element creation set the .id attribute directly: $(document).ready(function(){ var nome = post = ; var html = document.createElement(div); html.id = submenu; . }); or do it all with jQuery: $('div id=submenu /'); then you have the benefit of short code instead :) On Jul 9, 5:50 pm, Peter Edwards p...@bjorsq.net wrote: Why is the type attribute of the script tag set to application/x-javascript rather than text/javascript ? on 09/07/2009 21:40 Paulodemoc said:: the address to js is correct, it opens just fine. I created a new document: !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=utf-8 / titleAstral/title link href=?php echo base_url();?css/style.css rel=stylesheet type=text/css / script language=javascript src=?php echo base_url();?js/ jquery.js type=application/x-javascript /script script alert($); /script /head body /body /html and it also showed the error message saying that $ is not defined. but on firefox, it showed: function (selector, context) { return new (jQuery.fn.init)(selector, context); } u_U (man, i hate IE) On Jul 9, 5:30 pm, Matt Kruse m...@thekrusefamily.com wrote: So now enter this in IE's address bar: http://servidor/astral/web/js/jquery.js Does it load? If yes, then create this document: htmlhead script language=javascript src=http://servidor/astral/web/js/ jquery.js type=application/x-javascript /script script alert($); /script /head/html What does it alert? Make sure IE's settings are such that errors will be shown. Matt Kruse On Jul 9, 3:27 pm, Paulodemoc paulode...@gmail.com wrote: The generated code is script language=javascript src=http://servidor/astral/web/js/ jquery.js type=application/x-javascript /script I tryied to add the alert('jQuery not loaded'); but no alert was shown But still, the error persists... I will paste here the full code, so you guys can see: !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.1//EN http://www.w3.org/ TR/xhtml11/DTD/xhtml11.dtd html xmlns=http://www.w3.org/1999/xhtml; head meta http-equiv=Content-Type content=text/html; charset=UTF-8 / titleAstral/title link rel=stylesheet href=?php echo base_url(); ?css/ thickbox.css type=text/css / link href=?php echo base_url();?css/style.css rel=stylesheet type=text/css / script language=javascript src=?php echo base_url();?js/ jquery.js type=application/x-javascript /script script language=javascript src=?php echo base_url();?js/ thickbox.js type=application/x-javascript /script script function showSubProdutos() { $(#submenu).fadeIn(slow); }; function hideSubProdutos() { $(#submenu).fadeOut(fast); }; function showProjetos() { $(#submenu2).fadeIn(slow); }; function hideProjetos() { $(#submenu2).fadeOut(fast); }; function hideAll() { $(#submenu).fadeOut(fast); $(#submenu2).fadeOut(fast); }; function changeSubject() { if($(#assunto).find('option').filter(':selected').text() == Receita) { //$(#msg-cont).toggle(2000, function(){ $(#recipe-cont).toggle (2000); }); $(#msg-cont).slideUp(slow, function(){ $(this).hide(); $(#recipe-cont).slideDown(2000); }); } else { $(#recipe-cont).slideUp(slow, function(){ $(#msg-cont).slideDown(slow); }); } }; $(document).ready(function(){ var nome = ; var pos = ; var html = document.createElement(div); $(html).attr(id, submenu); $(html).css(z-index, 30); $(html).css(position, relative); $(html).css(background-color, #D7);
[jQuery] Re: Cool Sony Horizontal Drop Down menu in JQuery?
Reasonably easy to create with superfish. Columns can be created within an li using divs, animate accordingly Add custom animations to onShow option. pennfoli0 wrote: Hi, Sony.com (http://www.sony.com/index.php) has a very cool horizontal menu, My question is can this be done in unordered list with JQuery? I like the 2 columns menu that expand (it can be seen under "shop" or "electronics") and also would expand to its sub menu. Is there already done solution for this? Thanks!
[jQuery] Re: noob problem with selector and wrapped set - SOLVED
Thanks for the info, Ralph and Keegan. I performed the ugly: jQuery('#' + id.replace(/:/g, '\\:')) But the other suggestions look good too (plus there is nothing to escape - bonus.) Cheers, On Thu, 2009-07-09 at 16:15 -0700, KeeganWatkins wrote: Or you can use the attribute selector for brevity: jQuery([id=' + actual element id + ']) which will return the same element. Hope that helps. On Jul 9, 6:10 pm, KeeganWatkins mkeeganwatk...@gmail.com wrote: Ralph is correct, as jQuery uses the colon as a prefix for selector filters like :hidden and :last. To fix, you can just pass in the raw node like this: jQuery(document.getElementById( actual element ID)) which will return the wrapped set. Cheers. On Jul 8, 3:47 pm, Ralph Whitbeck ralph.whitb...@gmail.com wrote: It's not a problem with Prototype and it being mixed cause you get the same problem if you just isolate it to just a page with jQuery. The problem seems to be an invalid ID name. I was able to get a match when I took :: out of the ID name. Ralph On Wed, Jul 8, 2009 at 12:14 PM, Matt Zagrabelny mzagr...@d.umn.edu wrote: Greetings, I am attempting to use jQuery in a Prototype environment (Request Tracker RT3.8). My ready handler is working, but my first attempt at establishing a wrapped set is not working. Some snippets: jQuery.noConflict(); jQuery(document).ready(function() { set_max_length('Object-RT::Ticket--CustomField-29-Value', 4); } function set_max_length(id, max_length) { alert(There are + jQuery('#' + id).size() + elements in the wrapped set.); } My alert message comes back with 0 (zero) elements in the wrapped set. There is an input element with id = 'Object-RT::Ticket--CustomField-29- Value' in the DOM. Am I missing anything? Thanks for the help, -Matt Zagrabelny -- Matt Zagrabelny - mzagr...@d.umn.edu - (218) 726 8844 University of Minnesota Duluth Information Technology Systems Services PGP key 1024D/84E22DA2 2005-11-07 Fingerprint: 78F9 18B3 EF58 56F5 FC85 C5CA 53E7 887F 84E2 2DA2 He is not a fool who gives up what he cannot keep to gain what he cannot lose. -Jim Elliot signature.asc Description: This is a digitally signed message part
[jQuery] Re: Thick box Parent window
Hi, jazz... I'm not sure how best to fit this into your code, but you could try this: script $(document).ready(function() { $('#redirect').click(function() { TB_remove(); top.location = /myapp/redirect.jsp; }); }); /script a id=redirectwww.google.com/a hth, Rick -Original Message- From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On Behalf Of jazz Sent: Friday, July 10, 2009 8:50 AM To: jQuery (English) Subject: [jQuery] Thick box Parent window Hi Folks I want to close the thick box window and make the parent window to go to a particular url can any body suggest me how to solve this.. a href=/myapp/redirect.jsp onClick=parent.tb_remove() www.google.com/a
[jQuery] Re: Problem with jQuery Validation
Hi Evan: Make sure that you include the path to the jquery.validate.js correctly. Or try it by including it directly from the jquery library. script type=text/javascript src=http://dev.jquery.com/view/trunk/ plugins/validate/jquery.validate.js/script Regards, Nat On Jul 9, 2:38 pm, Ivan Augusto gatodom...@gmail.com wrote: Hello... this is my code: $(#form_atividades).validate({ rules: { ds_atividades: { required: true, minlength: 10 }, 'hr_inicial[0]': { required: true }, 'hr_final[0]': { required: true } }, messages: { ds_atividades: { required: É obrigatório preencher a Descrição da Atividade, minlength: É obrigatório preencher a Descrição da Atividade com pelo menos 10 caracteres }, hr_inicial[0]: { required: É obrigatório preencher o 1º Horário Inicial dos Períodos }, hr_final[0]: { required: É obrigatório preencher o 1º Horário Final dos Períodos } } }); but when I click on the field ds_descricao, it's the following error in Firebug: validator is undefinedhttp://localhost/js/jquery.validate.js Line 287 Somebody heelp! i must solve this problem with urgency! Thks a lot for attention... []s
[jQuery] Re: Generating path
Oh I see! Thank you :)... mkmanning wrote: ul has a previous sibling (the h1); I suspect there's a head tag that's the body's previous sibling. In both cases then, prevAll() would result in a length of 1. Also I assume you meant the second paragraph, which starts with In addition to this the earth. On Jul 9, 12:27 am, Shashank sayhitoshash...@gmail.com wrote: Hello, I have an HTML page where when user clicks on a paragraph I want to find out its path. I have written a jquery script for it: jQuery.fn.extend({ getPath: function( path ) { // The first time this function is called, path won't be defined. if ( typeof path == 'undefined' ) path = ''; if ( this.is('html') ) return '/html' + path; // Add the element name. var cur = this.get(0).nodeName.toLowerCase(); var index = this.prevAll().length; // Recurse up the DOM. return this.parent().getPath( '/' + cur + '[' + index + ']' + path ); } }); On an html page like this body h1 Testing /h1 ul li p Except when the winds rise to a high speed, we seem to live in a very tranquil world./p p In addition to this the earth revolves round the sun at a speed of more than a thousand miles a minute./p /li li p Circling round the earth, in the same way as the earth circles round the sun, is our moon. /p /li /ul /body Clicking on the second paragraph Except when the winds... generates / html/body[1]/ul[1]/li[0]/p[1]. I am not getting why body and ul have index 1. Please help. Sorry for the long mail.
[jQuery] Is there a more efficent way to write this script?
Hi there I am new to jquery tonight and I have already build the below script and everything seems to be working however I suspect there is a better way to write this out? like for instance here $(this).children(h3).children(a).css(text-decoration, underline);$(this).children(a).css(text-decoration, underline); I am changing the css text decoration on A tags within H3 elements and also on child A tags is there not a way to bundle these together? so I would only have to write out the .css(text-decoration, underline); part once? Please advise Here is my full script it uses the 1.3.1 jquery and the color plugin $(.JQorangeHighlight).hover( function() {$(this).children(h3).children(a).css(text- decoration, underline);$(this).children(a).css(text-decoration, underline);$(this).animate({ backgroundColor: orange }, 500); $ (this).children(p).animate({ color: white }, 400) }, function() {$(this).children(h3).children(a).css(text- decoration, none);$(this).children(a).css(text-decoration, none);$(this).animate({ backgroundColor: eggshell }, 500); $ (this).children(p).animate({ color: grey }, 500) });
[jQuery] jquery.ui.autobox
having multiple autoboxes on a page doesn’t seem to work out too well anyone know of a work around for this ? here is a link to the plugin, http://www.bigredswitch.com/blog/2008/12/autobox2/ also posted this same comment on the site thanks Mean Mike
[jQuery] Re: Problem with jQuery Validation
also be sure you don't have two or more elements with the same id or anything like that as that will mess up the validation as well On Jul 10, 9:22 am, Natkeeran L.K. natkee...@gmail.com wrote: Hi Evan: Make sure that you include the path to the jquery.validate.js correctly. Or try it by including it directly from the jquery library. script type=text/javascript src=http://dev.jquery.com/view/trunk/ plugins/validate/jquery.validate.js/script Regards, Nat On Jul 9, 2:38 pm, Ivan Augusto gatodom...@gmail.com wrote: Hello... this is my code: $(#form_atividades).validate({ rules: { ds_atividades: { required: true, minlength: 10 }, 'hr_inicial[0]': { required: true }, 'hr_final[0]': { required: true } }, messages: { ds_atividades: { required: É obrigatório preencher a Descrição da Atividade, minlength: É obrigatório preencher a Descrição da Atividade com pelo menos 10 caracteres }, hr_inicial[0]: { required: É obrigatório preencher o 1º Horário Inicial dos Períodos }, hr_final[0]: { required: É obrigatório preencher o 1º Horário Final dos Períodos } } }); but when I click on the field ds_descricao, it's the following error in Firebug: validator is undefinedhttp://localhost/js/jquery.validate.js Line 287 Somebody heelp! i must solve this problem with urgency! Thks a lot for attention... []s
[jQuery] Using variables or jquery selectors when chaining?
Hi, is it better to do this (regarding performance not readability): $('a.updateCartButton').click(function() { $('form[name=updateCartForm]').attr('action', $(this).attr('href')+'#'+ $('img[id^=iconUpdateArticle]').attr('id')).submit(); return false; }); or this: $('a.updateCartButton').click(function() { var actionHref = $(this).attr('href'); var buttonId = $('img[id^=iconUpdateArticle]').attr('id'); $('form[name=updateCartForm]').attr('action', actionHref + '#' +buttonId).submit(); return false; }); Maybe someone could also explain to me how I can write a test case for this in jQuery Tester? Then I don't have to ask questions like this in the future... ;) Thanks!
[jQuery] Re: remove and opera 9.6.4
no one has come across this then? Liam Potter wrote: Having a strange bug in opera 9.6.4. When removing objects from the dom, opera leaves a ghost image of the removed object, till you scroll away. .hide() works fine, so tried hiding before removing, but the ghost is still there, tried running the remove in the hide callback, no luck, tried hiding with .css and still no luck. Has anyone come across this bug and found a workaround? - Liam
[jQuery] Re: Is there a more efficent way to write this script?
you should be able to include all those elements in a single set, and then apply the styles once. for example: $(this).find(a).css(text-decoration , underline); Note that this will grab ALL the descendant links inside the .JQorangeHighlight element. On Jul 10, 8:33 am, Jacques Choquette - WhistlerGraphicDesign.com j...@whistlergraphicdesign.com wrote: Hi there I am new to jquery tonight and I have already build the below script and everything seems to be working however I suspect there is a better way to write this out? like for instance here $(this).children(h3).children(a).css(text-decoration, underline);$(this).children(a).css(text-decoration, underline); I am changing the css text decoration on A tags within H3 elements and also on child A tags is there not a way to bundle these together? so I would only have to write out the .css(text-decoration, underline); part once? Please advise Here is my full script it uses the 1.3.1 jquery and the color plugin $(.JQorangeHighlight).hover( function() {$(this).children(h3).children(a).css(text- decoration, underline);$(this).children(a).css(text-decoration, underline);$(this).animate({ backgroundColor: orange }, 500); $ (this).children(p).animate({ color: white }, 400) }, function() {$(this).children(h3).children(a).css(text- decoration, none);$(this).children(a).css(text-decoration, none);$(this).animate({ backgroundColor: eggshell }, 500); $ (this).children(p).animate({ color: grey }, 500) });
[jQuery] Function now working in safari
Can somebody see if if I am doing something wrong here? here is my html div class=box JQorangeHighlight JQEqualHeightsA h3a href=#Volunteer Opportunities/a/h3 pBecome a Games Time Information Host and welcome the world home to Whistler./p /div and here is a function that I run once the document is loaded $(.JQorangeHighlight).hover( function() {$(this).animate({ backgroundColor: orange }, 500) }, function() {$(this).animate({ backgroundColor: eggshell }, 500) }); This does now work in safari works in firefox and IE but no safari - however I can get the Jquery color plugin to work ins safari with the following code $(.JQorangeHighlight).hover( function() {$(this).children(p).animate({ color: orange }, 400) }, function() {$(this).children(p).animate({ color: grey }, 500) });
[jQuery] Re: Is there a more efficent way to write this script?
$( 'h3 a, a', $(this) ).css('text-decoration', 'underline'); Maurício -Mensagem Original- De: Jacques Choquette - WhistlerGraphicDesign.com Para: jQuery (English) Enviada em: sexta-feira, 10 de julho de 2009 10:33 Assunto: [jQuery] Is there a more efficent way to write this script? $(this).children(h3).children(a).css(text-decoration, underline);$(this).children(a).css(text-decoration, underline); I am changing the css text decoration on A tags within H3 elements and also on child A tags is there not a way to bundle these together? so I would only have to write out the .css(text-decoration, underline); part once?
[jQuery] Re: Scroll Event on iframe in IE
Bump On Jul 9, 9:59 am, erik.madsen erik.mad...@gmail.com wrote: My event listener for iframe scrolling works fine for FF and Safari but doesn't work for IE7 at all. $($('#myIframeId').contents()).scroll(onFrameScroll); Does anyone have any experience getting this to work?
[jQuery] Re: DIV Fade In/Out Not Working! URGENT AND ANNOYING
Everything seems fine here, #me fades in and out perfectly. In IE you have this #nojs blocking the whole screen (guess you're missing a $ ('#nojs').hide() in your script) but taking it away the fade on #me works right. cheers -- ricardo ps: love urgent and annoying messages On Jul 10, 7:17 am, Mat matthew_hil...@hotmail.com wrote: I have used this techniques on many other sites before, but for this particular one, it's not working. I have no idea, its probably something simple, but it remains a mystery and a huge annoyance to me. You can see the problem athttp://www.matthewhill.name/micro/ or Here is the non-working code (in simple): XHTML (index.html): !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 titleTitle/title link href=style.css rel=stylesheet type=text/css media=screen / /head body a id=open_infoExtra information/a div id=info class=modalbox div id=info_inner Extra information... div id=closea id=close_infoimg src=close.png alt=Close this dialogue box width=66 height=22 border=0 //a/div /div /div script type=text/javascript src=global.js/script /body /html CSS (style.css): .modalbox{ width:100%; height:100%; top:0px; left:0px; position:absolute; background:url(modal_bg.png); display:none; z-index:998} #info_inner{ width:500px; padding:15px; margin:200px auto 0px auto; background-color:#FFF; overflow:hidden; z-index:999} #open_info{ cursor:pointer} #close{ width:100%; padding-top:8px; margin-top:5px; border-top:#CCC 1px solid} #close img{ float:right; cursor:pointer } JAVASCRIPT (global.js): $(document).ready(function(){$('#open_info').click(function(){$ ('#info').fadeIn('500')});$('#close_info').click(function(){$ ('#info').fadeOut('500')})}); Thanks in advance, Mat.
[jQuery] getJson failing silently
I have a problem with the getJson callback in jquery. Here's the scneario. The user enters a query online and hits 'execute'. At this point make a call to a java servlet that returns the results of the query. The results include one row contiaing the column names which is followed by multiple rows of data. The results are formatted and returned as a Json to the javascript. The problem is I am not able to see any alerts put within the $getJson callback function. I think it is failing silently, but I'm not able to figure out why. Please help! Here's the sample data returned: {results:{ columnNames:[ productCode, productName, productLine, productScale, productVendor, productDescription, quantityInStock, buyPrice, MSRP], values:[ [S10_1678, 1969 Harley Davidson Ultimate Chopper, Motorcycles, 1:10, Min Lin Diecast, This replica features working kickstand, front suspension, gear- shift lever, footbrake lever, drive chain, wheels and steering. All parts are particularly delicate due to their precise scale and require special care and attention., 7933, 48.81, 95.7], [S10_1949, 1952 Alpine Renault 1300, Classic Cars, 1:10, Classic Metal Creations, Turnable front wheels; steering function; detailed interior; detailed engine; opening hood; opening trunk; opening doors; and detailed chassis., 7305, 98.58, 214.3], [S10_2016, 1996 Moto Guzzi 1100i, Motorcycles, 1:10, Highway 66 Mini Classics, Official Moto Guzzi logos and insignias, saddle bags located on side of motorcycle, detailed engine, working steering, working suspension, two leather seats, luggage rack, dual exhaust pipes, small saddle bag located on handle bars, two-tone paint with chrome accents, superior die-cast detail , rotating wheels , working kick stand, diecast metal with plastic parts and baked enamel finish., 6625, 68.99, 118.94], [S10_4698, 2003 Harley-Davidson Eagle Drag Bike, Motorcycles, 1:10, Red Start Diecast, Model features, official Harley Davidson logos and insignias, detachable rear wheelie bar, heavy diecast metal with resin parts, authentic multi-color tampo-printed graphics, separate engine drive belts, free-turning front fork, rotating tires and rear racing slick, certificate of authenticity, detailed engine, display stand, precision diecast replica, baked enamel finish, 1:10 scale model, removable fender, seat and tank cover piece for displaying the superior detail of the v-twin engine, 5582, 91.02, 193.66], [S10_4757, 1972 Alfa Romeo GTA, Classic Cars, 1:10, Motor City Art Classics, Features include: Turnable front wheels; steering function; detailed interior; detailed engine; opening hood; opening trunk; opening doors; and detailed chassis., 3252, 85.68, 136] ] } } Since I am new to JSON, I thought it might be a problem with the formatting. So, I validated the above at www.jsonlint.com and it came out as a valid json. Here's the callback var queryText = $('#query_text').val(); if (!(queryText == null)) { $.getJSON(qtool, {action : executeQuery, entity_name : queryText }, function (data) { alert(test3); } ); } Thanks in advance!!
[jQuery] Re: getJson failing silently
Don't use the $.getJSON method as it, as you are finding out, has no way to handle an error... use the generic $.ajax instead var Params = {}; Params.type = GET; Params.url = qtool; Params.processData = true; Params.data = {action: executeQuery, entity_name: queryText }; Params.dataType = json; Params.success = function(data) { alert(data); }; Params.error = function(x,y,z) { alert(x.responseText); }; $.ajax(Params); that way x will be the error response from the server (which apparently you are running into)
[jQuery] Re: getJson failing silently
Also i forgot to add: Use Firebug!! it's a HUGE help to help debug AJAX issues
[jQuery] Re: noob problem with selector and wrapped set - SOLVED
you know, since you mentioned having to work with Prototype as well, I'll assume that you are working with JSF/RichFaces or some other templating environment which is generating those ID's with the : in them. I was in a similar spot recently, and wrote a selector filter to make working with those ID's easier: jQuery.expr[:].id = function(element, index, matches) { return element.id === matches[3]; } you are welcome to copy this if you like, you can use it for your problem like so: jQuery(:id( + actual element id + )) On Jul 10, 7:55 am, Matt Zagrabelny mzagr...@d.umn.edu wrote: Thanks for the info, Ralph and Keegan. I performed the ugly: jQuery('#' + id.replace(/:/g, '\\:')) But the other suggestions look good too (plus there is nothing to escape - bonus.) Cheers, On Thu, 2009-07-09 at 16:15 -0700, KeeganWatkins wrote: Or you can use the attribute selector for brevity: jQuery([id=' + actual element id + ']) which will return the same element. Hope that helps. On Jul 9, 6:10 pm, KeeganWatkins mkeeganwatk...@gmail.com wrote: Ralph is correct, as jQuery uses the colon as a prefix for selector filters like :hidden and :last. To fix, you can just pass in the raw node like this: jQuery(document.getElementById( actual element ID)) which will return the wrapped set. Cheers. On Jul 8, 3:47 pm, Ralph Whitbeck ralph.whitb...@gmail.com wrote: It's not a problem with Prototype and it being mixed cause you get the same problem if you just isolate it to just a page with jQuery. The problem seems to be an invalid ID name. I was able to get a match when I took :: out of the ID name. Ralph On Wed, Jul 8, 2009 at 12:14 PM, Matt Zagrabelny mzagr...@d.umn.edu wrote: Greetings, I am attempting to use jQuery in a Prototype environment (Request Tracker RT3.8). My ready handler is working, but my first attempt at establishing a wrapped set is not working. Some snippets: jQuery.noConflict(); jQuery(document).ready(function() { set_max_length('Object-RT::Ticket--CustomField-29-Value', 4); } function set_max_length(id, max_length) { alert(There are + jQuery('#' + id).size() + elements in the wrapped set.); } My alert message comes back with 0 (zero) elements in the wrapped set. There is an input element with id = 'Object-RT::Ticket--CustomField-29- Value' in the DOM. Am I missing anything? Thanks for the help, -Matt Zagrabelny -- Matt Zagrabelny - mzagr...@d.umn.edu - (218) 726 8844 University of Minnesota Duluth Information Technology Systems Services PGP key 1024D/84E22DA2 2005-11-07 Fingerprint: 78F9 18B3 EF58 56F5 FC85 C5CA 53E7 887F 84E2 2DA2 He is not a fool who gives up what he cannot keep to gain what he cannot lose. -Jim Elliot signature.asc 1KViewDownload
[jQuery] Re: getJson failing silently
That JSON looks fine in JSON Viewer as well (awesome tool if you are on a windows machine: http://www.codeplex.com/JsonViewer) I'd guess that the content type isn't what jQuery is expecting Firebug could/would tell you that text/plain or application/json is what would be best (and should work!)
[jQuery] Re: getJson failing silently
yes, I'm using firebug and it's really helpful. That's where I got the sample JSON data (that I gave in my message) from. The response header shows '200 OK' even when the ajax fails. And I see the json data returned in the response. On Jul 10, 11:18 am, MorningZ morni...@gmail.com wrote: Also i forgot to add: Use Firebug!! it's a HUGE help to help debug AJAX issues
[jQuery] Re: Access li by item in the array
Sorry again if I was offensive. Trying to be ironical in a foreing language frequently leads to this, I should've known better. I'm glad we sorted it out, except for the soccer thing ;) About having no idea on the scope of your project, that's what I was trying to ask you. It's easier to help or offer advice knowing the whole context, objectives and all, than looking at separate pieces. cheers -- ricardo On Jul 9, 6:51 pm, expresso dschin...@gmail.com wrote: It's too bad we didn't kick your ass in soccer the past couple weeks ago. Now I wish we really had! Brazil is overrated in soccer. On Jul 9, 4:40 pm, expresso dschin...@gmail.com wrote: This is exactly the kind of shit I'm talking about and I am cocky? unreal. On Jul 9, 4:37 pm, expresso dschin...@gmail.com wrote: Has nothing to do with me not being good enough and you have no idea on the scope of my project. I can't believe you actually replied like that and honestly coming here to tell me you're serious. But to state something like that and to butt in like this is unbelievable. Do you do this to people at work? They'd probably kick your ass for saying something like that. On Jul 9, 4:27 pm, Ricardo ricardob...@gmail.com wrote: It's not meant to be derogatory, no. I've said that many times, it's a fact isn't it? Sorry if it came out as rude. I could name dozens of better programmers than I am, and I'm not pissed off by that! On Jul 9, 6:06 pm, expresso dschin...@gmail.com wrote: Or just save your sleep time and hire someone with more experience to do this for you :] can I ask you if that was a derogatory statement? Seems like it to me. On Jul 9, 3:34 pm, Ricardo ricardob...@gmail.com wrote: expresso (we don't know your name), if you're still in need of help, why not post an overview of what you need? You've posted several pieces of your puzzle but no one can guess the overall structure you're trying to code. Like I need a carousel that expands when blablabla and loads blablabla from json. And I'm pretty sure you have an architectural problem there, the specific issues that pop up are just a consequence of a lack of planning. Or just save your sleep time and hire someone with more experience to do this for you :] And, please, try to keep discussions decently worded, and avoid posting in sequence, specially if it's just pointless fighting, this is a public forum. Thanks! On Jul 9, 4:45 pm, expresso dschin...@gmail.com wrote: I understand. I have nothing that much against you Morning and I'll try to sound less abrasive in the future. Keep in mind I have been up till about 12:30am for about 4 nights straight on this so I am definitely trying all I could on customizing it and could not afford to just step back and say forget this plug-in because I had gotten much to far into it for our solution. I am not one to just post and get freebies. Trust me, that's lame. On Jul 9, 2:42 pm, MorningZ morni...@gmail.com wrote: It's been perfectly clear that whatever you are trying to accomplish is anything *but* simple... and after two weeks of messing with it, maybe it is/was time to cut your losses on trying to manipulate code with which you have no idea what is going on under the hood. and code that someone wrote for free, supported for free, and has since moved on.. the tablesorter plugin is the same way... it's an older plugin that still works today, but people customizing it are on their own... whatever... i've done my best to help and point out issues to this point best of luck... looks like you'll need it . On Jul 9, 3:33 pm, expresso dschin...@gmail.com wrote: Funny thing is, I'll be blogging about this carousel. And you may find my implementation to be pretty complex but you would not know about the entire implementation and you assume that what we are doing is simple On Jul 9, 2:03 pm, expresso dschin...@gmail.com wrote: making it difficult to understand what you are asking tell me how it's difficult, I am very thorough in explaining the situation and things tried. On Jul 9, 1:57 pm, expresso dschin...@gmail.com wrote: You've got it backwards it makes more sense and keeps the clutter out if you stay in the same topic. I did not say not to stay on the same topic. I said if I start veering off into anther discussion that's talking about a different approach (in
[jQuery] Re: mcDropdown jQuery Plug-in v1.2.07
Darren: One thing to keep in mind is this plug-in was designed to be a new form UI control that allows the users to type in their choices. Thus, the default behavior when clicking in the box puts the focus in the text box so you can begin typing. However, you could accomplish what you want by: * Using a div element instead of an input / element. This will make the dropdown readonly w/no keyboard support. * Attaching a click handler to the layer with the mcdropdown class Example: div id=mcdropdown/div script type=text/javascript // create the drop down $(#mcdropdown).mcDropdown(#menu); // attach a click handler to the div class=mcdropdown element $(#mcdropdown).parent().click(function(){ // when the element is clicked on, open the menu $(#mcdropdown).mcDropdown().openMenu(); }); /script I haven't tested this extensively, but it should work. -Dan On Fri, Jul 10, 2009 at 6:17 AM, takuhii taku...@googlemail.com wrote: I am using this FANTASTIC drop down plugin for jQuery, but wondered how I can customise it so that rather than hit the button ont he right, I can click the whole active area to get the dropdown to appear. I currently have the menu attached to a single line text box and would like it to open up when ever I click in the text box, or on the dropdown arrow? Also, how can I specify some default text in the text box that is acting as my dropdown launchpad? Regards Darren
[jQuery] Re: Display subnav through external action
It'll be difficult, given the design, to include the image as a part of the navigational list. In case you have any ideas, here's a breakdown of how I'd like it to work. div class=thumbnaila href=http://skitch.com/rexoom/ba8r8/ginger- nin-nav-breakdownimg src=http://img.skitch.com/20090710- mr6sp4d5r2a6ief2u59anwdmpy.preview.jpg alt=ginger-nin-nav- breakdown //abr /span style=font-family: Lucida Grande, Trebuchet, sans-serif, Helvetica, Arial; font-size: 10px; color: #808080Uploaded with a href=http://plasq.com/;plasq/a's a href=http://skitch.com;Skitch/a!/span/div On Jul 9, 11:15 am, Charlie charlie...@gmail.com wrote: not sure what to look at. Can put an image in li and class it to have different display css than other li's. Menu items need to stay in li for script also options like onBeForeShow can be helpful to script for different parts of menu. There's likely a solution that will work in list structure, can you be more specific about what you are trying to accomplish greggo wrote:I have a navigational element that is distinct from the rest of my navigation and is a graphical icon. Therefore, I'm not using the standard li elements to display it. I'm simply using an img tag. The li tag for that nav element is not being displayed. I do however want the subnav to display when you mouse over the image. You can view it here:www.gingerninjas.comQuestion: How would I activate the display of the subnav (and hide the current subnav) using an object outside of the navigational list? I know I need to somehow trigger superfish with a mouseover event, but I'm not sure how to do that. Any help on this would be appreciated.
[jQuery] Re: getJson failing silently
Instead of repeating the object name over and over again, you can simplify the code with an object literal: $.ajax({ type: 'GET', url: 'qtool', processData: true, data: { action: 'executeQuery', entity_name: queryText }, dataType: 'json', success: function(data) { alert( data ); }, error: function( xhr, status, exception ) { alert( xhr.responseText ); } }); If you need the object in its own variable for any reason, you can still use the object literal: var params = { type: 'GET', url: 'qtool', processData: true, data: { action: 'executeQuery', entity_name: queryText }, dataType: 'json', success: function( data ) { alert( data ); }, error: function( xhr, status, exception ) { alert( xhr.responseText ); } }; $.ajax( params ); -Mike From: MorningZ Don't use the $.getJSON method as it, as you are finding out, has no way to handle an error... use the generic $.ajax instead var Params = {}; Params.type = GET; Params.url = qtool; Params.processData = true; Params.data = {action: executeQuery, entity_name: queryText }; Params.dataType = json; Params.success = function(data) { alert(data); }; Params.error = function(x,y,z) { alert(x.responseText); }; $.ajax(Params); that way x will be the error response from the server (which apparently you are running into)
[jQuery] Re: jQuery in an eBay auction template? Is it possible?
Hi, I tried with several combinations of javascript and it seems like (including src, replace method, cookie etc) are not allowed in item description. One thing I can definitely try to do for you is that - if you can give me the item description and tell me what is the effect you want to introduce in there, I can try to do that without using jquery. Thanks, Raj On Tue, Jul 7, 2009 at 6:52 PM, eepeterson eepeter...@gmail.com wrote: I threw together the most basic sample here: http://erikpeterson.brinkster.net/ebay/template/test.html Basically the file is just jQuery and a very basic script but eBay isn't allowing it (I'm not loading it through src). Any thoughts? Thanks! On Jun 23, 5:57 pm, Raj rajb...@gmail.com wrote: Hi, eBaydoes say this as a rule. If you referencejquerythrough src in script, then it may fall under this category. HTML or JavaScript that automatically calls remote scripts and pages (such as JavaScript includes or iframes) However, there is nothing that stops you from pasting the content fromjquery.js to your page. I work foreBayand if its okay with you - please send me your content, I can check if there is anything else in there that makes it come back with this error message. Thanks, Raj rajb...@gmail.com On Jun 23, 4:13 pm, eepeterson eepeter...@gmail.com wrote: That's not the message I saw. Also you can definitely use some forms of javascript oneBay. See this: http://pages.ebay.com/help/policies/listing-javascript.html So I guess what I'm really asking is if it is possible to modify or use part of thejQueryscript to meeteBay'sterms on javascript. Thanks! On Jun 23, 5:23 am, Ricardo ricardob...@gmail.com wrote: The error message says it all: for security reasons, your listing *cannot* contain javascript. On Jun 22, 1:01 pm, eepeterson eepeter...@gmail.com wrote: Ok, let me start by saying I'm not a great programmer. I can do well with HTML CSS but don't know a ton about js jQuery. Anyway, I'd like to include somejQueryin the form of a gallery of images in myeBayauction. However the problem I run into is that when I paste the completed code into theeBayI get a message that says Your listing cannot contain javascript(.cookie, cookie(, replace (, IFRAME, META, or includes), cookies or base href. So I revised the code to include no hrefs to the js and pasted it all in the header instead. I still get the same error. I took a closer look at the code and of course the instances of the replace() method and so on. I would like to figure a way around this so I could usejQueryoneBay. Has anyone had any luck usingjQueryin aneBayauction? Any help you might have would be great. Thanks in advance.
[jQuery] Re: save ajax query to global variable
BaBna is correct, the alert is firing before the response has come back, try adding the alert inside the callback. however, i would not recommend removing the var keyword. as it is now, you have: script type=text/javascript var tb1=[]; $(document).ready(function() { // code here }); /script because tb1 is being defined outside of any other functions, it is already globally scoped. removing the var keyword isn't going to change the scope (as its already where it should be if you need global access). if you ever need to force a variable to be globally scoped, NEVER omit the var keyword, as it can lead to some very difficult-to- spot bugs. anytime you need to expose a variable globally you should simply attach it to the window object (which is where the global scope lives when Javascript runs in the browser). DON'T DO THIS!!! : script type=text/javascript myGlobalVar = foo; // var keyword omitted, leads to dirty and hard-to-follow code /script INSTEAD, ATTACH AS PROPERTY OF WINDOW : script type=text/javascript window.myGlobalVar = foo; // does the same thing as the example above, but makes it easy for you and others to see that the variable is globally scoped. /script On Jul 9, 12:41 pm, BaBna thomas.na...@gmail.com wrote: As it seems you want your tb1 global, remove the var for declaring it. Also, your alert(tb1) is likely to be executed before tb1 is defined. You need to put your alert in the callback function if you want to be sure it works. On Jul 9, 2:47 pm, Vaidotas Zemlys zem...@gmail.com wrote: Hi, When trying out jquery, I ran into seemingly very simple problem. I did a search on internet and did not get any satisfactory result. I am suspecting that the mistake is very simple, so anyone more experienced can help me. What I am trying to do is load data from server, then present it in the table, and plot it later. Since I am intending to use flot plugin, and it accepts arrays as an argument, I thought that I load the file, save it to some array, and then plot it when time comes (when user presses something, etc.) So my javascript code goes like this: script type=text/javascript src=js/jquery-1.3.2.js/ script script type=text/ javascript var tb1=[]; $(document).ready(function() { $.post(data/echocsv.php, function(text) { tb1=text.split(\n); }) alert(tb1); }); /script echocsv.php is very simple, it just grabs csv file (text file) and returns it: ? $ff=file_get_contents(data.csv); echo $ff; ? Yet when I run this script, nothing happens. If I move the alert into callback function, then everything is alright. I understand that it is possible that ajax query is not performed before the alert. But I did not find out how to know when the query is succesfull. From examples in the web I saw, that .ajax call is more frequently used, maybe I should use it also? Thanks for any help, Vaidotas
[jQuery] Re: img src attribute after append(), html()...
oops, not href attribute, as its an image. still holds true though. On Jul 10, 1:00 pm, KeeganWatkins mkeeganwatk...@gmail.com wrote: jQuery isn't actually changing your href attribute, the browser is... when you use relative paths in links (and some other elements as well) the browser automatically appends the domain. if you need something else, either change your relative paths to mirror something that works for you, or simply use absolute paths. On Jul 8, 12:15 pm, Ralph Whitbeck ralph.whitb...@gmail.com wrote: Is this in IE? On Wed, Jul 8, 2009 at 12:41 PM, rinse_my_phonebook hugo.lee...@gmail.comwrote: When I call $('#mydiv').append('pimg src=a/b/image.jpg //p'); I get div id=mydiv pimg src=http://localhost:53072/pathtocurrentpage/a/b/ image.jpg http://localhost:53072/pathtocurrentpage/a/b/%0Aimage.jpg / /p /div Which is not what I want. Can anyone tell me why I get this or even how I can stop jquery from changing my src attribute? Thanks in advance.
[jQuery] Re: malsup's jcorners script leaves artifacts in Safari/Chrome
Never mind. I managed to find the solution: Changed $(function(){ to $(window).load(function(){ added to css of parent styles background: inherit;
[jQuery] Re: img src attribute after append(), html()...
try it like this $('#mydiv').append('pimg src=\a/b/image.jpg\ //p'); On Jul 8, 12:41 pm, rinse_my_phonebook hugo.lee...@gmail.com wrote: When I call $('#mydiv').append('pimg src=a/b/image.jpg //p'); I get div id=mydiv pimg src=http://localhost:53072/pathtocurrentpage/a/b/ image.jpg / /p /div Which is not what I want. Can anyone tell me why I get this or even how I can stop jquery from changing my src attribute? Thanks in advance.
[jQuery] Re: img src attribute after append(), html()...
jQuery isn't actually changing your href attribute, the browser is... when you use relative paths in links (and some other elements as well) the browser automatically appends the domain. if you need something else, either change your relative paths to mirror something that works for you, or simply use absolute paths. On Jul 8, 12:15 pm, Ralph Whitbeck ralph.whitb...@gmail.com wrote: Is this in IE? On Wed, Jul 8, 2009 at 12:41 PM, rinse_my_phonebook hugo.lee...@gmail.comwrote: When I call $('#mydiv').append('pimg src=a/b/image.jpg //p'); I get div id=mydiv pimg src=http://localhost:53072/pathtocurrentpage/a/b/ image.jpg http://localhost:53072/pathtocurrentpage/a/b/%0Aimage.jpg / /p /div Which is not what I want. Can anyone tell me why I get this or even how I can stop jquery from changing my src attribute? Thanks in advance.
[jQuery] Re: Can I catch the property of CSS filter?
you'll need to use a regular expression to get what it is that you are looking for... something like this might work: pre // get the full string var filterString = $('img').css('filter'); // get the src='aa.png') piece var filterSource = filterString.replace (progid:DXImageTransform.Microsoft.AlphaImageLoader(, ); // remove the trailing ) character filterSource = filterSource.replace(), ) /pre note that this is a quick and dirty approach. in production, you'd want to write a matching regexp sequence or something a little more sophisticated. but hopefully this will get you started. cheers. On Jul 8, 3:33 am, David .Wu chan1...@gmail.com wrote: the image is like img style=filter:progid:DXImageTransform.Microsoft.AlphaImageLoader (src='aa.png') ... $('img').css('filter') will get progid:DXImageTransform.Microsoft.AlphaImageLoader(src='aa.png') Can I get the aa.png directly?
[jQuery] Re: jQuery in an eBay auction template? Is it possible?
The original error message told exactly what the problem is with jQuery (albeit as part of a poorly worded laundry list): Your listing cannot contain javascript(.cookie, cookie(, replace(, IFRAME, META, or includes), cookies or base href If you search the jQuery source for those strings, you'll soon find (if you didn't already guess) that it uses a multitude of string.replace() calls. So you're right, the best bet would be to find a way to do what you want without jQuery. -Mike _ From: Rajkumar Chandrasekaran Hi, I tried with several combinations of javascript and it seems like (including src, replace method, cookie etc) are not allowed in item description. One thing I can definitely try to do for you is that - if you can give me the item description and tell me what is the effect you want to introduce in there, I can try to do that without using jquery. Thanks, Raj On Tue, Jul 7, 2009 at 6:52 PM, eepeterson eepeter...@gmail.com wrote: I threw together the most basic sample here: http://erikpeterson.brinkster.net/ebay/template/test.html Basically the file is just jQuery and a very basic script but eBay isn't allowing it (I'm not loading it through src). Any thoughts? Thanks! On Jun 23, 5:57 pm, Raj rajb...@gmail.com wrote: Hi, eBaydoes say this as a rule. If you referencejquerythrough src in script, then it may fall under this category. HTML or JavaScript that automatically calls remote scripts and pages (such as JavaScript includes or iframes) However, there is nothing that stops you from pasting the content fromjquery.js to your page. I work foreBayand if its okay with you - please send me your content, I can check if there is anything else in there that makes it come back with this error message. Thanks, Raj rajb...@gmail.com On Jun 23, 4:13 pm, eepeterson eepeter...@gmail.com wrote: That's not the message I saw. Also you can definitely use some forms of javascript oneBay. See this:http://pages.ebay.com/help/policies/listing-javascript.html So I guess what I'm really asking is if it is possible to modify or use part of thejQueryscript to meeteBay'sterms on javascript. Thanks! On Jun 23, 5:23 am, Ricardo ricardob...@gmail.com wrote: The error message says it all: for security reasons, your listing *cannot* contain javascript. On Jun 22, 1:01 pm, eepeterson eepeter...@gmail.com wrote: Ok, let me start by saying I'm not a great programmer. I can do well with HTML CSS but don't know a ton about js jQuery. Anyway, I'd like to include somejQueryin the form of a gallery of images in myeBayauction. However the problem I run into is that when I paste the completed code into theeBayI get a message that says Your listing cannot contain javascript(.cookie, cookie(, replace (, IFRAME, META, or includes), cookies or base href. So I revised the code to include no hrefs to the js and pasted it all in the header instead. I still get the same error. I took a closer look at the code and of course the instances of the replace() method and so on. I would like to figure a way around this so I could usejQueryoneBay. Has anyone had any luck usingjQueryin aneBayauction? Any help you might have would be great. Thanks in advance.
[jQuery] Re: Display subnav through external action
That didn't work to well. This link takes you to what I'm referring to: http://skitch.com/rexoom/ba8r8/ginger-nin-nav-breakdown On Jul 10, 1:00 pm, greggo gosof...@gmail.com wrote: It'll be difficult, given the design, to include the image as a part of the navigational list. In case you have any ideas, here's a breakdown of how I'd like it to work. div class=thumbnaila href=http://skitch.com/rexoom/ba8r8/ginger- nin-nav-breakdownimg src=http://img.skitch.com/20090710- mr6sp4d5r2a6ief2u59anwdmpy.preview.jpg alt=ginger-nin-nav- breakdown //abr /span style=font-family: Lucida Grande, Trebuchet, sans-serif, Helvetica, Arial; font-size: 10px; color: #808080Uploaded with a href=http://plasq.com/;plasq/a's a href=http://skitch.com;Skitch/a!/span/div On Jul 9, 11:15 am, Charlie charlie...@gmail.com wrote: not sure what to look at. Can put an image in li and class it to have different display css than other li's. Menu items need to stay in li for script also options like onBeForeShow can be helpful to script for different parts of menu. There's likely a solution that will work in list structure, can you be more specific about what you are trying to accomplish greggo wrote:I have a navigational element that is distinct from the rest of my navigation and is a graphical icon. Therefore, I'm not using the standard li elements to display it. I'm simply using an img tag. The li tag for that nav element is not being displayed. I do however want the subnav to display when you mouse over the image. You can view it here:www.gingerninjas.comQuestion:How would I activate the display of the subnav (and hide the current subnav) using an object outside of the navigational list? I know I need to somehow trigger superfish with a mouseover event, but I'm not sure how to do that. Any help on this would be appreciated.
[jQuery] Re: Is there a more efficent way to write this script?
Nice. If you need to duplicate exactly the behavior of the .children('h3') in the original code, add another to the selector. Also you can leave out the inner $() call: $( ' h3 a, a', this ).css('text-decoration', 'underline'); Alternatively, write it like this: $(this).find(' h3 a, a').css('text-decoration', 'underline'); I think that's a little easier to follow, and it's a tiny bit faster too. When you use the $(selector,context) notation, jQuery converts it to $(context).find(selector) for you. (See lines 75-78 of the uncompressed jQuery.js 1.3.2.) -Mike _ From: Mauricio (Maujor) Samy Silva $( 'h3 a, a', $(this) ).css('text-decoration', 'underline'); Maurício -Mensagem Original- De: Jacques Choquette - mailto:j...@whistlergraphicdesign.com WhistlerGraphicDesign.com $(this).children(h3).children(a).css(text-decoration, underline);$(this).children(a).css(text-decoration, underline); I am changing the css text decoration on A tags within H3 elements and also on child A tags is there not a way to bundle these together? so I would only have to write out the .css(text-decoration, underline); part once?
[jQuery] validating on blur without submit
I could very well be totally missing this, but is there a way to make the fields invalid by default? I would like the fields form fields to validate on blur even if no data is entered. For example, a name field that the user focuses on then blurs, but doesn't enter a character would validate.
[jQuery] Superfish parent menu
Anyone have an answer for a noob? I am using Superfish on a Joomla web template. Looks good--but---how do I disable the ability to click on a parent item as the menu expands?
[jQuery] Superfish and Mediabox
I would dearly like to get Superfish (http://users.tpg.com.au/j_birch/ plugins/superfish/#getting-started) and Mediabox (http://iaian7.com/ webcode/Mediabox) to work on the same page. Has anyone an idea of why mediabox stops working and how to fix it. I am a total newb so please help! Thanks in advance
[jQuery] Question: Form focus to prevent fadeOut?
Apologies if this is read by a common moderator between here and jQuery-UI, I was in the wrong tab, haha. Anyway, I'm having a little trouble coming up with a concise way to do this. I've created a div containing a registration form that fades in when the user hovers over a triggering link, and the code I'm currently using is as follows: $(document).ready(function() { var hide = false; $(.reg1, .register).hover(function(){ if (hide) clearTimeout(hide); $(.login, .about).fadeOut(40); $(.register).fadeIn(); }, function() { hide = setTimeout(function() {$(.register).fadeOut();}, 400); }); }); At the moment I've been able to prevent the .register class from fading while the mouse is over it by adding also as the trigger for the initial fade, but what I'd like is for the class to remain visible if a form input has focus for obvious accessibility reasons. Any ideas?
[jQuery] .wrap when targeting a frame generates an error in IE
The following function fails when running on IE 6 or IE 7, works fine on FF curContext = $('#mPreviewFrame')[0].contentWindow.document; $('#mydiv',curContext).wrap('div id=myNewOuterDiv/div'); To isolate the problem I changed the 'curContext' to a div on the current page and tested, and that works fine in IE, so it appears to be specifically releated to using a frame as the context. Does anyone know another way this could be written to achieve the same result? Is this a bug? Thanks!!
[jQuery] Re: DIV Fade In/Out Not Working! URGENT AND ANNOYING
hmm i tried your script and it works...altered it with a bind() an it worked too no idea sorry !DOCTYPE html PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN http:// www.w3.org/TR/html4/loose.dtd html head meta http-equiv=Content-Type content=text/html; charset=UTF-8 titleInsert title here/title style .modalbox{ width:100%; height:100%; top:0px; left:0px; position:absolute; background:#ededed url(modal_bg.png); display:none; z-index:998 } #info_inner{ width:500px; padding:15px; margin:200px auto 0px auto; background-color:#FFF; overflow:hidden; z-index:999 } #open_info{ cursor:pointer } #close{ width:100%; padding-top:8px; margin-top:5px; border-top:#CCC 1px solid } #close img{ float:right; cursor:pointer } /style /head body a id=open_infoExtra information/a div id=info class=modalbox div id=info_inner Extra information... div id=closea id=close_infoimg src=close.png alt=Close this dialogue box width=66 height=22 border=0 //a/div /div /div script src=http://code.jquery.com/jquery-latest.pack.js; type=text/ javascript /script script type=text/javascript $(document).ready(function(){ $('#open_info').bind('click',function(){ $('#info').fadeIn('500') }); $('#close_info').bind('click',function(){ $('#info').fadeOut('500') }); }); /script /body /html On Jul 10, 12:17�pm, Mat matthew_hil...@hotmail.com wrote: I have used this techniques on many other sites before, but for this particular one, it's not working. I have no idea, its probably something simple, but it remains a mystery and a huge annoyance to me. You can see the problem athttp://www.matthewhill.name/micro/ or Here is the non-working code (in simple): XHTML (index.html): !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 titleTitle/title link href=style.css rel=stylesheet type=text/css media=screen / /head body a id=open_infoExtra information/a div id=info class=modalbox � div id=info_inner � � Extra information... � � div id=closea id=close_infoimg src=close.png alt=Close this dialogue box width=66 height=22 border=0 //a/div � /div /div script type=text/javascript src=global.js/script /body /html CSS (style.css): .modalbox{ � � � � width:100%; � � � � height:100%; � � � � top:0px; � � � � left:0px; � � � � position:absolute; � � � � background:url(modal_bg.png); � � � � display:none; � � � � z-index:998} #info_inner{ � � � � width:500px; � � � � padding:15px; � � � � margin:200px auto 0px auto; � � � � background-color:#FFF; � � � � overflow:hidden; � � � � z-index:999} #open_info{ � � � � cursor:pointer} #close{ � � � � width:100%; � � � � padding-top:8px; � � � � margin-top:5px; � � � � border-top:#CCC 1px solid} #close img{ � � � � float:right; � � � � cursor:pointer } JAVASCRIPT (global.js): $(document).ready(function(){$('#open_info').click(function(){$ ('#info').fadeIn('500')});$('#close_info').click(function(){$ ('#info').fadeOut('500')})}); Thanks in advance, Mat.
[jQuery] function delay
Why not a plugin like (small correction void should be a string) $.fn.delay = function(delay){ if(typeof delay===undefined) delay = 1000; return this.animate({void:0}, delay); } This way you can call it like this $('#element').delay().effect('pulsate');
[jQuery] Simple selector problem
$(document).ready(function { alert($(div).length); }); -- divdiv 1/div divdiv 2/div divdiv 3/div I'm using jQuery 1.3.2. In IE, this returns 3. In Firefox, it returns 4. What's going on?
[jQuery] Re: Jcarousel problems in the buttins with IE6
Could you post a test page? Is the NEXT button just unclickable in IE6 or is it actually showing the disabled (aka 'grayed out') version? Are your previous/next buttons png format (the default ones for the plugin are png)? And are you applying some sort of PNG fix on the site? I have seen some PNG fixes make linked elements unclickable because of how they do positioning. The best thing to do would be to use gifs in conditional styles for IE6 only and see if that helps. On Jul 9, 3:31 pm, Zanfe andrea.zanferr...@gmail.com wrote: Hi all, I have a big problem with Jcarousel. I don't know what to do! In IE6, when I open my page, the button NEXT is disabled and so I can't view the other photos. Any help, please? Thanks a lot Bye Andrea
[jQuery] Re: getJson failing silently
Thank you both, I've learned something new today from each of you. After a number of trials, I think I found the issue. There are some newline characters in some of the rows fetched from the database. I'm almost sure this is what is causing all the issues. I'll see if I can handle them in the servlet itself before writing it out onto the json stream. As of now, I think I'll have to check each column of each row fetched from the database, see if there are any embedded new line characters, add the escape sequence and write to the json string that is going to be returned. Is there a better method to handle the embedded newline characters in the data coming from a database? On Jul 10, 12:00 pm, Michael Geary m...@mg.to wrote: Instead of repeating the object name over and over again, you can simplify the code with an object literal: $.ajax({ type: 'GET', url: 'qtool', processData: true, data: { action: 'executeQuery', entity_name: queryText }, dataType: 'json', success: function(data) { alert( data ); }, error: function( xhr, status, exception ) { alert( xhr.responseText ); } }); If you need the object in its own variable for any reason, you can still use the object literal: var params = { type: 'GET', url: 'qtool', processData: true, data: { action: 'executeQuery', entity_name: queryText }, dataType: 'json', success: function( data ) { alert( data ); }, error: function( xhr, status, exception ) { alert( xhr.responseText ); } }; $.ajax( params ); -Mike From: MorningZ Don't use the $.getJSON method as it, as you are finding out, has no way to handle an error... use the generic $.ajax instead var Params = {}; Params.type = GET; Params.url = qtool; Params.processData = true; Params.data = {action: executeQuery, entity_name: queryText }; Params.dataType = json; Params.success = function(data) { alert(data); }; Params.error = function(x,y,z) { alert(x.responseText); }; $.ajax(Params); that way x will be the error response from the server (which apparently you are running into)- Hide quoted text - - Show quoted text -
[jQuery] both 'if' and 'else' blocks being executed
Greetings, I am experiencing some crazy stuff, at least crazy to me... Both the 'if' and 'else' blocks (according to firebug) are being executed in the following anonymous function: html head script language=javascript type=text/javascript src=/usr/share/javascript/jquery/jquery.js/script script language=javascript type=text/javascript $(function() { add_billable_oncheck(); }); function add_billable_oncheck() { var billable_hidden = $('#billable_hidden')[0]; var billable_checkbox = $('#billable_checkbox')[0]; if ((billable_hidden != null) (billable_checkbox != null)) { $(billable_checkbox).change( function(event) { // These are the blocks that both get executed on checkbox check if (billable_checkbox.checked) { billable_hidden.disabled = true; } else { billable_hidden.disabled = false; } // ^^^ } ); } } /script /head body form input id=billable_hidden type=hidden name=billable value=No / input id=billable_checkbox type=checkbox name=billable value=Yes / /form /body /html Does anyone have any insight into this one? If I add 'return;' statements at the end of the blocks, things work as expected, however I wouldn't expect that I should have to do that. Thanks for the help, -- Matt Zagrabelny - mzagr...@d.umn.edu - (218) 726 8844 University of Minnesota Duluth Information Technology Systems Services PGP key 1024D/84E22DA2 2005-11-07 Fingerprint: 78F9 18B3 EF58 56F5 FC85 C5CA 53E7 887F 84E2 2DA2 He is not a fool who gives up what he cannot keep to gain what he cannot lose. -Jim Elliot signature.asc Description: This is a digitally signed message part
[jQuery] Re: Display subnav through external action
One thought is a completely separate nav, absolute position div over navbar, triggered by hover on image. Could use some big offset CSS to move superfish navbar off screen when mouse leaves the superfish , hover over image displays a fake navbar. Can use onBeforeSHow option of superfish to hide that absolute div if mouse goes back into superfish while it is visible Otherwise might try keeping the image in the li and see how overflow visible on that li reacts, perhaps absolute position the image within the last li, and hopefully mouse over image keeps the hover on li active( guessing IE won't like this). greggo wrote: That didn't work to well. This link takes you to what I'm referring to: http://skitch.com/rexoom/ba8r8/ginger-nin-nav-breakdown On Jul 10, 1:00pm, greggo gosof...@gmail.com wrote: It'll be difficult, given the design, to include the image as a part of the navigational list. In case you have any ideas, here's a breakdown of how I'd like it to work. div class="thumbnail"a href="" class="moz-txt-link-rfc2396E" href="http://skitch.com/rexoom/ba8r8/ginger-nin-nav-breakdown">"http://skitch.com/rexoom/ba8r8/ginger- nin-nav-breakdown"img src="" class="moz-txt-link-rfc2396E" href="http://img.skitch.com/20090710-mr6sp4d5r2a6ief2u59anwdmpy.preview.jpg">"http://img.skitch.com/20090710- mr6sp4d5r2a6ief2u59anwdmpy.preview.jpg" alt="ginger-nin-nav- breakdown" //abr /span style="font-family: Lucida Grande, Trebuchet, sans-serif, Helvetica, Arial; font-size: 10px; color: #808080"Uploaded with a href="" class="moz-txt-link-rfc2396E" href="http://plasq.com/">"http://plasq.com/"plasq/a's a href="" class="moz-txt-link-rfc2396E" href="http://skitch.com">"http://skitch.com"Skitch/a!/span/div On Jul 9, 11:15am, Charlie charlie...@gmail.com wrote: not sure what to look at. Can put an image in li and class it to have different display css than other li's. Menu items need to stay in li for script also options like onBeForeShow can be helpful to script for different parts of menu. There's likely a solution that will work in list structure, can you be more specific about what you are trying to accomplish greggo wrote:I have a navigational element that is distinct from the rest of my navigation and is a graphical icon. Therefore, I'm not using the standard li elements to display it. I'm simply using an img tag. The li tag for that nav element is not being displayed. I do however want the subnav to display when you mouse over the image. You can view it here:www.gingerninjas.comQuestion:How would I activate the display of the subnav (and hide the current subnav) using an object outside of the navigational list? I know I need to somehow trigger superfish with a mouseover event, but I'm not sure how to do that. Any help on this would be appreciated.
[jQuery] ClueTip, hideLocal, IE6: the same old sad story
jQuery 1.3.2 ClueTip 1.0.4 $('a.DownloadInfoLink').cluetip({ activation: 'click', local: true, showTitle: false, sticky: true, mouseOutClose: true, cluetipClass: 'jtip', width: 550, height: 300, fx: { open: 'fadeIn' } }); div.DownloadInfo { display: none; } a href=# class=DownloadInfoLink rel=#download_info_Xclick here for stuff/a div class=DownloadInfo id=download_info_X stuff here... /div This works terrific in everything except IE6, where the cluetip comes up empty. If I remove the display: none and use hideLocal: true the contents of all .DownloadInfo are displayed as the page loads. I'm guessing there may be a general issue (not just with ClueTip) with IE6 not hiding things quick enough. Does anyone know of a workaround?
[jQuery] Re: Simple selector problem
Here it is returning 3 in IE and FireFox as expected. Maurício -Mensagem Original- De: Chris Para: jQuery (English) Enviada em: sexta-feira, 10 de julho de 2009 12:34 Assunto: [jQuery] Simple selector problem $(document).ready(function { alert($(div).length); }); -- divdiv 1/div divdiv 2/div divdiv 3/div I'm using jQuery 1.3.2. In IE, this returns 3. In Firefox, it returns 4. What's going on?
[jQuery] Re: cluetip onMouseOut Stick problem
Looking at your demo, jTip Style clueTip, if you move over then and then move the mouse to the right, it still doesn't close the cluetip On Jul 9, 10:54 am, Karl Swedberg k...@englishrules.com wrote: Hi Randy, If I understand your problem correctly, I fixed this last week. The updated version can be found on Github: http://github.com/kswedberg/jquery-cluetip/tree/master I also just now updated the demo. --Karl Karl Swedbergwww.englishrules.comwww.learningjquery.com On Jul 8, 2009, at 4:46 PM, Randy wrote: When sticky: true and mouseOutClose: true are set the cluetip doesn't always close when you mouse out. Look at the example on the JQUERY DEMO PAGE: http://plugins.learningjquery.com/cluetip/demo/ Look at jTip Theme, 1. jTip Style clueTip, with slideDown effect and an image placed in the title for closing it, because it's sticky. New: The clueTip will close if you mouse out of it. The only way I can get the cluetip to close is moving the mouse on top of the cluetip. Anyone else have this issue and how to resolve it?
[jQuery] Re: both 'if' and 'else' blocks being executed
Can you explain to me why you are disabling a hidden input field? I assume the idea is that they are both checkboxes with the the same name attribute. Maybe I could help if I understood why you are doing this. On Jul 10, 1:38 pm, Matt Zagrabelny mzagr...@d.umn.edu wrote: Greetings, I am experiencing some crazy stuff, at least crazy to me... Both the 'if' and 'else' blocks (according to firebug) are being executed in the following anonymous function: html head script language=javascript type=text/javascript src=/usr/share/javascript/jquery/jquery.js/script script language=javascript type=text/javascript $(function() { add_billable_oncheck(); }); function add_billable_oncheck() { var billable_hidden = $('#billable_hidden')[0]; var billable_checkbox = $('#billable_checkbox')[0]; if ((billable_hidden != null) (billable_checkbox != null)) { $(billable_checkbox).change( function(event) { // These are the blocks that both get executed on checkbox check if (billable_checkbox.checked) { billable_hidden.disabled = true; } else { billable_hidden.disabled = false; } // ^^^ } ); }} /script /head body form input id=billable_hidden type=hidden name=billable value=No / input id=billable_checkbox type=checkbox name=billable value=Yes / /form /body /html Does anyone have any insight into this one? If I add 'return;' statements at the end of the blocks, things work as expected, however I wouldn't expect that I should have to do that. Thanks for the help, -- Matt Zagrabelny - mzagr...@d.umn.edu - (218) 726 8844 University of Minnesota Duluth Information Technology Systems Services PGP key 1024D/84E22DA2 2005-11-07 Fingerprint: 78F9 18B3 EF58 56F5 FC85 C5CA 53E7 887F 84E2 2DA2 He is not a fool who gives up what he cannot keep to gain what he cannot lose. -Jim Elliot signature.asc 1KViewDownload
[jQuery] Re: both 'if' and 'else' blocks being executed
On Fri, 2009-07-10 at 14:40 -0700, Matthew wrote: Can you explain to me why you are disabling a hidden input field? I assume the idea is that they are both checkboxes with the the same name attribute. Maybe I could help if I understood why you are doing this. The form handler on the server side processes both if the checkbox is checked. I only want one to be processed. Regardless, both blocks are being executed... (crazy) Thanks, On Jul 10, 1:38 pm, Matt Zagrabelny mzagr...@d.umn.edu wrote: Greetings, I am experiencing some crazy stuff, at least crazy to me... Both the 'if' and 'else' blocks (according to firebug) are being executed in the following anonymous function: html head script language=javascript type=text/javascript src=/usr/share/javascript/jquery/jquery.js/script script language=javascript type=text/javascript $(function() { add_billable_oncheck(); }); function add_billable_oncheck() { var billable_hidden = $('#billable_hidden')[0]; var billable_checkbox = $('#billable_checkbox')[0]; if ((billable_hidden != null) (billable_checkbox != null)) { $(billable_checkbox).change( function(event) { // These are the blocks that both get executed on checkbox check if (billable_checkbox.checked) { billable_hidden.disabled = true; } else { billable_hidden.disabled = false; } // ^^^ } ); }} /script /head body form input id=billable_hidden type=hidden name=billable value=No / input id=billable_checkbox type=checkbox name=billable value=Yes / /form /body /html Does anyone have any insight into this one? If I add 'return;' statements at the end of the blocks, things work as expected, however I wouldn't expect that I should have to do that. Thanks for the help, -- Matt Zagrabelny - mzagr...@d.umn.edu - (218) 726 8844 University of Minnesota Duluth Information Technology Systems Services PGP key 1024D/84E22DA2 2005-11-07 Fingerprint: 78F9 18B3 EF58 56F5 FC85 C5CA 53E7 887F 84E2 2DA2 He is not a fool who gives up what he cannot keep to gain what he cannot lose. -Jim Elliot signature.asc 1KViewDownload -- Matt Zagrabelny - mzagr...@d.umn.edu - (218) 726 8844 University of Minnesota Duluth Information Technology Systems Services PGP key 1024D/84E22DA2 2005-11-07 Fingerprint: 78F9 18B3 EF58 56F5 FC85 C5CA 53E7 887F 84E2 2DA2 He is not a fool who gives up what he cannot keep to gain what he cannot lose. -Jim Elliot signature.asc Description: This is a digitally signed message part
[jQuery] Re: both 'if' and 'else' blocks being executed
Depending on how your serverside processing works it makes sense that it would process both. Doesn't disable just prevent a client-side user from changing the checkbox? Make when the user check the check you can add or remove the desired checkbox using: http://docs.jquery.com/Manipulation/remove#expr. Otherwise wouldnt it make more sense to have your form processing script evaluate the checkbox and decide whether or not something gets posted? To have that sort of control through JQuery you may have to look at using Ajax to do a $.post On Jul 10, 2:44 pm, Matt Zagrabelny mzagr...@d.umn.edu wrote: On Fri, 2009-07-10 at 14:40 -0700, Matthew wrote: Can you explain to me why you are disabling a hidden input field? I assume the idea is that they are both checkboxes with the the same name attribute. Maybe I could help if I understood why you are doing this. The form handler on the server side processes both if the checkbox is checked. I only want one to be processed. Regardless, both blocks are being executed... (crazy) Thanks, On Jul 10, 1:38 pm, Matt Zagrabelny mzagr...@d.umn.edu wrote: Greetings, I am experiencing some crazy stuff, at least crazy to me... Both the 'if' and 'else' blocks (according to firebug) are being executed in the following anonymous function: html head script language=javascript type=text/javascript src=/usr/share/javascript/jquery/jquery.js/script script language=javascript type=text/javascript $(function() { add_billable_oncheck(); }); function add_billable_oncheck() { var billable_hidden = $('#billable_hidden')[0]; var billable_checkbox = $('#billable_checkbox')[0]; if ((billable_hidden != null) (billable_checkbox != null)) { $(billable_checkbox).change( function(event) { // These are the blocks that both get executed on checkbox check if (billable_checkbox.checked) { billable_hidden.disabled = true; } else { billable_hidden.disabled = false; } // ^^^ } ); }} /script /head body form input id=billable_hidden type=hidden name=billable value=No / input id=billable_checkbox type=checkbox name=billable value=Yes / /form /body /html Does anyone have any insight into this one? If I add 'return;' statements at the end of the blocks, things work as expected, however I wouldn't expect that I should have to do that. Thanks for the help, -- Matt Zagrabelny - mzagr...@d.umn.edu - (218) 726 8844 University of Minnesota Duluth Information Technology Systems Services PGP key 1024D/84E22DA2 2005-11-07 Fingerprint: 78F9 18B3 EF58 56F5 FC85 C5CA 53E7 887F 84E2 2DA2 He is not a fool who gives up what he cannot keep to gain what he cannot lose. -Jim Elliot signature.asc 1KViewDownload -- Matt Zagrabelny - mzagr...@d.umn.edu - (218) 726 8844 University of Minnesota Duluth Information Technology Systems Services PGP key 1024D/84E22DA2 2005-11-07 Fingerprint: 78F9 18B3 EF58 56F5 FC85 C5CA 53E7 887F 84E2 2DA2 He is not a fool who gives up what he cannot keep to gain what he cannot lose. -Jim Elliot signature.asc 1KViewDownload
[jQuery] Re: both 'if' and 'else' blocks being executed
Depending on how your serverside processing works it makes sense that it would process both. Doesn't disable just prevent a client-side user from changing the checkbox? Make when the user check the check you can add or remove the desired checkbox using: http://docs.jquery.com/Manipulation/remove#expr. Otherwise wouldnt it make more sense to have your form processing script evaluate the checkbox and decide whether or not something gets posted? To have that sort of control through JQuery you may have to look at using Ajax to do a $.post On Jul 10, 2:44 pm, Matt Zagrabelny mzagr...@d.umn.edu wrote: On Fri, 2009-07-10 at 14:40 -0700, Matthew wrote: Can you explain to me why you are disabling a hidden input field? I assume the idea is that they are both checkboxes with the the same name attribute. Maybe I could help if I understood why you are doing this. The form handler on the server side processes both if the checkbox is checked. I only want one to be processed. Regardless, both blocks are being executed... (crazy) Thanks, On Jul 10, 1:38 pm, Matt Zagrabelny mzagr...@d.umn.edu wrote: Greetings, I am experiencing some crazy stuff, at least crazy to me... Both the 'if' and 'else' blocks (according to firebug) are being executed in the following anonymous function: html head script language=javascript type=text/javascript src=/usr/share/javascript/jquery/jquery.js/script script language=javascript type=text/javascript $(function() { add_billable_oncheck(); }); function add_billable_oncheck() { var billable_hidden = $('#billable_hidden')[0]; var billable_checkbox = $('#billable_checkbox')[0]; if ((billable_hidden != null) (billable_checkbox != null)) { $(billable_checkbox).change( function(event) { // These are the blocks that both get executed on checkbox check if (billable_checkbox.checked) { billable_hidden.disabled = true; } else { billable_hidden.disabled = false; } // ^^^ } ); }} /script /head body form input id=billable_hidden type=hidden name=billable value=No / input id=billable_checkbox type=checkbox name=billable value=Yes / /form /body /html Does anyone have any insight into this one? If I add 'return;' statements at the end of the blocks, things work as expected, however I wouldn't expect that I should have to do that. Thanks for the help, -- Matt Zagrabelny - mzagr...@d.umn.edu - (218) 726 8844 University of Minnesota Duluth Information Technology Systems Services PGP key 1024D/84E22DA2 2005-11-07 Fingerprint: 78F9 18B3 EF58 56F5 FC85 C5CA 53E7 887F 84E2 2DA2 He is not a fool who gives up what he cannot keep to gain what he cannot lose. -Jim Elliot signature.asc 1KViewDownload -- Matt Zagrabelny - mzagr...@d.umn.edu - (218) 726 8844 University of Minnesota Duluth Information Technology Systems Services PGP key 1024D/84E22DA2 2005-11-07 Fingerprint: 78F9 18B3 EF58 56F5 FC85 C5CA 53E7 887F 84E2 2DA2 He is not a fool who gives up what he cannot keep to gain what he cannot lose. -Jim Elliot signature.asc 1KViewDownload
[jQuery] Re: both 'if' and 'else' blocks being executed
Please, using plain English only, explain what you want to do. Then we'll try to help ;) The glitch is probably caused by the fact that the two input fields *do* share the same name; then when you touch one, you *do* alter both! Bug or feature? As far as I got it, (and pretending that I got it right) you're trying to enable/disable an hidden input field based on another checkbox's checked state. If so, you're running insanely fast by the wrong side of the street... So: give us some hint :) On Fri, Jul 10, 2009 at 22:38, Matt Zagrabelnymzagr...@d.umn.edu wrote: Greetings, I am experiencing some crazy stuff, at least crazy to me... Both the 'if' and 'else' blocks (according to firebug) are being executed in the following anonymous function: html head script language=javascript type=text/javascript src=/usr/share/javascript/jquery/jquery.js/script script language=javascript type=text/javascript $(function() { add_billable_oncheck(); }); function add_billable_oncheck() { var billable_hidden = $('#billable_hidden')[0]; var billable_checkbox = $('#billable_checkbox')[0]; if ((billable_hidden != null) (billable_checkbox != null)) { $(billable_checkbox).change( function(event) { // These are the blocks that both get executed on checkbox check if (billable_checkbox.checked) { billable_hidden.disabled = true; } else { billable_hidden.disabled = false; } // ^^^ } ); } } /script /head body form input id=billable_hidden type=hidden name=billable value=No / input id=billable_checkbox type=checkbox name=billable value=Yes / /form /body /html Does anyone have any insight into this one? If I add 'return;' statements at the end of the blocks, things work as expected, however I wouldn't expect that I should have to do that. Thanks for the help, -- Matt Zagrabelny - mzagr...@d.umn.edu - (218) 726 8844 University of Minnesota Duluth Information Technology Systems Services PGP key 1024D/84E22DA2 2005-11-07 Fingerprint: 78F9 18B3 EF58 56F5 FC85 C5CA 53E7 887F 84E2 2DA2 He is not a fool who gives up what he cannot keep to gain what he cannot lose. -Jim Elliot -- Linux user #437712
[jQuery] jQuery background position plugin
Hi, The background position plugin by Alexander Farkas rocks!! But I have a question.. Is possible to remove the animation for the X- axis ? For example: $(this).animate({backgroundPosition:(200px -50px)}, {duration: 600}) I don't want to animate the X-axis. I don't need 1 2 3 4 200px.. I want to achieve 200px without any incrementation. On the other side I need the animation on Y-axis.. I want to increment to -50, something like -0 -1 -2 -3 -4 . etc... I appreciate if someone try to help! Thanks!
[jQuery] Validate Not Working in MVC (Validate)
I have an MVC application and I am trying to do some validation but the Validate doesn't seem to fire. I can get it working in a basic html page but for some reason it is not working in my aspx page and I am not sure why. I have all the js files included that I need and the CSS classes defined exactly as they are in the basic example in the jQuery documentation. Here is my code: script $(document).ready(function() { //alert(); $(#main).validate({ rules: { // simple rule, converted to {required:true} ssn: { required: true } } }); }); /script input id=ssn class=required name=ssn /
[jQuery] Re: mcDropdown jQuery Plug-in v1.2.07
WOW! Thanks, works like a charm, that is amazing... On Jul 10, 5:49 pm, Dan G. Switzer, II dswit...@pengoworks.com wrote: Darren: One thing to keep in mind is this plug-in was designed to be a new form UI control that allows the users to type in their choices. Thus, the default behavior when clicking in the box puts the focus in the text box so you can begin typing. However, you could accomplish what you want by: * Using a div element instead of an input / element. This will make the dropdown readonly w/no keyboard support. * Attaching a click handler to the layer with the mcdropdown class Example: div id=mcdropdown/div script type=text/javascript // create the drop down $(#mcdropdown).mcDropdown(#menu); // attach a click handler to the div class=mcdropdown element $(#mcdropdown).parent().click(function(){ // when the element is clicked on, open the menu $(#mcdropdown).mcDropdown().openMenu();}); /script I haven't tested this extensively, but it should work. -Dan On Fri, Jul 10, 2009 at 6:17 AM, takuhii taku...@googlemail.com wrote: I am using this FANTASTIC drop down plugin for jQuery, but wondered how I can customise it so that rather than hit the button ont he right, I can click the whole active area to get the dropdown to appear. I currently have the menu attached to a single line text box and would like it to open up when ever I click in the text box, or on the dropdown arrow? Also, how can I specify some default text in the text box that is acting as my dropdown launchpad? Regards Darren
[jQuery] Re: both 'if' and 'else' blocks being executed
On Fri, Jul 10, 2009 at 6:09 PM, Matthewmvbo...@gmail.com wrote: Depending on how your serverside processing works it makes sense that it would process both. Doesn't disable just prevent a client-side user from changing the checkbox? Disable instructs the browser not to send it. Readonly prevents client-side edits. That said, I think different browsers enforce this to different levels. YMMV. -- Brett Ritter / SwiftOne swift...@swiftone.org
[jQuery] Re: Simple selector problem
On Fri, Jul 10, 2009 at 11:34 AM, Chrischrisb...@gmail.com wrote: I'm using jQuery 1.3.2. In IE, this returns 3. In Firefox, it returns 4. Are you running Firebug or any add-on that modifies the DOM in Firefox? -- Brett Ritter / SwiftOne swift...@swiftone.org
[jQuery] Is there an append if type function in jquery
I had a code that looks like this for now: var rowObj = $.create('tr', {'id': pod + currPOCount, 'valign': 'top'}) .append($.create('td') .append($.create('a', {'href': '#', 'onclick': 'delNonJobPOD (\'pod' + currPOCount + '\');return false;'}) .text('delete'))); I was wondering if there was something like: This is just a make belief function appendif(check, action) but just to illustrate what I am getting at look at this code. var rowObj = $.create('tr', {'id': pod + currPOCount, 'valign': 'top'}) .append($.create('td') .appendif(function(){return (a==b);}, $.create('a', {'href': '#', 'onclick': 'delNonJobPOD(\'pod' + currPOCount + '\');return false;'}) .text('delete'))); That way if a==b is true the the append happens otherwise nothing happens. B.I.
[jQuery] namespace content
Does anyone know if this plugin works with RSS feeds with namespaces? Also, many RSS feeds have CDATA included. How does the plugin work with CDATA? An example RSS feed is: http://sports.yahoo.com/mlb/ rss.xml.
[jQuery] Re: function delay
there are a bunch of plugins like this , just search for wait, pause, or delay and you should find one that is much more complete then your code you have. On Jul 10, 11:34 am, Many martin.clav...@gmail.com wrote: Why not a plugin like (small correction void should be a string) $.fn.delay = function(delay){ if(typeof delay===undefined) delay = 1000; return this.animate({void:0}, delay); } This way you can call it like this $('#element').delay().effect('pulsate');
[jQuery] Re: cluetip onMouseOut Stick problem
you're moving over and then to the right of the tooltip? strange. it's working fine for me. which browser are you using? I just tested again in FF3.5 and Safari 4, both Mac. --Karl Karl Swedberg www.englishrules.com www.learningjquery.com On Jul 10, 2009, at 5:24 PM, Randy wrote: Looking at your demo, jTip Style clueTip, if you move over then and then move the mouse to the right, it still doesn't close the cluetip On Jul 9, 10:54 am, Karl Swedberg k...@englishrules.com wrote: Hi Randy, If I understand your problem correctly, I fixed this last week. The updated version can be found on Github: http://github.com/kswedberg/jquery-cluetip/tree/master I also just now updated the demo. --Karl Karl Swedbergwww.englishrules.comwww.learningjquery.com On Jul 8, 2009, at 4:46 PM, Randy wrote: When sticky: true and mouseOutClose: true are set the cluetip doesn't always close when you mouse out. Look at the example on the JQUERY DEMO PAGE: http://plugins.learningjquery.com/cluetip/demo/ Look at jTip Theme, 1.jTip Style clueTip, with slideDown effect and an image placed in the title for closing it, because it's sticky. New: The clueTip will close if you mouse out of it. The only way I can get the cluetip to close is moving the mouse on top of the cluetip. Anyone else have this issue and how to resolve it?
[jQuery] Re: Is there an append if type function in jquery
It's not available out of the box with jQuery, but here's a plugin that does chainable if statements: http://benalman.com/projects/jquery-iff-plugin/ Never used it myself so I can't common on it. On Jul 10, 10:45 am, B.I. ebade2...@gmail.com wrote: I had a code that looks like this for now: var rowObj = $.create('tr', {'id': pod + currPOCount, 'valign': 'top'}) .append($.create('td') .append($.create('a', {'href': '#', 'onclick': 'delNonJobPOD (\'pod' + currPOCount + '\');return false;'}) .text('delete'))); I was wondering if there was something like: This is just a make belief function appendif(check, action) but just to illustrate what I am getting at look at this code. var rowObj = $.create('tr', {'id': pod + currPOCount, 'valign': 'top'}) .append($.create('td') .appendif(function(){return (a==b);}, $.create('a', {'href': '#', 'onclick': 'delNonJobPOD(\'pod' + currPOCount + '\');return false;'}) .text('delete'))); That way if a==b is true the the append happens otherwise nothing happens. B.I.
[jQuery] Re: jQuery background position plugin
You could chain a .css() to it. Set the x axis first with .css() and then the y axis with .animate() : $(this) .css({backgroundPosition: '200px 0'}) .animate({backgroundPosition:(200px -50px)}, {duration: 600}) --Karl Karl Swedberg www.englishrules.com www.learningjquery.com On Jul 10, 2009, at 6:57 PM, yo2lux wrote: Hi, The background position plugin by Alexander Farkas rocks!! But I have a question.. Is possible to remove the animation for the X- axis ? For example: $(this).animate({backgroundPosition:(200px -50px)}, {duration: 600}) I don't want to animate the X-axis. I don't need 1 2 3 4 200px.. I want to achieve 200px without any incrementation. On the other side I need the animation on Y-axis.. I want to increment to -50, something like -0 -1 -2 -3 -4 . etc... I appreciate if someone try to help! Thanks!
[jQuery] Problem with jquery.form.js and jquery.validate.js working together
Hi, I feel pretty stupid, but I can't seem to get the jQuery Form plugin (http://malsup.com/jquery/form/#getting-started) and the jQuery Validation plugin (http://bassistance.de/jquery-plugins/jquery-plugin- validation/) to work together. I can get them to work separately, but I can't seem to make them play nice together. :( I've been prowling through this group, trying to uncover any ideas from past posts... but so far, they're only serving to confuse me even more. I've got a test page up that has the Validation plugin working the way I'd like. You can see it here: http://tinyurl.com/mrqyv6 At the moment, it successfully validates the form fields and, once valid, passes it to the PHP file for processing. But, here's what I'd LIKE to have happen: (1) User clicks Submit -- jQuery Validation processes the form and displays any errors inline with the label (this part is working) (2) Once the form passes validation, submit the form to the contact- us.php form. This PHP file is setup to also validate the form fields and can inject its errors into the page in case JS is disabled or didn't load correctly. The PHP file also re-directs to a Success page, again for users without JS. (3) Once the submit is successful, I'd like to popup an Alert window saying it was successful and clear the form of its data I've tried using the submitHandler option of the Validation plugin to send the form to the jQuery Form plugin for AJAX submission, but that didn't work. Then, I tried switching things around so that I used the beforeSubmit option of the jQuery form plugin to call the Validation. Again... no go. Here's the code I've got working for the Validation portion of the process. [code]code $(document).ready(function() { // validate contact form on keyup and submit $(#contactForm).validate({ rules: { contactName: { required: true, minlength: 2 }, contactEmail: { required: true, email: true }, message: { required: true, minlength: 2 } }, messages: { contactName: Please enter your name, contactEmail: Please enter a valid email address, message: Please enter your message }, errorPlacement: function(error, element) { element.siblings(label).children(span.error).html( + error.text()); }, success: function(error, element){ element.siblings(label).children(span.error).html(null); } }); }); /code[/code] I really appreciate any insight/help on getting this to work. Thanks, - John
[jQuery] Re: $.get ajax call on http page to https on same domain
I've had to simply restructure how everything works and use a separate https login page. Would've really liked a nice AJAX solution, but it wouldn't be simple. If anyone's interested, I did find some RSA/ public key encryption libraries in javascript, none of them well documented though: http://shop-js.sourceforge.net/ (with python and perl server side decoders) http://www.ohdave.com/rsa/ http://www.home.zonnet.nl/MAvanEverdingen/Code/ http://www.hanewin.net/encrypt/rsa/rsa.htm On Jul 9, 6:59 pm, James james.gp@gmail.com wrote: I suggest that if you do need to do it that, something like this would work: User clicks on AJAX call button/link Request is sent to server If logged in, send valid response Do what you have to do. END If not logged in, send a response code back that user is not loggged in Javascript sees response code Optional: alert user they need to log in, user clicks button Redirect page to secure login page (with the current URL stored in the URL query string or cookie) User logs in and redirected back to previous page User clicks on AJAX call button/link again, should be okay this time. END On Jul 9, 3:21 pm, kranthi kranthi...@gmail.com wrote: may be you can provide a link to login page instead of the actual textboxes for login(on those pages).
[jQuery] Using live() and tooltip together
Having some issues with live method and the bassistance tooltip http://docs.jquery.com/Events/live http://bassistance.de/jquery-plugins/jquery-plugin-tooltip/ I'm using the live() attached to the onmouseover method to dispatch the element to the tooltip function. It works - not the first time - but the second - and after that it fails. I suspect its because the bassistance plugin is written for non-ajax based applications, which is understandable. Has anyone extended this plugin to support Ajax based tooltips where the DOM is injected? I know that the reason the that tooltip is bombing out is because return this.each(function() { $.data(this, tooltip, settings); this.tOpacity = helper.parent.css(opacity); // copy tooltip into its own expando and remove the title this.tooltipText = this.title; $(this).removeAttr(title); // also remove alt attribute to prevent default tooltip in IE this.alt = ; }) clearly shows that its removing the attribute (and firebug confirms). So it appears that to solve for this one would have to provide a isLive setting to this and write up some conditionals that does the handling if its ajax. Has anyone done that yet or should I forge ahead?