[jQuery] ajax loading animation attached to mouse
Hi, I'm looking for a plugin (or another easy way) to attach a custom ajax loading animation to my mouse arrow. I didn't find anything in the plugin list. Regards, Oli
[jQuery] Re: Set select menu with current day
Your welcome, though I noticed something wrong...this should be a bit better $(select).children(option).each(function() { if ( $(this).html() == varDay ) { $(this).attr(selected,selected); } }); Nic Hubbard wrote: Perfect! Thank you! On Feb 22, 1:34 pm, Liam Potter radioactiv...@gmail.com wrote: oh ok, same idea then I assume the days are displayed as numbers $(select).children(option).each(function() { if ( $(select).children(option).html() == varDay ) { $(this).attr(selected,selected); } }); Nic Hubbard wrote: I am not needing a class. This is a select input menu, that has options for 1-31. I need to have the correct option set as the selection option, based on what day it currently is. On Feb 22, 1:12 pm, Liam Potter radioactiv...@gmail.com wrote: put id's on the days of the month eg id=day1 then you could do $(day+dayVar).addClass(activeclass); Nic Hubbard wrote: I have a var that gets set with the current day, so, today would be 22. Then, I have a select menu with all the days of the month. How could I set the selected item in the select menu to the current day that is in my var?
[jQuery] Re: adding tabs dynamically
You could add that to the template. Or use the add callback to populate the tab: $('#whatever').tabs({ add: function(event, ui) { $(ui.panel).html( ... ) .find('input'); // do something with these inputs } }); It seems you have to use the add callback anyway to get to these inputs. If you use the template you only wouldn't need the html() call. --Klaus On 23 Feb., 02:29, Paul Georges sinst...@gmail.com wrote: awesome, thanks. can't believe i missed that one. and as for the content of the tab? if i wanted a tab to always have two textboxes, should i modify the template? and then who would i access these two input boxes dynamically? thanks heaps paul On Feb 21, 12:41 am, Klaus Hartl klaus.ha...@googlemail.com wrote: Why don't you put the desired label in the first place? $('#tabs').tabs('add', '#new', 'Label'); Other than that you could utilize the add callback: $('#tabs').tabs({ add: function(event, ui) { // add additional html to the tab $('span', ui.tab).html(...); } }); Or you can change the tabTemplate option and add that html there... --Klaus On 20 Feb., 06:01, Paul Georges sinst...@gmail.com wrote: hey guys and gals, http://docs.jquery.com/UI/Tabs followed the above docs but couldn't quite add tabs correctly yet. i can add a tab, yes, but then i can't change it's label or innerHTML. how can i do this? cheers! Paul!
[jQuery] Re: help to develop my Jquery Accordion
I put the code in this link : http://www.infotica.org.tn/jquery/ Thanks !!! On Feb 23, 3:33 am, Charlie Tomlinson charlie...@gmail.com wrote: you haven't explained what the problem is have you a link to look at? lock2007 wrote:Hi, I tried for a few days to have a code JQuery Accordion for my menu as it is used in the Apple site. But I still have problems. So I found another nice code in the address:http://berndmatzner.de/jquery/hoveraccordion/index.phpI tried to put the code to work on three levels: Menu1 Sub menu 1 Link 1 Instead of: Menu1 Link1 But always failed Any help please ! I need it for my site ! all codes works nice for 2 levels but not well for 3 levels
[jQuery] ui tabs : what are the only necessary CSS files ?
Hi, I'm trying to use ui Tabs , but i don't need all the rest of the UI distribution, yet they all come into the generated download. I'm a bit lost in all those css files. What is the bare minimum css that i absolutely need to make the ui.tabs work? Thank you, Alexandre
[jQuery] Re: Working examle of UI/Uploader
hm I would like Working examle with back end code for some reason I have a heap of errors when trying to initialize the script On Feb 22, 12:28 am, Shedokan shedo...@yahoo.com wrote: I think it does:http://docs.jquery.com/UI/Uploader On 21 פברואר, 22:01, Joac ja.sor...@gmail.com wrote: Pleas AnyBody send me Working examle of UI/Uploaderon php. UI/Uploaderhsn't any docs
[jQuery] jQuery, Shadowbox + Postback
Hi, I've been trying to do a postback from a shadowbox. And I've acctually succeded, but it's not using jQuery witch I think could help me out alot easier than I have now. What I want to do is to post back a value from my shadowbox, and then I close it with document.Shadowbox.close(); The value should then be parsed into a input form field. The tricky part is that I want to make jQuery do something to the input field and the value. It's going to check the value if it's valid and if so change it to something else. Now I just have this... [code] script type='text/javascript' function parseBack(thisID, thisName) { parent.document.inkop.productString.value = thisID; parent.Shadowbox.close(); } /script button onClick=\parseBack('$productID', '$productName');\Stäng/ button [/code] I think maybe there's a way to do this with jQuery right away and make it change the html on the parent document if it's true.
[jQuery] Re: Combining jQuery validation, ajax Submit and jqUploader
this is what i found on jquery.documentation, Serialize requires that fields have a name attribute. Having only an id will not work. On Feb 23, 8:10 am, Andri 4r53...@gmail.com wrote: I have a form, and i want to combing jquery validation ajax Submit and jquploader. This is the script $(#RegForm).validate({ submitHandler: function(form) { jQuery(form).ajaxSubmit({ var str = $(#RegForm).serialize(); $.ajax({ type: 'POST', url: 'ajax.php', data: str, success: function(msg) { if(msg == 'OK') { $('#status').html('bData Has Been Added to Database/b'); } else { $('#status').html(msg); } } }) $('form :input').val(); $('form :input[type=submit]').val(Submit); return false; }); } }); But it got an error on = var str = $(#RegForm).serialize();\n (missing : after property id) How to solve this ?
[jQuery] Re: Combining jQuery validation, ajax Submit and jqUploader
i forgot to add link for more details about serialize() http://docs.jquery.com/Ajax/serialize On Feb 23, 11:12 am, tain bugi@gmail.com wrote: this is what i found on jquery.documentation, Serialize requires that fields have a name attribute. Having only an id will not work. On Feb 23, 8:10 am, Andri 4r53...@gmail.com wrote: I have a form, and i want to combing jquery validation ajax Submit and jquploader. This is the script $(#RegForm).validate({ submitHandler: function(form) { jQuery(form).ajaxSubmit({ var str = $(#RegForm).serialize(); $.ajax({ type: 'POST', url: 'ajax.php', data: str, success: function(msg) { if(msg == 'OK') { $('#status').html('bData Has Been Added to Database/b'); } else { $('#status').html(msg); } } }) $('form :input').val(); $('form :input[type=submit]').val(Submit); return false; }); } }); But it got an error on = var str = $(#RegForm).serialize();\n (missing : after property id) How to solve this ?
[jQuery] Re: ui tabs : what are the only necessary CSS files ?
ui.core.css ui.tabs.css ui.theme.css Note: if you have any further questions about jQuery UI, we'd love to answer them over here: http://groups.google.com/group/jquery-ui Thanks. - Richard On Mon, Feb 23, 2009 at 4:32 AM, Alexandre Plennevaux aplennev...@gmail.com wrote: Hi, I'm trying to use ui Tabs , but i don't need all the rest of the UI distribution, yet they all come into the generated download. I'm a bit lost in all those css files. What is the bare minimum css that i absolutely need to make the ui.tabs work? Thank you, Alexandre
[jQuery] Re: ui tabs : what are the only necessary CSS files ?
thanks Richard, I'm having a lot of trouble upgrading to ui tabs so see you around on the jquery ui group :) Alexandre On Mon, Feb 23, 2009 at 11:32 AM, Richard D. Worth rdwo...@gmail.com wrote: ui.core.css ui.tabs.css ui.theme.css Note: if you have any further questions about jQuery UI, we'd love to answer them over here: http://groups.google.com/group/jquery-ui Thanks. - Richard On Mon, Feb 23, 2009 at 4:32 AM, Alexandre Plennevaux aplennev...@gmail.com wrote: Hi, I'm trying to use ui Tabs , but i don't need all the rest of the UI distribution, yet they all come into the generated download. I'm a bit lost in all those css files. What is the bare minimum css that i absolutely need to make the ui.tabs work? Thank you, Alexandre
[jQuery] Autocomplete and change event
Hi I've been using this autocomplete plugin http://www.pengoworks.com/workshop/jquery/autocomplete.htm for a while. It's been doing its job, but now I want to add a change event to that field, so - Autocomplete finds the value and - change event does some calculation based on that value (or the value entered straight by the user.) But autocomplete fires the change event of that field with its format functions. My question is if this is a known problem, if there is a quick fix, or if I have to deploy another autocompleter or so.
[jQuery] Internet Explorer 7 sending a POST instead of a GET request
$.ajax({ url: this.href, type: 'get', dataType: 'script', success: function(data){ I have a code like that work with all browsers buts not working with IE. IE is sending a POST instead of a GET request How do I fix this issue? Thanks
[jQuery] jQuery Autocomplete Documentation for Eclipse JSDT/WTP 3 - JsDoc
I noticed while downloading jquery that there is a download of Visual Studio documentation so that you get code / autocompletion within Visual Studio. It would be really cool if you could provide documentation for Eclipse JSDT/WTP 3 that would allow the editor to provide code completion and hover text for jQuery. The following link takes you to the Eclipse JSDT wiki page where you'll find a Libraries topic that describes how to add libraries and code completion documentation to your eclipse projects. http://wiki.eclipse.org/index.php/ATF/JSDT#Libraries Please check it out and see if you can provide the JsDoc files for jQuery. As a fairly new java developer, having code completion in your IDE is tremendously helpful and increases you productivity tremendously. In addition, there is a huge number of developer that use Eclipse for their development. You could really gain some ground with those developers and an edge over your competition by making your tool even easier to user. Thanks so much for listening.
[jQuery] Question on JQuery Licensing Issue
This is Vicky from China. I came across to know JQuery last year and felt very interested in this masterpiece. My brother once adopted some features or plug-in of JQuery during his graduation thesis of designing a web application. He found it's very practical also. Now I have some questions which need your kind clarification. 1. May I know the licence for the plug-in called table sorter? JQuery is in dual licence(GPL and MIT), but I'm not sure whether this specific plug-in is in both? MIT? or GPL? Pls advise. 2. If my bother want to adopt some functions (plugs-in) to design some other web site and turn for commercial use (like design home page for small company), could you pls clarify how to claim the use of Jquery? Should we enclose a claim in his source code or having the same licensing info in his about page? Is there any other issue we should notice? It would be appreciated if you could offer some example or template that we need to folllow. Thanks a lot in advance. :)
[jQuery] jQuery in ASP.NET AJAX causes blank page
Hi, My page: %@ Page Language=C# AutoEventWireup=true CodeFile=Default.aspx.cs Inherits=_Default % %@ Register Assembly=Telerik.Web.UI Namespace=Telerik.Web.UI TagPrefix=telerik % !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 runat=server script type=text/javascript src=js/jquery-1.3.1.js / title/title style type=text/css *.red { color: #f30; } /style /head body form id=form1 runat=server div div id=orderedlist pHello/p /div script type=text/javascript $(document).ready(function() { $(#orderedlist).addClass(red); }); /script /div /form /body /html -- Starts fine enough, but I just get an empty page. The page source is present and correct. Removing the reference to jQuery results in the page loading fine (though obviously the jQuery code in the script block fails). Firebug does however reveal that the BODY tag is indeed empty, as shown in prepared screenshot: http://programx.co.uk/media/p/608.aspx This is using ASP.NET 2.0 with ASP.NET AJAX 3.5, but I don't think this is the issue because I have disabled the ASP.NET AJAX portions in the web.config file in some of my tests. I must be missing something, surely?
[jQuery] Need advise
Hi, I am working on a page that need an AJAX tech. I use Java Server Page in this case. Here is the case: 1. On input text user input a certain fix length number (i.e. 15 chars) 2. It must be able to execute a stored procedure (on oracle DB) that will return a yes or no answer for particular number as parameter 3. Then another combo box will be enabled or disabled accordingly. 4. If enabled then this combo box will need to load itself dynamically from specific table. It just a simple select like select xxx from table A My question is there any available jquery plugin for this requirement? Or I must have build this from scratch? I am new to AJAX and found out about jquery and it is really nice indeed. But I cant spend all my time browsing through so many jquery plugins there. So if you are an AJAX expert or may have better experience than me, you could help giving me advice and I would appreciate it. Thanks
[jQuery] is there something like $('.myClass').contains('val1 or val2 or val3')?
Hi guys is there a way to use logical operators in jQuery e.g. with 'contains'? thanks
[jQuery] Re: jQuery Autocomplete Documentation for Eclipse JSDT/WTP 3 - JsDoc
We provide an export of our documentation in the OpenAjax Metadata format, which is already supported by Aptana (an alterantive to JSDT/WTP), and also by other IDE, at least planned for Visual Studio, Dreamweaver etc. You can generate the metadata via the openAjaxMetadata target from our ant build: http://jqueryjs.googlecode.com/svn/trunk/jquery/build.xml Jörn On Mon, Feb 23, 2009 at 7:11 AM, rwpreece rwpre...@gmail.com wrote: I noticed while downloading jquery that there is a download of Visual Studio documentation so that you get code / autocompletion within Visual Studio. It would be really cool if you could provide documentation for Eclipse JSDT/WTP 3 that would allow the editor to provide code completion and hover text for jQuery. The following link takes you to the Eclipse JSDT wiki page where you'll find a Libraries topic that describes how to add libraries and code completion documentation to your eclipse projects. http://wiki.eclipse.org/index.php/ATF/JSDT#Libraries Please check it out and see if you can provide the JsDoc files for jQuery. As a fairly new java developer, having code completion in your IDE is tremendously helpful and increases you productivity tremendously. In addition, there is a huge number of developer that use Eclipse for their development. You could really gain some ground with those developers and an edge over your competition by making your tool even easier to user. Thanks so much for listening.
[jQuery] Re: jQuery messing with this?
Works like a charm :) Thanks a lot (too bad I already made a detour ;) ). On Feb 20, 2:20 pm, akzhan akzhan.abdu...@gmail.com wrote: It's common practice to copy this variable to local self (var self = this). And it works fine. $(select.zmiana_daty_wysylki).each(function () { var self = this; /* do some stuff to select */ $('option', this).each(function () { /* operate on each option, and self will point to select. */ }); }); On 20 фев, 13:41, pambuk wojtek.zymo...@gmail.com wrote: I know thatjQueryoverwrites 'this', but I never had a problem with that until now. Maybe some of you know a better way or maybe I took a wrong turn somewhere. What I'm basically trying to do is to iterate selects (dropdowns), do something with them, and while I'm iterating selects, iterate options of a every select, it looks like this (except for the inside logic): $(select.zmiana_daty_wysylki).each(function (i) { var select = this; /* do some stuff to select */ select.find('option').each(function (ii) { /* operate on each option */ }); }); Is this doable? If I remove iterating options (select.find ('option').each(...)), everything works fine of course, so nothing inside first loop is broken.
[jQuery] Re: jQuery in ASP.NET AJAX causes blank page
I solved it. Make sure the script tag is not self-closing, ie: script type=text/javascript src=js/jquery-1.3.1.js/script On Feb 23, 11:08 am, Nathan Pledger progr...@gmail.com wrote: Hi, My page: %@ Page Language=C# AutoEventWireup=true CodeFile=Default.aspx.cs Inherits=_Default % %@ Register Assembly=Telerik.Web.UI Namespace=Telerik.Web.UI TagPrefix=telerik % !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 runat=server script type=text/javascript src=js/jquery-1.3.1.js / title/title style type=text/css *.red { color: #f30; } /style /head body form id=form1 runat=server div div id=orderedlist pHello/p /div script type=text/javascript $(document).ready(function() { $(#orderedlist).addClass(red); }); /script /div /form /body /html -- Starts fine enough, but I just get an empty page. The page source is present and correct. Removing the reference to jQuery results in the page loading fine (though obviously the jQuery code in the script block fails). Firebug does however reveal that the BODY tag is indeed empty, as shown in prepared screenshot: http://programx.co.uk/media/p/608.aspx This is using ASP.NET 2.0 with ASP.NET AJAX 3.5, but I don't think this is the issue because I have disabled the ASP.NET AJAX portions in the web.config file in some of my tests. I must be missing something, surely?
[jQuery] Re: Problem with refreshing
Maybe it's better to do a callback and delete only the list-element of that user if the delete was succesfull, instead of rebuilding the entire user-list. That would save you the trouble of re-binding, and save you an extra server call.
[jQuery] Re: [Validate] plugin fails on Safari
Hi Jörn Many thanks for your suggestion. In fact the problem was an obvious one that lay in the metadata. I had a class name of 'date' in my input field which was obviously clashing. I had totally overlooked that. Many thanks for writing a very flexible plugin. All the best George On Feb 18, 4:10 pm, Jörn Zaefferer joern.zaeffe...@googlemail.com wrote: Regular expressions are read to read, can't spot any obvious error with that, especially considering that it fails only in Safari. Here is a custom method for italian dates, not using regex, maybe it helps: jQuery.validator.addMethod( dateITA, function(value, element) { var check = false; var re = /^\d{1,2}\/\d{1,2}\/\d{4}$/ if( re.test(value)){ var adata = value.split('/'); var gg = parseInt(adata[0],10); var mm = parseInt(adata[1],10); var = parseInt(adata[2],10); var xdata = new Date(,mm-1,gg); if ( ( xdata.getFullYear() == ) ( xdata.getMonth () == mm - 1 ) ( xdata.getDate() == gg ) ) check = true; else check = false; } else check = false; return this.optional(element) || check; }, Please enter a correct date ); From:http://jquery.bassistance.de/validate/additional-methods.js Jörn On Wed, Feb 18, 2009 at 3:25 PM, George george.bea...@googlemail.com wrote: Hi Folks, Wondered if anyone could help on this, I've been stuck on it for quite some time. I'm trying to validate a date field using a UK date, here's my code: $(document).ready(function(){ $('#arrival-arrival-date').datepicker({ minDate: new Date (),defaultDate: +1,dateFormat: 'dd/mm/yy',constrainInput: false }); $.validator.addMethod('ukdate', function(value, element) { var regex = /^(0[1-9]|[12][0-9]|3[01])[\/](0[1-9]|1[012])[\/] ((19|20)\d\d)$/; console.log(value.match(regex)); return this.optional(element) || value.match(regex); }, Please specify a UK date); // validate signup form on keyup and submit $(#theForm).validate({ debug:true, errorClass: 'redBorder', rules: { 'arrival-arrival-date': { ukdate: true}, 'arrival-stay-duration': { required: true, min: 1} }, highlight: function(element, errorClass) { $(element).fadeOut(function() { $(element).fadeIn() }) }, messages: { 'arrival-arrival-date':'', 'arrival-stay-duration':'' }, highlight: function(element, errorClass) { $(element).addClass(errorClass); }, unhighlight: function(element, errorClass) { $(element).removeClass(errorClass); }, errorPlacement: function(error, element) { error.appendTo('errorNotes'); } }); And you can see a demo of it in action at http://dev.letsbookrooms.co.uk/uk/perthshire/parklandshotel/. It works fine on IE, Opera and FF, fails in Safari for any dates where the dd part is higher than 12. I think it must be an issue with the validator plugin as I've tested the regular expression on its own in Saari and it works fine. Cheers George
[jQuery] Re: My published plugins are not appearing in the jQuery Plugin list
Just heard from someone who found me on Google, but the plugin list was not mentioned...
[jQuery] Re: autocomplete plugin with extraparams and onSelectItem
Hello MorningZ, I had tried the plugin from bassistance.de, but it has not onselecteditem or something like that. Now i have a workaround:) i modified the jquery.autocomplete.js from bassistance.de. Here my workaround: function selectCurrent() { var selected = select.selected(); if( !selected ) return false; var v = selected.result; previousValue = v; //add this from here var a2b_ort = selected.data; var nurort = a2b_ort.slice(a2b_ort.indexOf(,)); $(input#ort).val(nurort); // to here if ( options.multiple ) { var words = trimWords($input.val()); if ( words.length 1 ) { v = words.slice(0, words.length - 1).join ( options.multipleSeparator ) + options.multipleSeparator + v; } v += options.multipleSeparator; } $input.val(v); hideResultsNow(); $input.trigger(result, [selected.data, selected.value]); return true; } i hope, someone can use this in future greets, Michael On Feb 20, 4:34 pm, MorningZ morni...@gmail.com wrote: I'd guess judging by the options you list that you were looking at Jorn's plugin @ bassistance.de it does both extraParams and onSelectItem simultaneously On Feb 20, 10:08 am, flanders mdy...@gmail.com wrote: Hello Group, i need an Autocomplete Plugin for jQuery. The Plugin have to handle extraParams and a onSelectItem. i only found many plugins that can only handle extraParams OR onSelectItem! We have to build a Form like this: [country] [zip] [city] When coutry is selectet, the ajax have to give me only german zipcodes back. and when i selected a zipcode, the appendant city had automaticly fill. have anyone an idea?! greet, Michael
[jQuery] Re: Drag is very smooth on Firefox, but it is total screw on IE7!
You may get more help with this question on the jQuery UI list http://groups.google.com/group/jquery-ui Thanks. - Richard On Sun, Feb 22, 2009 at 5:58 PM, Vincent Nguyen kureik...@gmail.com wrote: I'm using jQuery UI for drag and drop and Mootol for sortable, b/c we don't use drag+drop_sort on the same element! It works very well in FF! The darging is very smooth! But in IE, it is very screw! It seems IE can parse/draw enough fast! When i dragging a item, it happens slowly. Look at this on IE7 http://www.trademerchants.com/delnow/kurei/ae/index_template.php And you will see my issue! Does anyone how to solve this? -- /* @name Quoc Vinh Nguyen @email ku...@urbanjar.info @alias Vincent Nguyen @site Axcoto.Info */
[jQuery] Re: Drag is very smooth on Firefox, but it is total screw on IE7!
wow, really very graduate on you! This is old email and i found a way to make it work well with jQuery/UI with your helping from previous email! Thanks so much! I'm following on Twitter 2009/2/23 Richard D. Worth rdwo...@gmail.com You may get more help with this question on the jQuery UI list http://groups.google.com/group/jquery-ui Thanks. - Richard On Sun, Feb 22, 2009 at 5:58 PM, Vincent Nguyen kureik...@gmail.comwrote: I'm using jQuery UI for drag and drop and Mootol for sortable, b/c we don't use drag+drop_sort on the same element! It works very well in FF! The darging is very smooth! But in IE, it is very screw! It seems IE can parse/draw enough fast! When i dragging a item, it happens slowly. Look at this on IE7 http://www.trademerchants.com/delnow/kurei/ae/index_template.php And you will see my issue! Does anyone how to solve this? -- /* @name Quoc Vinh Nguyen @email ku...@urbanjar.info @alias Vincent Nguyen @site Axcoto.Info */
[jQuery] Re: Combining jQuery validation, ajax Submit and jqUploader
I think the problem is not on serialize, because the ajax submit is working when using this function $(#RegForm).submit(function(){ var str = $(this).serialize(); $.ajax({ type: 'POST', url: 'ajax.php', data: str, success: function(msg) { if(msg == 'OK') { $('#status').html('bData Has Been Added to Database/b'); } else { $('#status').html(msg); } } }) $('form :input').val(); $('form :input[type=submit]').val(Submit); return false; }); but when i combine it with validation it doesnt work On Feb 23, 5:13 pm, tain bugi@gmail.com wrote: i forgot to add link for more details about serialize() http://docs.jquery.com/Ajax/serialize On Feb 23, 11:12 am, tain bugi@gmail.com wrote: this is what i found on jquery.documentation, Serialize requires that fields have a name attribute. Having only an id will not work. On Feb 23, 8:10 am, Andri 4r53...@gmail.com wrote: I have a form, and i want to combing jquery validation ajax Submit and jquploader. This is the script $(#RegForm).validate({ submitHandler: function(form) { jQuery(form).ajaxSubmit({ var str = $(#RegForm).serialize(); $.ajax({ type: 'POST', url: 'ajax.php', data: str, success: function(msg) { if(msg == 'OK') { $('#status').html('bData Has Been Added to Database/b'); } else { $('#status').html(msg); } } }) $('form :input').val(); $('form :input[type=submit]').val(Submit); return false; }); } }); But it got an error on = var str = $(#RegForm).serialize();\n (missing : after property id) How to solve this ?
[jQuery] invalid array length wit jquery.extend
Hello, It seems that it's not safe to use length as a nested object property if I want to use jquery.extend. Is this a know issue? $.extend(true, {},{prop:{length:-1}}); thanks, -Morgan
[jQuery] Hello world example - works in IE6; fails in firefox 3
Hi all, Any idea why this works in ie6 but not firefox? html head script type=text/javascript src=jquery.js/script script type=text/javascript $(document).ready(function() { $(a).click(function() { alert(Hello world!); }); }); /script /head body a href=#Link/a /body /html
[jQuery] Re: Hello world example - works in IE6; fails in firefox 3
What does the error console say? cheers Michael Lawson Content Tools Developer, Global Solutions, ibm.com Phone: 1-919-517-1568 Tieline: 255-1568 E-mail: mjlaw...@us.ibm.com 'Examine my teachings critically, as a gold assayer would test gold. If you find they make sense, conform to your experience, and don't harm yourself or others, only then should you accept them.' From: Adelle Hartley ade...@akemi.com.au To: jquery-en@googlegroups.com Date: 02/23/2009 09:45 AM Subject:[jQuery] Hello world example - works in IE6; fails in firefox 3 Hi all, Any idea why this works in ie6 but not firefox? html head script type=text/javascript src=jquery.js/script script type=text/javascript $(document).ready(function() { $(a).click(function() { alert(Hello world!); }); }); /script /head body a href=#Link/a /body /html inline: graycol.gifinline: ecblank.gif
[jQuery] Re: Hello world example - works in IE6; fails in firefox 3
I wrote: Hi all, Any idea why this works in ie6 but not firefox? html head script type=text/javascript src=jquery.js/script script type=text/javascript $(document).ready(function() { $(a).click(function() { alert(Hello world!); }); }); /script /head body a href=#Link/a /body /html Mystery solved: the html file was saved as UTF-16. Firefox didn't like it. Adelle.
[jQuery] Re: Get all events registered for an element
jQuery(elem).data('events'); That's an object with random keys where each key contains a function (handler). -- Ariel Flesler http://flesler.blogspot.com On Feb 23, 10:48 am, Sandesh Singh sandesh...@gmail.com wrote: Hi. As I understand, you can have custom events in jquery, like so - jQuery(elem).bind(custom, function(){}); Is there a way to see all the events an element has been registered for? -- ssshttp://sandesh247.googlepages.com Sent from: Pune Mh India.
[jQuery] Cycle: cleartype and slide captions solution no longer working with 2.52
(Please excuse my newness...I'm not sure if I need to do anything special to post code, etc.) What have I done wrong? My original need was to fix the IE7 cleartype bug on captions that I fade in used within a Cycle slideshow. It seemed that the built-in cleartype fix IN Cycle is only for text used in the slide part. So, I call another js function from a separate file if the browser is IE7 and everything was working just peachy until trying it with the latest version of Cycle [Version: 2.52 (21- FEB-2009)]. Here's the separate function in its entirety: jQuery.fn.fadeIn = function(speed, callback) { return this.animate({opacity: 'show'}, speed, function() { if (!jQuery.support.opacity) this.style.removeAttribute('filter'); if (jQuery.isFunction(callback)) callback(); }); }; jQuery.fn.fadeOut = function(speed, callback) { return this.animate({opacity: 'hide'}, speed, function() { if (!jQuery.support.opacity) this.style.removeAttribute('filter'); if (jQuery.isFunction(callback)) callback(); }); }; jQuery.fn.fadeTo = function(speed,to,callback) { return this.animate({opacity: to}, speed, function() { if (to == 1 !jQuery.support.opacity) this.style.removeAttribute('filter'); if (jQuery.isFunction(callback)) callback(); }); }; The relevant part from my jquery call for Cycle is as follows: $('#slideshow').cycle({ fx: 'shuffle', speed: 500, timeout: 4000, next: '#slideshow, #next', prev: '#prev', before: function() { $('#slideshow span').css ('display','none');}, after: function() { $('span', this).fadeIn(slow);} }); Can someone lend some assistance to this js dummy?
[jQuery] Json help adding into Object
I have some code that I need help with. I have a database with a list of abbreviations with is encoded into JSON in a PHP script, the script below pulls in that data and stores the data as objects (or thats how I want it to be). $(#load_abbr_data).click(function() { var abbrs = {} $.getJSON(jsondata.php,function(data) { $.each(data.abbr_data, function(i,get_abbr_data) { var abbr = get_abbr_data.ABBR; var desc = get_abbr_data.DESCRIPTION; var lang = get_abbr_data.LANG; abbrs = { abbr : [desc], } }); }); }); So I would like the resulting object to look like: var abbrs = { HTML : [ 'HyperText Markup Language'] , PHP: 'Personal Home Page' } But I don't think it does (or at least it only saves the last record). And have this script run: var somevar = PHP; for( var i = 0 ; i abbrs[somevar].length; i++) { var expanded = abbrs[somevar]; } alert( somevar + is short for + expanded ); But the problem is I can't get it to save as the example object. And when I run the above script nothing works. Could I please have some help in getting the JSON script working please.
[jQuery] Re: autocomplete plugin with extraparams and onSelectItem
but it has not onselecteditem or something like that sure it does, it's the .result event http://docs.jquery.com/Plugins/Autocomplete/result#handler So $(#textbox1).autocomplete( location of remote page, { extraPArams: { var1: foo } }).result(function(a, data, b) { data = + data; //Makes sure it's a string //Do something with selected value data }); so anytime something is selected from the autocomplete results, result gets fired and the 2nd parameter is the text of such selection On Feb 23, 7:07 am, flanders mdy...@gmail.com wrote: Hello MorningZ, I had tried the plugin from bassistance.de, but it has not onselecteditem or something like that. Now i have a workaround:) i modified the jquery.autocomplete.js from bassistance.de. Here my workaround: function selectCurrent() { var selected = select.selected(); if( !selected ) return false; var v = selected.result; previousValue = v; //add this from here var a2b_ort = selected.data; var nurort = a2b_ort.slice(a2b_ort.indexOf(,)); $(input#ort).val(nurort); // to here if ( options.multiple ) { var words = trimWords($input.val()); if ( words.length 1 ) { v = words.slice(0, words.length - 1).join ( options.multipleSeparator ) + options.multipleSeparator + v; } v += options.multipleSeparator; } $input.val(v); hideResultsNow(); $input.trigger(result, [selected.data, selected.value]); return true; } i hope, someone can use this in future greets, Michael On Feb 20, 4:34 pm, MorningZ morni...@gmail.com wrote: I'd guess judging by the options you list that you were looking at Jorn's plugin @ bassistance.de it does both extraParams and onSelectItem simultaneously On Feb 20, 10:08 am, flanders mdy...@gmail.com wrote: Hello Group, i need an Autocomplete Plugin for jQuery. The Plugin have to handle extraParams and a onSelectItem. i only found many plugins that can only handle extraParams OR onSelectItem! We have to build a Form like this: [country] [zip] [city] When coutry is selectet, the ajax have to give me only german zipcodes back. and when i selected a zipcode, the appendant city had automaticly fill. have anyone an idea?! greet, Michael
[jQuery] Re: Something broke in IE7
Hi guys repost of my problem since I'm not coming forward The code I wrote in jQuery: http://code-bin.homedns.org/242 Now to the problem: Please note that the behavior I want is already working fine in FF so just open it with FF to see what I created it to do. The main problem is the pulled up content ... and the format of the data after you push the community button. Without hiding: http://www.vonderdecken.net/index.php?option=com_contentview=categor... (it works perfectly in both IE7 and FF) Now starts the strange part in IE7: (This all works in FF like I expected it too) 1.) The pull up works with silverlight player, but if you push community you get a mess. Link: http://www.vonderdecken.net/ 2.) The pull up doesnt work and its hard to get a hands on of the YouTube player, which only loads in the maincontent (shows after you press community), well since the pulling up didn't work strangly the main content is perfect. (pretty much vice versa the other player) Link: http://www.vonderdecken.net/index.php?option=com_contentview=article... 3.) The gallery pulls up the back, but not the slide show. The show seems intact if you hit community but vanishes 1 sec later ... Link: http://www.vonderdecken.net/index.php?option=com_morfeoshowtask=view... I'm open to really any hints you give to solve this! I don't know what roll the jQuery functions and css plays... Oliver Prater On Feb 21, 9:49 pm, oliver.pra...@googlemail.com oliver.pra...@googlemail.com wrote: @Paul: I changed the switch to if{} statements, but got the same result so changed it back. The bug is somewhere else ... The code that does the exact same as my switch. (It works in FF just like the switch but in IE still the same bugs come up) code: --- $j(#infotainmentbox div.video).empty(); if(!(MOVIE_PLAYER === null)) { //Start movie $j(#infotainmentbox).empty().append(MOVIE_PLAYER); $j(#infotainmentbox).before('div id=infotainmentboxMenubtn2a href=# onClick=history.go(-1); onfocus=this.blur()img src=/ templates/melle4/images/goback.png title=Go Back height=29px width=189px border=0 //a/div'); } if(!(PHOTO_PLAYER === null)) { // Start gallerie $j(#infotainmentbox).empty().append(PHOTO_PLAYER); $j(#infotainmentbox).before(PHOTO_BACK); $j(#backtogallery2).hide(); } code: --- The reason I code switches like that is that it puts all the logic in one nice block, and sowhere I read that they run faster than if{} elseif{} else{} and a lot faster than a couple of if{} statements. Anyway thanks for the suggestion Oliver Prater On Feb 21, 5:23 pm, Paul Mills paul.f.mi...@gmail.com wrote: Hi Oliver, Your switch statement looks a bit strange to me - I've never coded one that way before. Try redoing it as a couple of if {} else {} statements. IE is must fussier about syntax than FF so I always check for syntax errors when IE starts misbehaving. Hope that helps. Paul On Feb 21, 1:04 pm, oliver.pra...@googlemail.com oliver.pra...@googlemail.com wrote: Thanks Carol, that at least gives me a good feeling, I'm not the only one :-) If I find any solution with my as good as none experience in jQuery, or just through pure luck I will off course not hesitate to post it. Oliver Prater On Feb 21, 12:16 am, carol carolgjenk...@hotmail.com wrote: Oliver, I am having the very same problem...the content in my greybox does not show in IE7. It's driving me nuts! Have you found a solution? Thanks! Carol On Feb 20, 3:03 pm, oliver.pra...@googlemail.com oliver.pra...@googlemail.com wrote: Hi guys after I finally got my code working in FF, IE7 is killing me! I never programed in javascript bevor so take it easy on me please. Using the DEBUGGER has helped me a lot, but now there are no more debug messages and I don't know what the hell I can do to get it work! I am guessing that my code is broken since the plugins are working great! The code I wrote in jQuery:http://code-bin.homedns.org/242 Now to the problem: Please note that the behavior I want is already working fine in FF so just open it with FF to see what I created it to do. The main problem is the pulled up content ... and the format of the data after you push the community button. Without hiding:http://www.vonderdecken.net/index.php?option=com_contentview=categor... (it works perfectly in both IE7 and FF) Now starts the strange part in IE7: (This all works in FF like I expected it too) 1.) The pull up works with silverlight player, but if you push community you get a mess. Link:http://www.vonderdecken.net/ 2.) The pull up doesnt work and its hard to get a
[jQuery] Re: Input type radio events
Hi Bruno, you need to define value attributes for your inputs fieldset pinput type=radio name=foo value=yes/yes/p pinput type=radio name=foo value=no/no/p filedset pinput type=checkbox name=value value=val1/ Value 1 /p pinput type=checkbox name=value value=val2/ Value 2 /p /fieldset input type=submit / /form /fieldset than you can do the following $(input[name='foo']).click(function() { if ( $(input[name='foo']:checked).val() == no ) { $(input[name='value']).attr(checked,); } }); by(e) Stephan 2009/2/22 Bruno brunomend...@gmail.com: Hi, I'm newbie about javascript and jquery. I would like to know how can I change values of all input type checkbox to unchecked when the user changes the values to No answer of a input type radio. The code can be the following form fieldset pinput type=radio name=foo /yes/p pinput type=radio name=foo /no/p filedset pinput type=ckeckbox name=value / Value 1 /p pinput type=ckeckbox name=value / Value 2 /p /fieldset input type=submit / /fieldset /form Thank you. Regards, Bruno.
[jQuery] $('#foo p') or $('p', $('#foo'))
I watched the John Resig presentation too and learned that CSS selectors always work from right to left. That would mean that doing this:: $('#foo p') Would extract all p tags and from that list subselect those who belong to #foo. Suppose you have 1000 p tags of them only 100 are inside #foo you'll have wasted 900 loops. Surely $('#foo') is the fastest lookup possible. Doing it this way will effectively limit the scope of the $('p') search and you will never be bothered about any p tags outside #foo. Or am I talking rubbish?
[jQuery] Re: Cycle: cleartype and slide captions solution no longer working with 2.52
What have I done wrong? My original need was to fix the IE7 cleartype bug on captions that I fade in used within a Cycle slideshow. It seemed that the built-in cleartype fix IN Cycle is only for text used in the slide part. So, I call another js function from a separate file if the browser is IE7 and everything was working just peachy until trying it with the latest version of Cycle [Version: 2.52 (21- FEB-2009)]. Here's the separate function in its entirety: What is it that isn't working, the slides or the caption? Can you post a link?
[jQuery] 1.3.1/2 selecting bug... or feature?
I've build a recursive tree. Now I'm trying to get the number of list elements but I get weirds results: $(li).length = 10; $(bodyul li).length = 4; Is this right?.. or a bug... (1.2.6 works as expected) [code] !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Strict//EN http:// www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd html xmlns=http://www.w3.org/1999/xhtml; head meta http-equiv=Content-Type content=text/html; charset=utf-8 / !--script type=text/javascript src=scripts/ jquery-1.2.6.min.js/script-- script type=text/javascript src=scripts/jquery-1.3.2.min.js/ script script type=text/javascript $(function(){ $(body).prepend($(\bodyul li\).length = +$(bodyul li).length +;br/); $(body).prepend($(\li\).length = + $(li).length +;br/ ); }); /script /head body ul li spana/span ul li spanaa/span /li li spanab/span /li li spanac/span ul li spanaca/span /li li spanacb/span /li li spanacc/span /li /ul /li /ul /li li spanb/span /li li spanc/span /li li spand/span /li /ul /body /html [/code]
[jQuery] Is it possible to override a link?
I have one link: a id=woof href=form.phpForm/a then I have: $('a#woof').click(function() { do ajax form } I've done this to make the user without javascript still able to see the form, the problem is that it follows the link even when java is enabled.. how can I avoid this? Thanks
[jQuery] Re: Is it possible to override a link?
This should be working: $('a#woof').click(function(e){ e.preventDefault(); //do ajax form }); Or you could set all href attributes to '#' before adding the click function
[jQuery] [validate]
For remote validation, please show a code of check-email.php. I did not find any example. My code: $email=$_POST['email']; $existing_mails=array('ma...@example.com','ma...@example.com'); if (in_array($email, $existing_mails)) { echo false; } else { echo true; } does not work. Can you please show just small example of php code you wrote for the demo mentioned here http://docs.jquery.com/Plugins/Validation/Methods/remote#options
[jQuery] accessing 'caller' object within post
hi all, i'm having troubles accessing the 'caller object of an ajax post for instance function A () { this.avar; } A.prototype.myFun = function() { this.avar; // no problem here $.post(url,data,callback) { this.avar; // here is the problem (a) } } a = new A; - (a) can't access to 'this' obviously, any idea how i can do that without using 'global' variables ps: i think i post a message before i finished a little while ago .. sorry about that =x
[jQuery] [validate] Remote validation
For remote validation, please show a code of check-email.php. I did not find any example. My code: $email=$_POST['email']; $existing_mails=array('ma...@example.com','ma...@example.com'); if (in_array($email, $existing_mails)) { echo false; } else { echo true; } does not work. Can you please show just small example of php code you wrote for the demo mentioned here http://docs.jquery.com/Plugins/Validation/Methods/remote#options
[jQuery] Internet Explorer Bug (Disappearing Fields)
I am running jQuery 1.2.6, and experiencing a major bug with form fields disappearing in IE 7.0.5730.11. I have fieldsets that can be collapsed (uses slideUp), and for some reason when you click into/ focus on a field, it changes position on the page/disappears. The caret moves up and to the left, and the field doesn't appear to be anywhere. I need a fix on this ASAP, and have been unsuccessful in fixing it. Please help!
[jQuery] accessing 'caller' object within post
hi all, i'm having troubles accessing the 'caller object of an ajax post for instance function A () { this.avar; } A.prototype.myFun = function() { this.avar; // no problem here } a = new A;
[jQuery] Re: $('#foo p') or $('p', $('#foo'))
On Mon, Feb 23, 2009 at 11:08 AM, Peter Bengtsson pete...@gmail.com wrote: I watched the John Resig presentation too and learned that CSS selectors always work from right to left. That would mean that doing this:: $('#foo p') Would extract all p tags and from that list subselect those who belong to #foo. Suppose you have 1000 p tags of them only 100 are inside #foo you'll have wasted 900 loops. Surely $('#foo') is the fastest lookup possible. Doing it this way will effectively limit the scope of the $('p') search and you will never be bothered about any p tags outside #foo. I'm certain you meant $('p', $('#foo')) immediately above (and I'm wondering the same thing, so thanks for asking)
[jQuery] Re: Internet Explorer Bug (Disappearing Fields)
On Mon, Feb 23, 2009 at 12:14 PM, James Finley jamesfin...@gmail.com wrote: I am running jQuery 1.2.6, and experiencing a major bug with form fields disappearing in IE 7.0.5730.11. I have fieldsets that can be collapsed (uses slideUp), and for some reason when you click into/ focus on a field, it changes position on the page/disappears. The caret moves up and to the left, and the field doesn't appear to be anywhere. I need a fix on this ASAP, and have been unsuccessful in fixing it. Please help! Does this also happen when you remove all CSS from the page? As an aside, I consider simply using IE at all to be experiencing a major bug ;-)
[jQuery] Jquery.com - UI examples down?
Hello Bit of a noddy question, but I just wanted to make sure it wasn't just at my end.. .. is the jquery.com site not working quite correctly, i.e. the examples don't work on the following pages : http://docs.jquery.com/UI/Progressbar http://docs.jquery.com/UI/Slider So - is anyone else seeing the same thing? TIA, Paul
[jQuery] Is there a way to use ScrollTo after a series of other events?
I've been looking over the ScrollTo options, and looked at SerialScroll, too, but didn't see any examples of either being used after other actions, such as: $('#test').find().fadeIn(1000).scrollTo('#test'); .or something similar. Or is there another functions I missed in the docs that will provide the same functionality? I didn't see anything I thought would work. I'm cloning a rather large section of a form for repeat entries and I want to bring the new section into view rather carefully to keep the user from getting confused by the cloning. Thanks, Rick
[jQuery] Re: Order Items. Please help me. Thank You.
Hello, I tried to make the change: levels.each(function(){ levelsCsv.push({'text':this.value,'value':$(this).next().text()}) }) But I get an error on Firebug: levels.each is not a function Am I doing something wrong? I also made a change on buildThemesList to use text and also to fix the problem on your code that adds e only when there are 3 items. It should be also applied when there are 2: $.each(themes,function(i,t){ var li = $('li').addClass('Themes').html(t[0].text+'br /' +friendlyLevels(t[1].text)+'br /' +(t[2]==''?'':t[2]+'br /') +'a href=#Remove class=RemoveRemover/a' ).appendTo(ol); function friendlyLevels(levels) { if (levels.length 2) return levels.join(''); var first = levels.slice(0, -1), last = levels.slice(-1); var friendly = first.join(', '); if (last) { friendly += ' e ' + last; } return friendly; } I am not completely sure that I am doing this right because I get the error before. Thank You, Miguel On Feb 20, 5:02 pm, mkmanning michaell...@gmail.com wrote: levels.text = $('input[name=Levels]:checked + label'); levels.value = $('input[name=Levels]:checked'); Those don't get you the right values for the levels object, they both return a jQuery object. Accessing the levels object as this.value won't work either. Try this: levels.each(function(){ levelsCsv.push({'text':this.value,'value':$(this).next().text()}) }) On Feb 20, 5:22 am, shapper mdmo...@gmail.com wrote: Hi, I followed your tips but I still have a few problems. The subject is working fine but when I do the same to the levels it does not work. I think the problem, but I am not sure, is in: levels.each(function(){ levelCsv.push(this.value);//array to hold the levels }); I changed everything else. I updated my example:http://www.27lamps.com/Beta/List/List3.html Other problem I notice is that when two levels are added the word e is not added between the both. Only when 3 levels are added. On my first example I had a function that was doing it:http://www.27lamps.com/Beta/List/List.html I just don't know how to integrate this on your code. I don't need to use my FriendlyLevels example. I just need to have the e every time there is more then 1 level. How can I do it? Thank You, Miguel - The subject is working fine. - On Feb 20, 1:50 am, mkmanning michaell...@gmail.com wrote: You could modify the subject variable being put into the array to make it an object: subject = {} then add the option's value and text to it: subject.value = $('#Subject option:selected').val(); subject.text = $('#Subject option:selected').text(); or in one line to replace what's there now: subject = {'text':$('#Subject option:selected').text(),'value':$ ('#Subject option:selected').val()} then put it in the array the same way: temptheme.push(subject) To access it later when rebuilding just get the attributes of the object: var li = $('li').addClass('Themes').html(t[0].text+'br /' etc... for the display $('input').attr({'type':'hidden','name':'Themes['+i+'].Subject'}).val (t[0].value).appendTo(li); etc for the value Use the same object structure for storing the checkbox names/values On Feb 19, 4:36 pm, shapper mdmo...@gmail.com wrote: Hi Michaell, Sorry for the delay but when I started using JQuery 1.3 I solved this problem but I got a few others on my application. Anyway, there is just something else that I am not able to solve. When I add a theme I need to: 1. For the Select (Subject), add the selected value to hidden input but the text to the visible text. 2. For the CheckBoxes (Levels) add LevelsCsv (formed with values) to the hidden inputs. But the visible text should use the text in the labels associated to which check box ... I had something like that in my code: 1. For the subject I add something like: $subject = $('#Subject option:selected'); $theme.append($subject.text()).append('br /'); And on the hidden input I was using $subject.val() 2. For the levels I was using: $levelsTexts = $('input[name=Levels]:checked + label'); $levelsValues = $('input[name=Levels]:checked'); So the text goes into the visible part of the theme and the value goes to the hidden inputs. See? I have been trying to add this to your code but I haven't be able. I added a new version of the List where the values and texts are different in the Select. And where each CheckBox has the associated label with the text in it. http://www.27lamps.com/Beta/List/List3.html Could you, please, help me out? Thank You, Miguel On Feb 18, 5:33 pm, mkmanning michaell...@gmail.com wrote: The problem is with the version of jQuery you're using. Update to
[jQuery] Re: Remote validation
Error found: echo false; } else { echo true; } Do not response with boolean, string is expected. On 23 Feb., 18:13, Sonya ayson...@googlemail.com wrote: For remote validation, please show a code of check-email.php. I did not find any example. My code: $email=$_POST['email']; $existing_mails=array('ma...@example.com','ma...@example.com'); if (in_array($email, $existing_mails)) { echo false; } else { echo true; } does not work. Can you please show just small example of php code you wrote for the demo mentioned herehttp://docs.jquery.com/Plugins/Validation/Methods/remote#options
[jQuery] Re: Order Items. Please help me. Thank You.
P.S: I updated my example as usually: http://www.27lamps.com/Beta/List/List3.html On Feb 20, 5:02 pm, mkmanning michaell...@gmail.com wrote: levels.text = $('input[name=Levels]:checked + label'); levels.value = $('input[name=Levels]:checked'); Those don't get you the right values for the levels object, they both return a jQuery object. Accessing the levels object as this.value won't work either. Try this: levels.each(function(){ levelsCsv.push({'text':this.value,'value':$(this).next().text()}) }) On Feb 20, 5:22 am, shapper mdmo...@gmail.com wrote: Hi, I followed your tips but I still have a few problems. The subject is working fine but when I do the same to the levels it does not work. I think the problem, but I am not sure, is in: levels.each(function(){ levelCsv.push(this.value);//array to hold the levels }); I changed everything else. I updated my example:http://www.27lamps.com/Beta/List/List3.html Other problem I notice is that when two levels are added the word e is not added between the both. Only when 3 levels are added. On my first example I had a function that was doing it:http://www.27lamps.com/Beta/List/List.html I just don't know how to integrate this on your code. I don't need to use my FriendlyLevels example. I just need to have the e every time there is more then 1 level. How can I do it? Thank You, Miguel - The subject is working fine. - On Feb 20, 1:50 am, mkmanning michaell...@gmail.com wrote: You could modify the subject variable being put into the array to make it an object: subject = {} then add the option's value and text to it: subject.value = $('#Subject option:selected').val(); subject.text = $('#Subject option:selected').text(); or in one line to replace what's there now: subject = {'text':$('#Subject option:selected').text(),'value':$ ('#Subject option:selected').val()} then put it in the array the same way: temptheme.push(subject) To access it later when rebuilding just get the attributes of the object: var li = $('li').addClass('Themes').html(t[0].text+'br /' etc... for the display $('input').attr({'type':'hidden','name':'Themes['+i+'].Subject'}).val (t[0].value).appendTo(li); etc for the value Use the same object structure for storing the checkbox names/values On Feb 19, 4:36 pm, shapper mdmo...@gmail.com wrote: Hi Michaell, Sorry for the delay but when I started using JQuery 1.3 I solved this problem but I got a few others on my application. Anyway, there is just something else that I am not able to solve. When I add a theme I need to: 1. For the Select (Subject), add the selected value to hidden input but the text to the visible text. 2. For the CheckBoxes (Levels) add LevelsCsv (formed with values) to the hidden inputs. But the visible text should use the text in the labels associated to which check box ... I had something like that in my code: 1. For the subject I add something like: $subject = $('#Subject option:selected'); $theme.append($subject.text()).append('br /'); And on the hidden input I was using $subject.val() 2. For the levels I was using: $levelsTexts = $('input[name=Levels]:checked + label'); $levelsValues = $('input[name=Levels]:checked'); So the text goes into the visible part of the theme and the value goes to the hidden inputs. See? I have been trying to add this to your code but I haven't be able. I added a new version of the List where the values and texts are different in the Select. And where each CheckBox has the associated label with the text in it. http://www.27lamps.com/Beta/List/List3.html Could you, please, help me out? Thank You, Miguel On Feb 18, 5:33 pm, mkmanning michaell...@gmail.com wrote: The problem is with the version of jQuery you're using. Update to 1.3 (and don't include a space in the URI). Try your code with the Google js api and it will work (I just did, even with the duplicate jQuery wrapper functions). On Feb 18, 9:28 am, shapper mdmo...@gmail.com wrote: Yes, I tried that to but the problem persists. I updated the new version:http://www.27lamps.com/Beta/List/List2.html I am able to add 1 theme to the list ... Then all the other themes I add are not added to the list ... But I think they are being added to the themes array. The index also does not change ... ... But the index input is on the Html code. I just can't find the problem. Thanks, Miguel On Feb 18, 5:21 pm, mkmanning michaell...@gmail.com wrote: if you're using the ready function, remove the inner (function($) { ... })(jQuery); wrapper On Feb 18, 9:13 am, shapper mdmo...@gmail.com wrote: Hi, I would like to
[jQuery] Re: Internet Explorer Bug (Disappearing Fields)
It's a major bug because this Javascript is in a corporate project management system, with some 200+ users. IE is a bug of it's own, but since everyone is using it here, I have to deal. Now I just replicated the same glitch in IE 7.0.5730.13. The field appears to still exist, but has been shifted out of it's spot on the page. Honestly I do not know how to disable CSS in IE. On Feb 23, 11:27 am, brian bally.z...@gmail.com wrote: On Mon, Feb 23, 2009 at 12:14 PM, James Finley jamesfin...@gmail.com wrote: I am running jQuery 1.2.6, and experiencing a major bug with form fields disappearing in IE 7.0.5730.11. I have fieldsets that can be collapsed (uses slideUp), and for some reason when you click into/ focus on a field, it changes position on the page/disappears. The caret moves up and to the left, and the field doesn't appear to be anywhere. I need a fix on this ASAP, and have been unsuccessful in fixing it. Please help! Does this also happen when you remove all CSS from the page? As an aside, I consider simply using IE at all to be experiencing a major bug ;-)
[jQuery] Horizontal animation works on F.F. IE7. Fails on IE6
Hi, Horizontal animation of an element works on F.F. IE7. It fails to work on IE6? Example: From: http://codesolv.net/se-update/library-slide.html Click on any radio button under Form factors heading. An element slides open. This can be closed by the top right close button. Works on F.F./IE7. Any suggegstions for a fix for IE6? Thankyou, ab2qik
[jQuery] Re: Internet Explorer Bug (Disappearing Fields)
Be careful! I encounter some same issue in past! It's more simple than i think! I made some typo and forget to close some html tag, that leads some fields disappear! That's is my exp! Wonder that you try to check all html close and open correctly! 2009/2/23 James Finley jamesfin...@gmail.com It's a major bug because this Javascript is in a corporate project management system, with some 200+ users. IE is a bug of it's own, but since everyone is using it here, I have to deal. Now I just replicated the same glitch in IE 7.0.5730.13. The field appears to still exist, but has been shifted out of it's spot on the page. Honestly I do not know how to disable CSS in IE. On Feb 23, 11:27 am, brian bally.z...@gmail.com wrote: On Mon, Feb 23, 2009 at 12:14 PM, James Finley jamesfin...@gmail.com wrote: I am running jQuery 1.2.6, and experiencing a major bug with form fields disappearing in IE 7.0.5730.11. I have fieldsets that can be collapsed (uses slideUp), and for some reason when you click into/ focus on a field, it changes position on the page/disappears. The caret moves up and to the left, and the field doesn't appear to be anywhere. I need a fix on this ASAP, and have been unsuccessful in fixing it. Please help! Does this also happen when you remove all CSS from the page? As an aside, I consider simply using IE at all to be experiencing a major bug ;-)
[jQuery] Re: My published plugins are not appearing in the jQuery Plugin list
Hmm. I just took a look at your Form Highlight plugin. I'm guessing that it's not showing up in the list because you don't have any published releases for it: http://plugins.jquery.com/node/2736/release --Karl Karl Swedberg www.englishrules.com www.learningjquery.com On Feb 19, 2009, at 10:50 AM, Dave Stewart wrote: I've had two of my jQuery plugins published for a while now (more than a year) on teh jQuery site, with backup doumentation and demoes on my own site. http://plugins.jquery.com/project/form-highlight http://plugins.jquery.com/project/Populate However - they don't appear to show up in the plugins lists: http://plugins.jquery.com/project/Plugins/category/20?page=1 (Form Highlight should be here) http://plugins.jquery.com/project/Plugins/category/20?page=2 (Populate should be here) Any ideas? Thanks, Dave
[jQuery] Re: Internet Explorer Bug (Disappearing Fields)
It is not that. I just ran the validator, and it is mostly clean. The issues that do exist are very minor. On Feb 23, 11:48 am, Vincent Nguyen kureik...@gmail.com wrote: Be careful! I encounter some same issue in past! It's more simple than i think! I made some typo and forget to close some html tag, that leads some fields disappear! That's is my exp! Wonder that you try to check all html close and open correctly! 2009/2/23 James Finley jamesfin...@gmail.com It's a major bug because this Javascript is in a corporate project management system, with some 200+ users. IE is a bug of it's own, but since everyone is using it here, I have to deal. Now I just replicated the same glitch in IE 7.0.5730.13. The field appears to still exist, but has been shifted out of it's spot on the page. Honestly I do not know how to disable CSS in IE. On Feb 23, 11:27 am, brian bally.z...@gmail.com wrote: On Mon, Feb 23, 2009 at 12:14 PM, James Finley jamesfin...@gmail.com wrote: I am running jQuery 1.2.6, and experiencing a major bug with form fields disappearing in IE 7.0.5730.11. I have fieldsets that can be collapsed (uses slideUp), and for some reason when you click into/ focus on a field, it changes position on the page/disappears. The caret moves up and to the left, and the field doesn't appear to be anywhere. I need a fix on this ASAP, and have been unsuccessful in fixing it. Please help! Does this also happen when you remove all CSS from the page? As an aside, I consider simply using IE at all to be experiencing a major bug ;-)
[jQuery] preventing redirection when opening modal dialog box
hi, I have this snippet which works fine in Firefox but not in IE6/7. Somehow in IE instead of opening the modal dialog box, it gets posted to the submit page when the button with btnAddSession Id gets clicked. $(#btnAddSession).click(function(){ $(#addproductsForm).dialog(open); return false; }); FYI: I also tried converting from button to link. It works in IE but it throws a javascript error on click. Thanks in advance.
[jQuery] Re: Internet Explorer Bug (Disappearing Fields)
On Mon, Feb 23, 2009 at 12:43 PM, James Finley jamesfin...@gmail.com wrote: It's a major bug because this Javascript is in a corporate project management system, with some 200+ users. IE is a bug of it's own, but since everyone is using it here, I have to deal. Now I just replicated the same glitch in IE 7.0.5730.13. The field appears to still exist, but has been shifted out of it's spot on the page. Honestly I do not know how to disable CSS in IE. Just remove the CSS links to test. Also, is the page rendering in quirks mode? You say that it mostly validates but that's a very relative statement.
[jQuery] Stopping emails
Hi I currently get all the posts to this group sent to me by email, but not because I am a member of the Google group (I must have signed up to the emails before the group was set up). I have tried joinng the group, changing the settings and unsubscribing, but all to no avail: the emails keep coming. Please can anyone tell me how to unsubscribe to the email feed? Alan
[jQuery] forcing ajax request to stop
Hey, I'm looking for a way to force some known running ajax requests to stop before initiating another call.. I'm using the jQuery.ajax global events to monitor the active requests.. but in the jQuery docs, i was unable to find a method of forcing a processing request to actually stop... For example, in this case, if someone starts a search request.. but then changes there mind and wants to submit different request, I want the currently processing search request to be forced to stop before allowing the second search to be sent to my back end The only way i can see this happening, is to build into my backend request a method of recieving a stop message, and then abborting the back end call, thus forcing the request to stop.. Does anyone know of a way of doing this with just jQuery or perhaps the XHR object?
[jQuery] Re: Stopping emails
I just changed your setting to 'No Email'. --John On Mon, Feb 23, 2009 at 1:15 PM, Alan Williams a...@ralentango.co.uk wrote: Hi I currently get all the posts to this group sent to me by email, but not because I am a member of the Google group (I must have signed up to the emails before the group was set up). I have tried joinng the group, changing the settings and unsubscribing, but all to no avail: the emails keep coming. Please can anyone tell me how to unsubscribe to the email feed? Alan
[jQuery] Re: [ListNav] Solution to a severe performance problems with jQuery/ListNav and the Blueprint CSS framework
Bob, I have a new rev of listnav (hoping to release this week). Do you want to try this rev and see what happens? If so, let me know and I'll get it to you. Thanks, Jack
[jQuery] Re: [listnav] in Chrome
Hi, I have a new rev of the listnav plugin almost ready for release. Do you want to give it a try and let me know if the issue has been resolved? If so, let me know and I'll get a copy to you. Thanks, Jack simshaun wrote: Using jQuery 1.3.1, This question refers to the ListNav plugin found here: http://www.ihwy.com/Labs/jquery-listnav-plugin.aspx I've got a fairly large dataset on my page consisting of ~1000 LI elements. Each letter of the alphabet contains ~40 LI elements. Each LI element contains a varying amount of chars, but lets say ~70 chars. In FF3, it takes about 3-4 seconds for the plugin to index the list. In IE7, it takes about 1 second. In IE6, it takes about 1 second. In Safari 3.1 Google Chrome, it takes about 14 seconds. Why does it take so long in Safari 3.1 Google Chrome? URL for testing: http://www.simshaun.com/listnav.php
[jQuery] jQuery.Form and url
This function runs correctly: function authentication() { $('#myForm').ajaxSubmit( { type:'POST', url:'login.php', success: function(reponse,status) { }, error: function(requete,iderror) {} }); return false; } But not this one: function authentication() { $('#myForm').ajaxSubmit( { type:'POST', url:'myFolder/login.php', success: function(reponse,status) { }, error: function(requete,iderror) {} }); return false; } Why ?
[jQuery] Re: Internet Explorer Bug (Disappearing Fields)
I am using XHTML 1.0 Strict, so not quirks mode. The errors that exist on the page are from checked=true and because of a few spaces in ids. I just checked with the CSS turned off, and I cannot replicate the issue. On Feb 23, 12:11 pm, brian bally.z...@gmail.com wrote: On Mon, Feb 23, 2009 at 12:43 PM, James Finley jamesfin...@gmail.com wrote: It's a major bug because this Javascript is in a corporate project management system, with some 200+ users. IE is a bug of it's own, but since everyone is using it here, I have to deal. Now I just replicated the same glitch in IE 7.0.5730.13. The field appears to still exist, but has been shifted out of it's spot on the page. Honestly I do not know how to disable CSS in IE. Just remove the CSS links to test. Also, is the page rendering in quirks mode? You say that it mostly validates but that's a very relative statement.
[jQuery] Re: jQuery.Form and url
This function runs correctly: function authentication() { $('#myForm').ajaxSubmit( { type:'POST', url:'login.php', success: function(reponse,status) { }, error: function(requete,iderror) { } }); return false; } But not this one: function authentication() { $('#myForm').ajaxSubmit( { type:'POST', url:'myFolder/login.php', success: function(reponse,status) { }, error: function(requete,iderror) { } }); return false; } Why ? What exactly do you mean? Are you saying there is no post request sent to myFolder/login.php? What does Firebug say? Can you post a link?
[jQuery] Re: jQuery.Form and url
What specifically is not working correctly? Maybe the filepath 'myFolder/login.php' could not be found? Is it not returning anything? Use Firebug for Firefox to help debug AJAX issues. On Feb 23, 8:36 am, phicarre gam...@bluewin.ch wrote: This function runs correctly: function authentication() { $('#myForm').ajaxSubmit( { type:'POST', url:'login.php', success: function(reponse,status) { }, error: function(requete,iderror) { } }); return false; } But not this one: function authentication() { $('#myForm').ajaxSubmit( { type:'POST', url:'myFolder/login.php', success: function(reponse,status) { }, error: function(requete,iderror) { } }); return false; } Why ?
[jQuery] Re: Internet Explorer Bug (Disappearing Fields)
On Mon, Feb 23, 2009 at 1:53 PM, James Finley jamesfin...@gmail.com wrote: I am using XHTML 1.0 Strict, so not quirks mode. But, if the page doesn't validate for some reason, the browser will shift to quirks mode. Simply providing a DOCTYPE doesn't guaerantee which mode the page will be displayed in.
[jQuery] Re: preventing redirection when opening modal dialog box
Without seeing the page, it's a little hard to guess, but is it possible that you have more than one element with either an id or a name of btnAddSession? --Karl Karl Swedberg www.englishrules.com www.learningjquery.com On Feb 23, 2009, at 12:56 PM, bittermonkey wrote: hi, I have this snippet which works fine in Firefox but not in IE6/7. Somehow in IE instead of opening the modal dialog box, it gets posted to the submit page when the button with btnAddSession Id gets clicked. $(#btnAddSession).click(function(){ $(#addproductsForm).dialog(open); return false; }); FYI: I also tried converting from button to link. It works in IE but it throws a javascript error on click. Thanks in advance.
[jQuery] Re: Is there a way to use ScrollTo after a series of other events?
Maybe you want to use a callback for the fadeIn, such that after the fadeIn is done, the scrollTo will be called: $('#test').find().fadeIn(1000, function() { $.scrollTo('#test'); }); something like that. I don't remember the exact syntax for scrollTo at this moment. On Feb 23, 7:34 am, Rick Faircloth r...@whitestonemedia.com wrote: I've been looking over the ScrollTo options, and looked at SerialScroll, too, but didn't see any examples of either being used after other actions, such as: $('#test').find().fadeIn(1000).scrollTo('#test'); .or something similar. Or is there another functions I missed in the docs that will provide the same functionality? I didn't see anything I thought would work. I'm cloning a rather large section of a form for repeat entries and I want to bring the new section into view rather carefully to keep the user from getting confused by the cloning. Thanks, Rick
[jQuery] failing miserably in IE
I'm not sure where to even start with this. I've got a page with a ton of scripts that I've basically copied from one of my other pages (which works fine in IE). Of course, some of the scripts have changed, but I've got strange things failing everywhere. The common errors I was getting an 'undefined error in jquery-1.3.1.js' error, and i pinned it down to this bit of code [code] $('span#datePickers').DatePicker({ flat: true, date: Date(), current: multiCalDate(), calendars: 3, mode: 'range', starts: 1, onChange: function(formated, dates){ var theseDates = dates.toString(); var splitRange= theseDates.split(','); var firstRSplit=splitRange[0].split(' '); var firstRange = [ firstRSplit[0], firstRSplit[1], firstRSplit[2], firstRSplit[3].length == 4 ? firstRSplit[3] : firstRSplit [5], '' ].join(' '); var secondRSplit=splitRange[1].split(' '); var secondRange = [ secondRSplit[0], secondRSplit[1], secondRSplit[2], secondRSplit[3].length == 4 ? secondRSplit[3] : secondRSplit [5], '' ].join(' '); if(firstRange==secondRange){ var dateRange=firstRange; } else { var dateRange = firstRange+' to '+secondRange; } jQuery('.updateDate').html(dateRange); jQuery('.updateDate').attr('id',formated) } }); [/code] again, i don't know why this is, and this code works without issue. So I removed this bit of code, and now I can get the page to load, but my trying to make an ajax request with [code] jQuery('div#holdShows ul.showList').livequery(function(){ jQuery.ajax({ type: GET, url: processes/formatShows.php, data: output=genre=+genre+numDays=+numDays +numResults=+numResults+date=+toDate+dateRange=+dateRange +range=+range+lat=+lat+long=+long, success: function(response){ alert(response); jQuery('div#holdShows ul.showList').html(response); } }); }); [/code] does not launch the alerts, at all. Of course, running this page in FF or Chrome results in no errors and everything runs smoothly. I've been at this for days trying to get it to work. Please, please, please!!! How would you go about working through this? I'm using debugbar in IE for debugging. I'm on Vista Home version, so the debugging tools are limited. Thanks, Pete
[jQuery] Re: Is there a way to use ScrollTo after a series of other events?
Thanks for the reply, James. I finally did get something working. Rick -Original Message- From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On Behalf Of James Sent: Monday, February 23, 2009 2:04 PM To: jQuery (English) Subject: [jQuery] Re: Is there a way to use ScrollTo after a series of other events? Maybe you want to use a callback for the fadeIn, such that after the fadeIn is done, the scrollTo will be called: $('#test').find().fadeIn(1000, function() { $.scrollTo('#test'); }); something like that. I don't remember the exact syntax for scrollTo at this moment. On Feb 23, 7:34 am, Rick Faircloth r...@whitestonemedia.com wrote: I've been looking over the ScrollTo options, and looked at SerialScroll, too, but didn't see any examples of either being used after other actions, such as: $('#test').find().fadeIn(1000).scrollTo('#test'); .or something similar. Or is there another functions I missed in the docs that will provide the same functionality? I didn't see anything I thought would work. I'm cloning a rather large section of a form for repeat entries and I want to bring the new section into view rather carefully to keep the user from getting confused by the cloning. Thanks, Rick
[jQuery] Re: failing miserably in IE
It's hard to tell without a test page. I think you should work from bottom up, even if you think it should all be working properly together. Make sure that jQuery library is working correctly and one- by-one add in the other things. Make sure that all your links to external Javascript/CSS files are not broken. On Feb 23, 9:14 am, pedalpete p...@hearwhere.com wrote: I'm not sure where to even start with this. I've got a page with a ton of scripts that I've basically copied from one of my other pages (which works fine in IE). Of course, some of the scripts have changed, but I've got strange things failing everywhere. The common errors I was getting an 'undefined error in jquery-1.3.1.js' error, and i pinned it down to this bit of code [code] $('span#datePickers').DatePicker({ flat: true, date: Date(), current: multiCalDate(), calendars: 3, mode: 'range', starts: 1, onChange: function(formated, dates){ var theseDates = dates.toString(); var splitRange= theseDates.split(','); var firstRSplit=splitRange[0].split(' '); var firstRange = [ firstRSplit[0], firstRSplit[1], firstRSplit[2], firstRSplit[3].length == 4 ? firstRSplit[3] : firstRSplit [5], '' ].join(' '); var secondRSplit=splitRange[1].split(' '); var secondRange = [ secondRSplit[0], secondRSplit[1], secondRSplit[2], secondRSplit[3].length == 4 ? secondRSplit[3] : secondRSplit [5], '' ].join(' '); if(firstRange==secondRange){ var dateRange=firstRange; } else { var dateRange = firstRange+' to '+secondRange; } jQuery('.updateDate').html(dateRange); jQuery('.updateDate').attr('id',formated) }}); [/code] again, i don't know why this is, and this code works without issue. So I removed this bit of code, and now I can get the page to load, but my trying to make an ajax request with [code] jQuery('div#holdShows ul.showList').livequery(function(){ jQuery.ajax({ type: GET, url: processes/formatShows.php, data: output=genre=+genre+numDays=+numDays +numResults=+numResults+date=+toDate+dateRange=+dateRange +range=+range+lat=+lat+long=+long, success: function(response){ alert(response); jQuery('div#holdShows ul.showList').html(response); } }); }); [/code] does not launch the alerts, at all. Of course, running this page in FF or Chrome results in no errors and everything runs smoothly. I've been at this for days trying to get it to work. Please, please, please!!! How would you go about working through this? I'm using debugbar in IE for debugging. I'm on Vista Home version, so the debugging tools are limited. Thanks, Pete
[jQuery] Re: Cycle: cleartype and slide captions solution no longer working with 2.52
Hiya. Love Cycle!! You should be knighted or something! With version 2.52, the cleartype fix I was implementing separately for IE7 captions no longer works. Consequently, when each caption fades in in IE7, the text is all yucky/jaggedy. Alas, I can't post a link because the site is under development.
[jQuery] Re: Jquery.com - UI examples down?
It's not just you. I was doing some work on the jQuery UI Docs templates. Seems I botched the demos. Thanks for the note. I'll take a look. - Richard On Mon, Feb 23, 2009 at 12:28 PM, Paul Hutson hutsonphu...@googlemail.comwrote: Hello Bit of a noddy question, but I just wanted to make sure it wasn't just at my end.. .. is the jquery.com site not working quite correctly, i.e. the examples don't work on the following pages : http://docs.jquery.com/UI/Progressbar http://docs.jquery.com/UI/Slider So - is anyone else seeing the same thing? TIA, Paul
[jQuery] Re: preventing redirection when opening modal dialog box
No Karl. I checked it and there's no duplicate. Here's the html code: - h3Products/h3 !-- Placeholder for ajax results -- div id=mainproducts/div input type=submit name=btnAddSession value=Add Session id=btnAddSession / !-- Placeholder for the insert form -- div id=addproductsForm class=insertForm ul li labelProduct Name:/label input name=txtProductName type=text id=txtProductName / /li li labelProduct Price:/label input name=txtProductPrice type=text id=txtProductPrice / /li li labelnbsp;/label input type=submit name=btnAddProduct value=Add Product id=btnAddProduct / /li /ul /div - Here is the form tag to give you more idea for reference: - form name=form1 method=post action=EventSetupRequestForm.aspx id=form1 - So after clicking button#btnAddSession, div#addproductsForm should popup as a modal dialog box. Thanks again. On Feb 23, 2:01 pm, Karl Swedberg k...@englishrules.com wrote: Without seeing the page, it's a little hard to guess, but is it possible that you have more than one element with either an id or a name of btnAddSession? --Karl Karl Swedbergwww.englishrules.comwww.learningjquery.com On Feb 23, 2009, at 12:56 PM, bittermonkey wrote: hi, I have this snippet which works fine in Firefox but not in IE6/7. Somehow in IE instead of opening the modal dialog box, it gets posted to the submit page when the button with btnAddSession Id gets clicked. $(#btnAddSession).click(function(){ $(#addproductsForm).dialog(open); return false; }); FYI: I also tried converting from button to link. It works in IE but it throws a javascript error on click. Thanks in advance.
[jQuery] Re: 1.3.1/2 selecting bug... or feature?
Looks like a bug to me. In this case it seems like doing just li would be equivalent to what you want. Could you file it here? http://dev.jquery.com/newticket --John On Mon, Feb 23, 2009 at 11:43 AM, Sjeiti sje...@gmail.com wrote: I've build a recursive tree. Now I'm trying to get the number of list elements but I get weirds results: $(li).length = 10; $(bodyul li).length = 4; Is this right?.. or a bug... (1.2.6 works as expected) [code] !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Strict//EN http:// www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd html xmlns=http://www.w3.org/1999/xhtml; head meta http-equiv=Content-Type content=text/html; charset=utf-8 / !--script type=text/javascript src=scripts/ jquery-1.2.6.min.js/script-- script type=text/javascript src=scripts/jquery-1.3.2.min.js/ script script type=text/javascript $(function(){ $(body).prepend($(\bodyul li\).length = +$(bodyul li).length +;br/); $(body).prepend($(\li\).length = + $(li).length +;br/ ); }); /script /head body ul li spana/span ul li spanaa/span /li li spanab/span /li li spanac/span ul li spanaca/span /li li spanacb/span /li li spanacc/span /li /ul /li /ul /li li spanb/span /li li spanc/span /li li spand/span /li /ul /body /html [/code]
[jQuery] Re: Is it possible to override a link?
There are a couple of options, depending on your needs. $('a#woof').click(function(e){ e.preventDefault(); //do ajax form }); $('a#woof').click(function(e){ //do ajax form return false; // preventDefault and stopPropagation }); On Feb 23, 9:12 am, Frederik Ring frederik.r...@gmail.com wrote: This should be working: $('a#woof').click(function(e){ e.preventDefault(); //do ajax form }); Or you could set all href attributes to '#' before adding the click function
[jQuery] Selecting dynamically created elements
I'm creating img elements dynamically like this: $('img src=images/pic.jpg alt=).appendTo(#table); Later on, if I create a wrapped set $('img'), dynamically created images are not in it. I guess that's the way jQuery works, but can I do something to wrap newly created elements that are not in HTML?
[jQuery] Re: failing miserably in IE
Thanks James, that's actually how I got to the point of discovering where the broken bits were. I removed the javascript line by line until i got the errors to stop showing up. Unfortunately I'm getting to the point where there is so little on the page that it isn't even remotely resembling the original functions, and even now the simplest stuff is still not working. I've checked that all the libraries and packages are loading properly, and as I said, this is only a problem in IE. FF and Chrome work perfectly, so if it were a problem with the packages directly you'd think that FF and Chrome wouldn't work. I'll hopefully get to have a live page going later this week, but I was hoping their is a solution I could use today. On Feb 23, 11:31 am, James james.gp@gmail.com wrote: It's hard to tell without a test page. I think you should work from bottom up, even if you think it should all be working properly together. Make sure that jQuery library is working correctly and one- by-one add in the other things. Make sure that all your links to external Javascript/CSS files are not broken. On Feb 23, 9:14 am, pedalpete p...@hearwhere.com wrote: I'm not sure where to even start with this. I've got a page with a ton of scripts that I've basically copied from one of my other pages (which works fine in IE). Of course, some of the scripts have changed, but I've got strange things failing everywhere. The common errors I was getting an 'undefined error in jquery-1.3.1.js' error, and i pinned it down to this bit of code [code] $('span#datePickers').DatePicker({ flat: true, date: Date(), current: multiCalDate(), calendars: 3, mode: 'range', starts: 1, onChange: function(formated, dates){ var theseDates = dates.toString(); var splitRange= theseDates.split(','); var firstRSplit=splitRange[0].split(' '); var firstRange = [ firstRSplit[0], firstRSplit[1], firstRSplit[2], firstRSplit[3].length == 4 ? firstRSplit[3] : firstRSplit [5], '' ].join(' '); var secondRSplit=splitRange[1].split(' '); var secondRange = [ secondRSplit[0], secondRSplit[1], secondRSplit[2], secondRSplit[3].length == 4 ? secondRSplit[3] : secondRSplit [5], '' ].join(' '); if(firstRange==secondRange){ var dateRange=firstRange; } else { var dateRange = firstRange+' to '+secondRange; } jQuery('.updateDate').html(dateRange); jQuery('.updateDate').attr('id',formated) }}); [/code] again, i don't know why this is, and this code works without issue. So I removed this bit of code, and now I can get the page to load, but my trying to make an ajax request with [code] jQuery('div#holdShows ul.showList').livequery(function(){ jQuery.ajax({ type: GET, url: processes/formatShows.php, data: output=genre=+genre+numDays=+numDays +numResults=+numResults+date=+toDate+dateRange=+dateRange +range=+range+lat=+lat+long=+long, success: function(response){ alert(response); jQuery('div#holdShows ul.showList').html(response); } }); }); [/code] does not launch the alerts, at all. Of course, running this page in FF or Chrome results in no errors and everything runs smoothly. I've been at this for days trying to get it to work. Please, please, please!!! How would you go about working through this? I'm using debugbar in IE for debugging. I'm on Vista Home version, so the debugging tools are limited. Thanks, Pete
[jQuery] Re: Jquery.com - UI examples down?
All fixed. - Richard On Mon, Feb 23, 2009 at 2:47 PM, Richard D. Worth rdwo...@gmail.com wrote: It's not just you. I was doing some work on the jQuery UI Docs templates. Seems I botched the demos. Thanks for the note. I'll take a look. - Richard On Mon, Feb 23, 2009 at 12:28 PM, Paul Hutson hutsonphu...@googlemail.com wrote: Hello Bit of a noddy question, but I just wanted to make sure it wasn't just at my end.. .. is the jquery.com site not working quite correctly, i.e. the examples don't work on the following pages : http://docs.jquery.com/UI/Progressbar http://docs.jquery.com/UI/Slider So - is anyone else seeing the same thing? TIA, Paul
[jQuery] Re: Selecting dynamically created elements
Usually you should be able do what you are trying to do. To me it sounds as if you are trying to select the dynamically created content before you created it (on $(document).ready for example). How and when are trying to get the $('img')-selection? On Feb 23, 8:55 pm, Petar pta...@gmail.com wrote: I'm creating img elements dynamically like this: $('img src=images/pic.jpg alt=).appendTo(#table); Later on, if I create a wrapped set $('img'), dynamically created images are not in it. I guess that's the way jQuery works, but can I do something to wrap newly created elements that are not in HTML?
[jQuery] Re: Selecting dynamically created elements
By the way (although I do not think it causes the problem) you are missing a ' there. Should be: $('img src=images/pic.jpg alt=').appendTo(#table); instead. On Feb 23, 9:07 pm, Frederik Ring frederik.r...@gmail.com wrote: Usually you should be able do what you are trying to do. To me it sounds as if you are trying to select the dynamically created content before you created it (on $(document).ready for example). How and when are trying to get the $('img')-selection? On Feb 23, 8:55 pm, Petar pta...@gmail.com wrote: I'm creating img elements dynamically like this: $('img src=images/pic.jpg alt=).appendTo(#table); Later on, if I create a wrapped set $('img'), dynamically created images are not in it. I guess that's the way jQuery works, but can I do something to wrap newly created elements that are not in HTML?
[jQuery] I want to do validation via AJAX and then submit form...
Hey all. I am creating a login type screen and when the login button is clicked, I validate the ID/password via AJAX and if successful, I then submit the form. I have the code to validate, but when it returns a true, how do I submit the form to call the new page? Do I put the new page in the action of the form and simply call the submit function for the form? Or is there a way to use load in a post where it calls a program rather than loads the url into a div? ...
[jQuery] Re: 1.3.1/2 selecting bug... or feature?
Bug is filed under #4224. ...Ron
[jQuery] [validate] Re: How do I enable a submit button only after all fields are valid?
Looks like I forgot to add the [validate] prefix to my subject. My apologies. Jörn, if you're out there, I could really use some help with my original post here. :-) -dan
[jQuery] Re: $('#foo p') or $('p', $('#foo'))
up to jQuery 1.2.6 that's how the selector engine worked (from the top down/left to right). The approach used in Sizzle (bottom up/right to left) has both benefits and downsides - it can be much faster on large DOMs and some situations, but slower on short queries. I'm sure someone can explain that in better detail. Anyway, in modern browsers most of the work is being delegated to the native querySelectorAll function, as so selector performance will become more of a browser makers' concern. - ricardo On Feb 23, 1:08 pm, Peter Bengtsson pete...@gmail.com wrote: I watched the John Resig presentation too and learned that CSS selectors always work from right to left. That would mean that doing this:: $('#foo p') Would extract all p tags and from that list subselect those who belong to #foo. Suppose you have 1000 p tags of them only 100 are inside #foo you'll have wasted 900 loops. Surely $('#foo') is the fastest lookup possible. Doing it this way will effectively limit the scope of the $('p') search and you will never be bothered about any p tags outside #foo. Or am I talking rubbish?
[jQuery] Re: is there something like $('.myClass').contains('val1 or val2 or val3')?
This should work, but it's an inclusive or (unlike an if/else where only one possibility is choosen) $('.myclass').filter(':contains(one), :contains(two), :contains (three)') On Feb 23, 8:33 am, ggerri a...@ggerri.com wrote: Hi guys is there a way to use logical operators in jQuery e.g. with 'contains'? thanks
[jQuery] CheckBox - Select and Deselect
Hello, I have 8 inputs of type checkbox. On 4 of them (A, B, C and D) I want to deselect the other three when one is selected. For example, if I select A I want B, C and D to be deselected. If I select C I want A, B and D to be deselected. Is it possible to create this functionality? Thanks, Miguel
[jQuery] Re: [validate]
Take a look at this demo: http://jquery.bassistance.de/validate/demo/milk/ There is a link to the php source at the bottom: ?php $request = trim(strtolower($_REQUEST['value'])); $users = array('asdf', 'Peter', 'Peter2', 'George'); $valid = 'true'; foreach($users as $user) { if( strtolower($user) == $request ) $valid = 'false'; } echo $valid; ? Jörn On Mon, Feb 23, 2009 at 6:12 PM, Sonya ayson...@googlemail.com wrote: For remote validation, please show a code of check-email.php. I did not find any example. My code: $email=$_POST['email']; $existing_mails=array('ma...@example.com','ma...@example.com'); if (in_array($email, $existing_mails)) { echo false; } else { echo true; } does not work. Can you please show just small example of php code you wrote for the demo mentioned here http://docs.jquery.com/Plugins/Validation/Methods/remote#options
[jQuery] Re: Order Items. Please help me. Thank You.
That's because you changed levels to an object, which you don't need to. Just use the original var levels = $('input:checkbox:checked'), and then levels.each(function(){ levelsCsv.push({'text':this.value,'value':$ (this).next().text()}) }) On Feb 23, 9:37 am, shapper mdmo...@gmail.com wrote: Hello, I tried to make the change: levels.each(function(){ levelsCsv.push({'text':this.value,'value':$(this).next().text()}) }) But I get an error on Firebug: levels.each is not a function Am I doing something wrong? I also made a change on buildThemesList to use text and also to fix the problem on your code that adds e only when there are 3 items. It should be also applied when there are 2: $.each(themes,function(i,t){ var li = $('li').addClass('Themes').html(t[0].text+'br /' +friendlyLevels(t[1].text)+'br /' +(t[2]==''?'':t[2]+'br /') +'a href=#Remove class=RemoveRemover/a' ).appendTo(ol); function friendlyLevels(levels) { if (levels.length 2) return levels.join(''); var first = levels.slice(0, -1), last = levels.slice(-1); var friendly = first.join(', '); if (last) { friendly += ' e ' + last; } return friendly; } I am not completely sure that I am doing this right because I get the error before. Thank You, Miguel On Feb 20, 5:02 pm, mkmanning michaell...@gmail.com wrote: levels.text = $('input[name=Levels]:checked + label'); levels.value = $('input[name=Levels]:checked'); Those don't get you the right values for the levels object, they both return a jQuery object. Accessing the levels object as this.value won't work either. Try this: levels.each(function(){ levelsCsv.push({'text':this.value,'value':$(this).next().text()}) }) On Feb 20, 5:22 am, shapper mdmo...@gmail.com wrote: Hi, I followed your tips but I still have a few problems. The subject is working fine but when I do the same to the levels it does not work. I think the problem, but I am not sure, is in: levels.each(function(){ levelCsv.push(this.value);//array to hold the levels }); I changed everything else. I updated my example:http://www.27lamps.com/Beta/List/List3.html Other problem I notice is that when two levels are added the word e is not added between the both. Only when 3 levels are added. On my first example I had a function that was doing it:http://www.27lamps.com/Beta/List/List.html I just don't know how to integrate this on your code. I don't need to use my FriendlyLevels example. I just need to have the e every time there is more then 1 level. How can I do it? Thank You, Miguel - The subject is working fine. - On Feb 20, 1:50 am, mkmanning michaell...@gmail.com wrote: You could modify the subject variable being put into the array to make it an object: subject = {} then add the option's value and text to it: subject.value = $('#Subject option:selected').val(); subject.text = $('#Subject option:selected').text(); or in one line to replace what's there now: subject = {'text':$('#Subject option:selected').text(),'value':$ ('#Subject option:selected').val()} then put it in the array the same way: temptheme.push(subject) To access it later when rebuilding just get the attributes of the object: var li = $('li').addClass('Themes').html(t[0].text+'br /' etc... for the display $('input').attr({'type':'hidden','name':'Themes['+i+'].Subject'}).val (t[0].value).appendTo(li); etc for the value Use the same object structure for storing the checkbox names/values On Feb 19, 4:36 pm, shapper mdmo...@gmail.com wrote: Hi Michaell, Sorry for the delay but when I started using JQuery 1.3 I solved this problem but I got a few others on my application. Anyway, there is just something else that I am not able to solve. When I add a theme I need to: 1. For the Select (Subject), add the selected value to hidden input but the text to the visible text. 2. For the CheckBoxes (Levels) add LevelsCsv (formed with values) to the hidden inputs. But the visible text should use the text in the labels associated to which check box ... I had something like that in my code: 1. For the subject I add something like: $subject = $('#Subject option:selected'); $theme.append($subject.text()).append('br /'); And on the hidden input I was using $subject.val() 2. For the levels I was using: $levelsTexts = $('input[name=Levels]:checked + label'); $levelsValues = $('input[name=Levels]:checked'); So the text goes into the visible part of the theme and the value goes to the hidden inputs. See? I have been trying to add this to your code but I haven't
[jQuery] SimpleModal container and closing image
Hi, I'm using the SimpleModal library to display help text in a modal popup. We are using the a.closeimg in the stylesheet to display a modified X to close the window. The stylesheet is external and located in the web application directory. It has a page to the image that takes into account the server path eccentricities of ASP. The trouble is that in Firefox the image does not display and there doesn't appear anywhere to click to close the window. The user has to click the back button to get back to the screen. In IE, the mouse pointer shows there is a link to click to close the window but the image does not appear. I've checked my path several times and it seems to be okay--it should be loading the image. Anyone have any ideas what I'm doing wrong? Thanks, Ron
[jQuery] Re: Horizontal animation works on F.F. IE7. Fails on IE6
can you check taht for IE6, the element is not ALREADY at position left=0 ? hence no animation? On Mon, Feb 23, 2009 at 6:22 PM, ab2qik ab2...@googlemail.com wrote: Hi, Horizontal animation of an element works on F.F. IE7. It fails to work on IE6? Example: From: http://codesolv.net/se-update/library-slide.html Click on any radio button under Form factors heading. An element slides open. This can be closed by the top right close button. Works on F.F./IE7. Any suggegstions for a fix for IE6? Thankyou, ab2qik
[jQuery] Re: CheckBox - Select and Deselect
Easier/makes-more-sense: - Why not use a radio box group then? Otherwise: - Using jQuery to mimic functionality w/ CheckBox input type=checkbox id=A / input type=checkbox id=B / input type=checkbox id=C / input type=checkbox id=D / $(document).ready(function() { $(#A, #B, #C, #D).change(function() { var ThisID = this.id; $(#A, #B, #C, #D).each(function() { if (this.id != ThisID) { this.checked = false; } }) }); }) On Feb 23, 4:18 pm, shapper mdmo...@gmail.com wrote: Hello, I have 8 inputs of type checkbox. On 4 of them (A, B, C and D) I want to deselect the other three when one is selected. For example, if I select A I want B, C and D to be deselected. If I select C I want A, B and D to be deselected. Is it possible to create this functionality? Thanks, Miguel
[jQuery] Re: Horizontal animation works on F.F. IE7. Fails on IE6
in fact, i just tested it on IE6, and i can't even click on the form inputs, so i 'd assume either you disabled them, or there is a transparent div with a higher z-index that prevents from clicking it. On Mon, Feb 23, 2009 at 10:36 PM, Alexandre Plennevaux aplennev...@gmail.com wrote: can you check taht for IE6, the element is not ALREADY at position left=0 ? hence no animation? On Mon, Feb 23, 2009 at 6:22 PM, ab2qik ab2...@googlemail.com wrote: Hi, Horizontal animation of an element works on F.F. IE7. It fails to work on IE6? Example: From: http://codesolv.net/se-update/library-slide.html Click on any radio button under Form factors heading. An element slides open. This can be closed by the top right close button. Works on F.F./IE7. Any suggegstions for a fix for IE6? Thankyou, ab2qik
[jQuery] Re: Adding scope support to .bind()
Passing handler after scope is not suitable for two reasons: 1. There's no way to determine whether data or scope is passed in a three-argument method call. 2. Passing scope after handler is common pattern in JavaScript 1.6 methods like forEach. On Dec 25 2008, 11:08 pm, Eduardo Lundgren eduardolundg...@gmail.com wrote: The isFunction is faster now but still has more coast that when you don't need to call it. We should keep the handler as the last parameter to fit with the jQuery API, the change is compatible with it. $('div').bind('click', {data: true}, scope, *scope.internalHandler*); Scoping events is a good addition to jQuery. Ariel, Joern, John? Let me know if it make sense for you. Thanks, Eduardo Lundgren On Thu, Dec 25, 2008 at 11:57 AM, Balazs Endresz balazs.endr...@gmail.comwrote: True, but the new isFunction is a couple of times faster than the old one, though it's still many times faster to directly call Object.prototype.toString, which is far below 0.001ms. But as the callback function is the last parameter everywhere in jQuery it might be confusing to change this pattern, it just looked more like binding the function with a native method for me. On Dec 25, 7:06 pm, Eduardo Lundgren eduardolundg...@gmail.com wrote: Hi Balazs, Thanks for give us your opinion. When you use $.isFunction(data) on the bind method it is very expensive when you have a lot of iterations. Diff the file I attached with the original file (rev. 5996) I made only a small change on the bind() method, and it's compatible with data and with out API. On Thu, Dec 25, 2008 at 3:05 AM, Balazs Endresz balazs.endr...@gmail.comwrote: Hi, I think this would be really useful! I've also modified jQuery to do this a while ago (1.2.6) but with the new scope being the last argument, so it works without the data object as well: jQuery.fn.bind=function( type, data, fn, bind ) { return type == unload ? this.one(type, data, fn) : this.each (function(){ if( $.isFunction(data) ) jQuery.event.add( this, type, data, bind, fn ); else jQuery.event.add( this, type, fn, data, bind ); }); } jQuery.event = { add: function(elem, types, handler, data, bind) { if ( elem.nodeType == 3 || elem.nodeType == 8 ) return; if( bind != undefined ) handler = jQuery.bind(handler, bind); //change scope ... jQuery.each( (blur,focus,load,resize,scroll,unload,click,dblclick, + mousedown,mouseup,mousemove,mouseover,mouseout,mouseenter,mouseleave, + change,select,submit,keydown,keypress,keyup,error).split(,), function(i, name){ // Handle event binding jQuery.fn[name] = function(fn, bind){ //second argument for the scope return fn ? this.bind(name, fn, bind) : this.trigger(name); }; }); where jQuery.bind is: jQuery.bind=function( fn, bind ){ var args = $.makeArray( arguments ).slice(2); if( args.length == 1 $.isArray( args[0] ) ) args = args[0]; return function(){ return fn.apply( bind, args ); } } On Dec 25, 10:38 am, Eduardo Lundgren eduardolundg...@gmail.com wrote: Hi guys, The .bind() method consider the scope of the handler the element whose the event is assigned - that is the correct as default. I've been playing with the event.js and implemented an alternative to call .bind(), specifying another scope, that looks useful for our api. I've attached the event.js modified from the rev. 5996 from the trunk. The changes are compatible with the current API. Here goes one example: var scopeTest = function() { this.name = iamanotherscope; this.internalHandler = function(event) { console.log(I am another scope method., this.name, event, event.data); }; }; var scope = new scopeTest(); $('div').bind('click', {data: true}, globalHandler); $('div').bind('click', {data: true}, scope.internalHandler); // handler, data, default scope $('div').bind('click', {data: true}, scope, scope.internalHandler); // handler, data, pre-defined scope Let me know if make sense for you. -- Eduardo Lundgren Software Engineer Liferay, Inc. Enterprise. Open Source. For Life. event.js 26KViewDownload -- Eduardo Lundgren Software Engineer Liferay, Inc. Enterprise. Open Source. For Life. -- Eduardo Lundgren