[jQuery] Re: input file and val()
Hi brian, no - FF doesn´t allow to change the value into an other sting(of course for security reasons). Thank you though.
[jQuery] Re: Jquery seems to be sending two requests the first few times. . .
Hi Mark, ad 1) in Firebug I can see only one POST request. Do you have any content in your config.html which is loaded subsequently (e.g. images, js, ...)? Just try it with an empty config.html and without the callback function. ad 2) no Problem, you can chain AJAX request within the callback as you like by(e) Stephan 2009/2/9 Mark Lacas markla...@gmail.com: I have been tracing this one down for two days. Has anyone else ever seen jquery making multiple request for a single call? Here is the call: $(#configure_blocks).load( config_templates/+config_template +.html, { bust: new Date() }, function( data ){ var theform = document.getElementById(basic_properties); theform.reset(); }); Here are the lines from my apache2 log: 10.0.1.12 - - [09/Feb/2009:11:41:21 -0800] POST /config_templates/ led.html HTTP/1.1 200 3035 http://10.0.1.190/; Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9) Gecko/2008061712 Firefox/3.0 10.0.1.12 - - [09/Feb/2009:11:41:21 -0800] GET /config_templates/ led.html HTTP/1.1 200 3035 - Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9) Gecko/2008061712 Firefox/3.0 This has been driving me mad as I can't get a handle on why this is happening. As well, is it ok to make a second ajax call in the completion block of a previous ajax call? $(#configure_blocks).load( config_templates/+config_template +.html, { bust: new Date() }, function( data ){ var theform = document.getElementById(basic_properties); theform.reset(); $.get(/cgi-bin/socket.cgi, { socket:'led', command:off, plain: 1 }, function( json ){ alert( dump( json ); }, json ); }); Thanks, ml
[jQuery] Re: input file and val()
Hi Michael, unfortunately that doesn´t work either (except FF ;)) On 9 Feb., 17:44, Michael Lawson mjlaw...@us.ibm.com wrote: Have you tried using the attr() function? $(#input1).attr(value,);) 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: ezod pured...@gmail.com To: jQuery (English) jquery-en@googlegroups.com Date: 02/09/2009 11:40 AM Subject: [jQuery] input file and val() Hi there, I tried to reset a file input element by using val(). html head titleFooBar/title /head script src=jquery.js/script script $(document).ready(function() { $(#resetMe).click(function () { $(#input1).val(''); }); }); /script body form name=foo input id=input1 type=file name=foobar brbr input id=resetMe type=button value=ResetMe! /form /body /html This works fine for FF, but IE doesn´t (re)set the value. Any hints? TIA ezod graycol.gif 1 KBAnzeigenHerunterladen ecblank.gif 1 KBAnzeigenHerunterladen
[jQuery] Re: Numbering ... Could someone please help me out with this?
Hi Miguel, another idea: I guess you need the Themes[0].* construct to process the form submit with a PHP script? I'm not 100% sure with this PHP stuff, but can't you pass a list of Themes[].*, Themes[].*, ... without an index between [] to PHP and PHP will automatically create an array out of it? by(e) Stephan 2009/2/10 mkmanning michaell...@gmail.com: You can just check the length of the child li elements of ul#Themes: $('#AddTheme').bind('click', function(){ // Other code var len = $('#Themes li').length; $theme = $('li class=Themes/li').appendTo ('#Themes'); $theme.append('input type=hidden name=Themes['+len +'].Subject value = ' + $subject.val() + ' /'); $theme.append('input type=hidden name=Themes ['+len+'].LevelsCsv value = ' + levelsTypes.join(,) + ' /'); $theme.append('input type=hidden name=Themes ['+len+'].Description value = ' + description.val() + ' /'); }); On Feb 8, 8:13 am, Stephan Veigl stephan.ve...@gmail.com wrote: Hi Miguel, you could use a global counter. e.g. var themesCounter = 0; $('#AddTheme').bind('click', function(){ ... $theme.append('input type=hidden name=Themes[themesCounter].Subject value = ' + $subject.val() + ' /'); ... themesCounter++; }); by(e) Stephan 2009/2/8 shapper mdmo...@gmail.com: Hi, I am adding list items to a list as follows: $('#AddTheme').bind('click', function(){ // Other code $theme = $('li class=Themes/li').appendTo ('#Themes'); $theme.append('input type=hidden name=Themes[0].Subject value = ' + $subject.val() + ' /'); $theme.append('input type=hidden name=Themes [0].LevelsCsv value = ' + levelsTypes.join(,) + ' /'); $theme.append('input type=hidden name=Themes [0].Description value = ' + description.val() + ' /'); }); Basically, every time I add a new item I want to give the next number to Themes[0], i.e., Themes[1]. If I add 3 themes I will have Themes[0], Themes[1], Themes[2] Basically, I need to have at all times themes numbered as 0, 1, 2, ... Could someone please help me out? Thanks, Miguel Just in case, here is my entire code fully commented: $('#Cancel').click(function() { location.href = '/Account/ List'; }); // Themes // Define remove event $('.Remove').livequery('click', function(event) { $(this).parent().remove(); }); // Bind add button $('#AddTheme').bind('click', function(){ // Define valid var valid = new Boolean(true); // Define fields $description = $('#Description'); $levels = $('input[name=Levels]:checked + label'); $levelsTypes = $('input[name=Levels]:checked'); $subject = $('#Subject option:selected'); // Map levels levels = $levels.map(function() { return $(this).text(); }).get (); levelsTypes = $levelsTypes.map(function() { return $(this).val (); }).get(); // Check subject if (!$subject.val()) { valid = false; } // Check levels if (!levels.length) { valid = false; } // Check boolean if (valid) { // Define theme $theme = $('li class=Themes/li').appendTo ('#Themes'); // Add fields $theme.append($subject.text()).append('br /'); $theme.append( Levels(levels) + 'br /' ); if ($description.val()) { $theme.append($description.val ()).append('br /'); } // Add button $theme.append('a href=#Remove class=RemoveRemover/ a'); // Add inputs $theme.append('input type=hidden name=Themes[0].Subject value = ' + $subject.val() + ' /'); $theme.append('input type=hidden name=Themes [0].LevelsCsv value = ' + levelsTypes.join(,) + ' /'); $theme.append('input type=hidden name=Themes [0].Description value = ' + description.val() + ' /'); // Add input //$theme.append(' input type=hidden name=Themes value = ' + theme + ' /'); } }); // Levels function Levels(levels) { // Check levels if (levels.length 2) return levels.join(''); // Define first var first = levels.slice(0, -1), last = levels.slice(-1); // Define result var result = first.join(', '); // Check last if (last) { result += ' and ' + last; } // Return results return result; } // Levels
[jQuery] Re: tabs, ajax mode, spinner not removed
Hello Brian, would you mind to file a bug for this? --Klaus On 10 Feb., 06:18, brian bally.z...@gmail.com wrote: jquery 1.3.1, UI.Tabs 1.6rc6, FF3.0.6 Whenever any tabs load the spinner img will remain visible. I'm using the following for the spinner option for tabs (I've removed everything else with the same result) spinner: 'img src=/css/images/misc/spinner.gif /' The default loading ... does change back to the label text. I see that the img should be removed in cleanup(). I can't see any reason for it to be failing. var cleanup = function() { self.$tabs.filter('.ui-tabs-loading').removeClass('ui-tabs-loading') .each(function() { if (o.spinner) inner(this).parent().html(inner(this).data('label.tabs')); }); self.xhr = null; }; Taking the 1st tab as an example and using Firebug, when loading has completed, the LI has the following classes: ui-state-default ui-corner-top ui-tabs-selected ui-state-active The anchor has an empty class attribute and the contents are the IMG wrapped in an EM. There are no errors occurring. Anyone else see this?
[jQuery] Re: validation with jquery 1.3
Hei there seems validation works only if all the fields are not filled. if i fill one of the required fields the validation passes and submit the form. $.validator.setDefaults({ submitHandler: function() { alert(submitted!); } }); $().ready(function() { // validate signup form on keyup and submit $(#contactForm).validate({ rules: { name: {required: true, maxlenght: 40}, address: {required: true, maxlenght: 30}, zipcode: required, city: {required: true, maxlenght: 20}, email: { required: true, email: true, maxlenght: 30 }, repeat_email: { required: true, email: true, maxlenght: 30, equalTo: #email }, service_name:{required: true,maxlenght: 40}, order_number:{required: true,maxlenght: 10}, reason_of_cancellation:{required: true,maxlenght: 300}, erroneous_page_address:{required: true,maxlenght: 100}, error_description:{required: true,maxlenght: 300} }, messages: { name: { required: Please enter your first and last name, maxlenght: Your name must consist maximum of 40 characters }, address: { required: Please enter your address, maxlenght: Your address must consist maximum of 40 characters }, zipcode: Please enter your ZIP code, city: { required: Please enter your city, maxlenght: Your city must consist maximum of 20 characters }, email:{ required: Please provide an email, email: Please enter a valid email address, maxlenght: Your email must consist maximum of 30 characters }, repeat_email: { required: Please enter the same email as above, maxlenght: Your email must consist maximum of 30 characters, equalTo: Please enter the same email as above } } }); }); On Jan 30, 8:24 pm, Jörn Zaefferer joern.zaeffe...@googlemail.com wrote: Have you updated to1.5.1?http://bassistance.de/2009/01/14/releases-jquery-13-and-validation-pl... Jörn On Fri, Jan 30, 2009 at 5:17 PM, andré l...@chrom.fr wrote: Hello, Thanks for your fabulousvalidationform. But I 've a problem.When I use jquery 1.2.6, my form works well on IE, firefox and safari. But When I use jquery 1.3 in IE the error message doesn't work Can you help me ? my script : $().ready(function() { // validate signup form on keyup and submit $(#InfoClient).validate({ rules: { Nom : required, Prenom : required, DateNaissance : { date: true }, Adresse : required, CodePostal : required, Ville :required, Pays : { digits: true }, TelFixe: { digits:true, required: function(element) { return $(#TelPort).val() 01; } }, TelPort: { digits:true, required: function(element) {
[jQuery] How to get the CSS definitions of a class not existing in the DOM
Let's say I have a CSS class for each of two possible states of an element. Now I want to animate from state X (.state-x {width:100%}) to state Y (.state-y {width:50%}). Is it possible to get the CSS definitions of .state-y? I suppose $('.state-y').css('width') doesn't work when there is no element in the DOM with this class. Of course I could define the CSS of these classes in a javascript variable but I need them in the CSS anyway (nonscript version) and I don't want to have to change it in both the CSS and JS if needed...
[jQuery] Re: Sortable: change input field value on receive
Thanks Richard, that gave me the clue. What I have now is: $(this).find('input.changethis').val('ABC'); - and it works perfectly. Thanks again! On Feb 10, 3:49 am, Richard D. Worth rdwo...@gmail.com wrote: Try this: $(this).children().children('input.changethis').val('ABC'); - Richard On Mon, Feb 9, 2009 at 5:30 PM, robertaugustin nub...@nubloo.com wrote: Hi, I have this: $('.sort').sortable({ receive: function(){ $(this).children().children('input.changethis').value = 'ABC'; } }); for this markup: ul class=sort li input class=changethis name=thename value=XYZ / /li /ul ...and I can't get it to work. I need to change the value of the input field as soon as it is dropped in its new location in the list. What am I doing wrong? Thanks in advance.
[jQuery] Re: validation with jquery 1.3
There is no maxlenght method, its maxlength. Jörn On Tue, Feb 10, 2009 at 10:51 AM, goldy zlati.pehliva...@gmail.com wrote: Hei there seems validation works only if all the fields are not filled. if i fill one of the required fields the validation passes and submit the form. $.validator.setDefaults({ submitHandler: function() { alert(submitted!); } }); $().ready(function() { // validate signup form on keyup and submit $(#contactForm).validate({ rules: { name: {required: true, maxlenght: 40}, address: {required: true, maxlenght: 30}, zipcode: required, city: {required: true, maxlenght: 20}, email: { required: true, email: true, maxlenght: 30 }, repeat_email: { required: true, email: true, maxlenght: 30, equalTo: #email }, service_name:{required: true,maxlenght: 40}, order_number:{required: true,maxlenght: 10}, reason_of_cancellation:{required: true,maxlenght: 300}, erroneous_page_address:{required: true,maxlenght: 100}, error_description:{required: true,maxlenght: 300} }, messages: { name: { required: Please enter your first and last name, maxlenght: Your name must consist maximum of 40 characters }, address: { required: Please enter your address, maxlenght: Your address must consist maximum of 40 characters }, zipcode: Please enter your ZIP code, city: { required: Please enter your city, maxlenght: Your city must consist maximum of 20 characters }, email:{ required: Please provide an email, email: Please enter a valid email address, maxlenght: Your email must consist maximum of 30 characters }, repeat_email: { required: Please enter the same email as above, maxlenght: Your email must consist maximum of 30 characters, equalTo: Please enter the same email as above } } }); }); On Jan 30, 8:24 pm, Jörn Zaefferer joern.zaeffe...@googlemail.com wrote: Have you updated to1.5.1?http://bassistance.de/2009/01/14/releases-jquery-13-and-validation-pl... Jörn On Fri, Jan 30, 2009 at 5:17 PM, andré l...@chrom.fr wrote: Hello, Thanks for your fabulousvalidationform. But I 've a problem.When I use jquery 1.2.6, my form works well on IE, firefox and safari. But When I use jquery 1.3 in IE the error message doesn't work Can you help me ? my script : $().ready(function() { // validate signup form on keyup and submit $(#InfoClient).validate({ rules: { Nom : required, Prenom : required, DateNaissance : { date: true }, Adresse : required, CodePostal : required, Ville :required, Pays : { digits: true }, TelFixe: { digits:true, required: function(element) { return $(#TelPort).val() 01; } }, TelPort: {
[jQuery] Re: input file and val()
Maybe recreate the input and replace the existing one? Or turn it into text type, clear the value then back to file? Just guessing mind! Adrian On Feb 10, 8:45 am, ezod pured...@gmail.com wrote: Hi Michael, unfortunately that doesn´t work either (except FF ;)) On 9 Feb., 17:44, Michael Lawson mjlaw...@us.ibm.com wrote: Have you tried using the attr() function? $(#input1).attr(value,);) 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: ezod pured...@gmail.com To: jQuery (English) jquery-en@googlegroups.com Date: 02/09/2009 11:40 AM Subject: [jQuery] input file and val() Hi there, I tried to reset a file input element by using val(). html head titleFooBar/title /head script src=jquery.js/script script $(document).ready(function() { $(#resetMe).click(function () { $(#input1).val(''); }); }); /script body form name=foo input id=input1 type=file name=foobar brbr input id=resetMe type=button value=ResetMe! /form /body /html This works fine for FF, but IE doesn´t (re)set the value. Any hints? TIA ezod graycol.gif 1 KBAnzeigenHerunterladen ecblank.gif 1 KBAnzeigenHerunterladen
[jQuery] Re: modify from server two jquery elements in the same time
Thank you for your solutions. Are we obliged to use jason ? Is it possible to stay html ? On 9 fév, 19:42, Ryan zen...@gmail.com wrote: What? Sorry, but this is hard to understand. I believe you're trying to set element data from a value in a php file, right? If so, that's pretty easy using JSON. In PHP, json_encode() converts an array or object into a string, and in Javascript it takes that string and converts it to an object. Using the json dataType in jQuery.ajax, the success param will be the object converted from string to an object. The object keys will be the values from the PHP array. jQuery: $.ajax({ type: 'POST', url: 'ajax.php', dataType: 'json', success: function(jdata){ $('#element1').text(jdata.value1); $('#element2').text(jdata.value2); } }); PHP: echo json_encode(array('value1' = 'i\'m value 1', 'value2' = 'i\'m value 2')); On Feb 9, 1:27 pm,phicarregam...@bluewin.ch wrote: I would like to modify two jquery elements in the same time from PHP module. The PHP module is called by .ajax $.ajax( { type: POST, url:'my_module.php', dataType: 'html', success: function(resultat) { * ? *}, error: function(requete,iderror) {alert(iderror);} }) } div id=field1... div id=field2... PHP code: echo ***new value for field1 new value for field2 *** How to formulate the success function AND the echo instruction ?
[jQuery] Re: modify from server two jquery elements in the same time
... You supposed that the elements have a text field ! I wrote this: div id=field1/div div id=field2/div On 10 fév, 12:11, phicarre gam...@bluewin.ch wrote: Thank you for your solutions. Are we obliged to use jason ? Is it possible to stay html ? On 9 fév, 19:42, Ryan zen...@gmail.com wrote: What? Sorry, but this is hard to understand. I believe you're trying to set element data from a value in a php file, right? If so, that's pretty easy using JSON. In PHP, json_encode() converts an array or object into a string, and in Javascript it takes that string and converts it to an object. Using the json dataType in jQuery.ajax, the success param will be the object converted from string to an object. The object keys will be the values from the PHP array. jQuery: $.ajax({ type: 'POST', url: 'ajax.php', dataType: 'json', success: function(jdata){ $('#element1').text(jdata.value1); $('#element2').text(jdata.value2); } }); PHP: echo json_encode(array('value1' = 'i\'m value 1', 'value2' = 'i\'m value 2')); On Feb 9, 1:27 pm,phicarregam...@bluewin.ch wrote: I would like to modify two jquery elements in the same time from PHP module. The PHP module is called by .ajax $.ajax( { type: POST, url:'my_module.php', dataType: 'html', success: function(resultat) { * ? *}, error: function(requete,iderror) {alert(iderror);} }) } div id=field1... div id=field2... PHP code: echo ***new value for field1 new value for field2 *** How to formulate the success function AND the echo instruction ?
[jQuery] Re: file upload field and standard fields
The solution: to put a delay before to close the dialog. On 2 fév, 14:11, phicarre gam...@bluewin.ch wrote: ... and $_POST is empty when $_FILES is full !!! On 2 fév, 14:07,phicarregam...@bluewin.ch wrote: Yes I know ! read the first message for the problem !! $_FILES is always empty when $_POST is full On 2 fév, 13:14, jQuery Lover ilovejqu...@gmail.com wrote: Well, it seems you are getting your 'nom' and 'phenom' text fields... and yes, domb is right, file information data is stored in $_FILES array... Read jQuery HowTo Resource - http://jquery-howto.blogspot.com On Mon, Feb 2, 2009 at 3:35 PM,phicarregam...@bluewin.ch wrote: No explanation ;-( On 30 jan, 17:10,phicarregam...@bluewin.ch wrote: I replace my code by this one: ? echo VAR DUMP:p /; var_dump($_POST); ? and the result is: VAR DUMP:p /array(3) { [nom]= string(0) [prenom]= string(0) [MAX_FILE_SIZE]= string(6) 10} File: 2.gif (6160 bytes)VAR DUMP:p /array(3) { [nom]= string(0) [prenom]= string(0) [MAX_FILE_SIZE]= string(6) 10} File: 2.gif (6160 bytes)VAR DUMP:p /array(3) { [nom]= string(0) [prenom]= string(0) [MAX_FILE_SIZE]= string(6) 10} File: 2.gif (6160 bytes) On 30 jan, 01:34, l...@onsight.ie wrote: Might just be a typo, but just in case - it should be $_POST What does the error field say? And I'm pretty sure that MAX_FILE_SIZE must come immediately before your file input element. Also, are you sure the file is within your upload limit? On Thu, Jan 29, 2009 at 1:01 PM,phicarregam...@bluewin.ch wrote: jquery.form.js v2.18 I have a form with a lot of fields and one upload file field: form action='' id='form1' enctype='multipart/form-data' style='font- size:85%' input type=hidden name=MAX_FILE_SIZE value=10 / table trtdNom: /tdtdinput type='text' size='30' id='nom' name='nom' //td/tr trtdPrénom: /tdtdinput type=text size=30 id=prenom name=prenom //td/tr trtdPhoto: /tdtdinput type=file size=40 id=photo name=photo //td/tr /table /form /div $('#form1').ajaxSubmit( { type: 'POST', url: 'create.php', beforeSubmit: showRequest , success: function(msg) {}, error: function(requete,iderror) {alert(iderror);} } ); In create.php, the $_FILES is correct (name,size,type,tmp name,error) BUT the $POST is empty ! Why ?
[jQuery] Re: [autocomplete] display a loading gif
There are loads! Try here for some http://www.ajaxload.info/ On Mon, Feb 9, 2009 at 7:08 PM, Manolet Gmail mano...@gmail.com wrote: Hi, i need to show a loading gif while autoocmplete plugins make the ajax ask. is there anyway?
[jQuery] [ANN] jQuery Powered S6 Slide Show Package Now on GitHub - Download, Watch, or Fork S6
Hello, The S6 slide show package that started as a rewrite of Eric Meyer’s S5 using the jQuery JavaScript library – offering easier to understand and easier to extend code - now has its own source repo on GitHub. Download, watch or fork the S6 slide show package @ http://github.com/geraldb/s6 Contributions welcome. Add plugins, effects and more. Cheers. PS: Also note that the slide show scripts and templates are dedicated to the public domain. Use it as you please with no restrictions whatsoever.
[jQuery] Re: [autocomplete] display a loading gif
The plugin adds a class ac_loading to the input while its loading. The default stylesheet defines a background image (indicator.gif) for that class: http://jquery.bassistance.de/autocomplete/jquery.autocomplete.css Jörn On Mon, Feb 9, 2009 at 8:08 PM, Manolet Gmail mano...@gmail.com wrote: Hi, i need to show a loading gif while autoocmplete plugins make the ajax ask. is there anyway?
[jQuery] Re: input file and val()
Great idea Adrian, but you can´t change the type property ;) Well, you could also remove the element from the DOM and then add it again... On 10 Feb., 11:48, Adrian Lynch adely...@googlemail.com wrote: Maybe recreate the input and replace the existing one? Or turn it into text type, clear the value then back to file? Just guessing mind! Adrian On Feb 10, 8:45 am, ezod pured...@gmail.com wrote: Hi Michael, unfortunately that doesn´t work either (except FF ;)) On 9 Feb., 17:44, Michael Lawson mjlaw...@us.ibm.com wrote: Have you tried using the attr() function? $(#input1).attr(value,);) 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: ezod pured...@gmail.com To: jQuery (English) jquery-en@googlegroups.com Date: 02/09/2009 11:40 AM Subject: [jQuery] input file and val() Hi there, I tried to reset a file input element by using val(). html head titleFooBar/title /head script src=jquery.js/script script $(document).ready(function() { $(#resetMe).click(function () { $(#input1).val(''); }); }); /script body form name=foo input id=input1 type=file name=foobar brbr input id=resetMe type=button value=ResetMe! /form /body /html This works fine for FF, but IE doesn´t (re)set the value. Any hints? TIA ezod graycol.gif 1 KBAnzeigenHerunterladen ecblank.gif 1 KBAnzeigenHerunterladen
[jQuery] Re: Problem with Jcarousel and Safari: next button disabled
I was having the same issue in Safari 3.2.1 All was well Safari 4 and Safari 3. Your fix worked for the current safari version of 3.2.1 but broke older versions of safari so I've changed the line 184 to: if ($.browser.safari$.browser.version 523 ) { This seems to have fixed it for all versions. On Jan 26, 10:52 am, charlie.schams charlie.sch...@gmail.com wrote: I ran into a similar problem withjcarouselandSafari. I was creating new carousels after the page had initialized, and the default prev/ next buttons were always disabled. I tracked it down to a browser snoop at line 186: if ($.browser.safari) { this.buttons(false, false); $(window).bind('load', function() { self.setup(); });} else this.setup(); I just replaced this section with: this.setup(); In my case, since window has already loaded, the carousel was not completing its setup stage. Disabling this browser hack had no other effect, perhaps it was put in to avoid an issue that doesn't appear in newer versions ofSafari. I can't guarantee this will fix your issue, but it's probably worth a shot. Charlie On Jan 25, 3:33 pm, kinesias talk2matth...@googlemail.com wrote: Hi, please check outhttp://www.mirox-media.com/blog_add/media/data/film_festivals.html When loading it the first time intosafari, the next button and the dot array at the top are disabled. It works only if you click on the refresh button insafaria couple of times. Can anyone help?? thank you very much, Matthias
[jQuery] Cannot Get JQuery Ajax to work in Google Chrome browser
I have a piece of code that updates a script with the page scroll and time on page when the user closes the page. I have this working in Firefox and IE, but it will not work in Chrome. Chrome will calculate the values correctly, but it will not post to the script. I have narrowed down the problem to being in the JQuery call to the ajax function. Does anyone know what I am doing wrong here? var maxScroll = 0; var pageOpen = new Date(); var currentURL = window.location; var updateURL = /wp-content/plugins/extra-tracking/update.php; var intervalUpdate = false; if (intervalUpdate) { setInterval( update, 15000); } jQuery(window).scroll(function(){ scrollPercent = Math.floor(jQuery(window).scrollTop() / ( jQuery (document).height() - jQuery(window).height() ) * 100 ); if (scrollPercent maxScroll) { maxScroll = scrollPercent; } }); function update() { time = pageTime(); temp = jQuery.ajax({ type: POST, url: updateURL, data: pageScroll=+maxScroll+pageTime=+time +location=+currentURL //success: function(msg){ alert(Page time: + time + Page Scroll + maxScroll); } }); return false; } function pageTime() { curTime = new Date(); minutes = (curTime.getMinutes() - pageOpen.getMinutes()); seconds = (curTime.getSeconds() - pageOpen.getSeconds()); time = (seconds + (minutes * 60)); if (time 0) { time = 0; } return time; } jQuery(window).unload( function () { endTime = pageTime(); temp = jQuery.ajax({ type: POST, url: updateURL, data: pageScroll=+maxScroll+pageTime=+endTime +location=+currentURL //success: function(msg){ alert(Page time: + time + Page Scroll + maxScroll); } //error: function (xhr, desc, exceptionobj) { alert (xhr.responseText); } }); } );
[jQuery] [BlockUI] custom css class in options
Hi, I find that being able to specify a custom CSS class in the blockUI options would be very usefull in order to specify the styling in css files instead of hard-coding the CSS in the blockUI calls. The ability to add a custom CSS class can be used to style different calls to blockUI using CSS classes.
[jQuery] Re: jquery.live() future?
Give a try to jQuery live bind, it supports blur and focus: http://plugins.jquery.com/project/live_bind On 1月26日, 上午12时04分, Trend-King i...@trend-king.de wrote: hi there i read about the live() function and fount that Currently not supported: blur, focus, mouseenter, mouseleave, change, submit will in future versions of jquery this be included? Greet Jens
[jQuery] jcarousel question
Hello, I am using jcarousel and i love it! BUT there is just one thing i use the autoscroll and static controls. could we add a class to the active control to change the css... so when the carousel scrolls to the second image the number 2 static control gets a class like active or something...
[jQuery] [validation] How to pop current rules for given input and how to set them back?
In some cases I need not to validate some fields. E.g. If I check some checkbox new inputs with further options are shown. These inputs should be validated when submitting form. If I uncheck the checkbox no options are needed and they disappear (they should not be validated). It's clear. My problem is how to remove them from validation. I could remove the rules on change on the checkbox, but I don't know the rules on inputs because they are generated. So is it possible to remove somehow the rules (when unchecking the checkbox) and set them back again (after checking the checkbox). E.g. inputRules = jQuery(#someInput).rules(); // gets the rules jQuery(#someInput).rules(remove);// and removes the rest (the two rows are equal to pop) //but how to put them back? jQuery(#someInput).rules(add, inputRules); // sets the rules Is it possible somehow?
[jQuery] Re: hide column problem
I did it this way: $(table).find('th:nth-child(' + colIndex + '), td:nth-child(' + colIndex + ')').hide(); Istvan
[jQuery] Only show 5 list item, hide the rest?
Hi. I have an unordered list like this one: ul id=myList liItem 1/li liItem 2/li liItem 3/li liItem 4/li liItem 5/li liItem 6/li liItem 7/li liItem 8/li liItem 9/li liItem 10/li /ul I want to only show the 5 first items, and hide the rest. I have a link to toggle the hidden elements on and off: a href=# id=myList-toggleShow the rest/a I use the slideToggle(400) to slide the rest of the list in. Anyone? This is what I have now, it just toggles the whole list. script type=text/javascript $(document).ready(function() { $('#myList').hide(); $('a#myList-toggle').click(function() { $('#myList').slideToggle(400); return false; }); }); /script
[jQuery] jquery cycle plugin issue
Hi guys : I'm having a problem with cycle which refuses to see the links I have put in the divs. When I click on my links it just move on the next slide (next div) I don't now how to fix this problem. I have seen there is a parameter pagerAnchorBuilder: null ... maybe there is any chance to modify it an put it to work correctly ?? I really don't know. If Somebody out there could help , it would be great !!! Thanks
[jQuery] jquery.form -- file upload problem
Hi, I'm using jquery 1.2.6 with jquery.form 2.21. Tests were done on firefox 3.0.5. When posting a file, I was able to track down a problem (io undefined) to the construction of $io that seems to be incorrect thus leading to an undefined io variable (line 167): var id = 'jqFormIO' + (new Date().getTime()); var $io = $('iframe id=' + id + ' name=' + id + ' src=about:blank /'); var io = $io[0]; // check if( $io.attr('id') != id) throw 'bad $io'; if (!io) throw 'undefined io'; It does not help to write '/iframe' instead of '/' nor to graft the iframe somewhere in the document. Any idea ?
[jQuery] Get DOM elements under click
hello, I'm wondering how to access the elements under a mouse click. At first I tried iterating through all the elements and checking each one, but as you can guess it was too slow. Then I tried binding mouse click events to all the elements but it got messy. Is there a way to get a list of elements that the mouse has clicked on even if they don't have click events defined? Richard
[jQuery] .post ajax issue
Hello, I'm attempting to use AJAX utilizing the .post function. Using Firebug, I see that the post is correctly passing the expected form variables to the page. However, the form variable do not exist when trying to locate them in the requested page. Could there be any reason or ideas as to why? Thanks.
[jQuery] Re: Problem with Jcarousel and Safari: next button disabled
That fix worked for me in Safari version 3.2.1, but it broke in older versions of safari. The final solution for me was: if ($.browser.safari$.browser.version 523 ) { this.buttons(false, false); $(window).bind('load', function() { self.setup(); }); } else this.setup(); }; The carousel seems to be working properly in all safari versions I tested now. 2.0.4 3.2.1 4 dev preview Kris On Jan 26, 10:52 am, charlie.schams charlie.sch...@gmail.com wrote: I ran into a similar problem withjcarouselandSafari. I was creating new carousels after the page had initialized, and the default prev/ next buttons were always disabled. I tracked it down to a browser snoop at line 186: if ($.browser.safari) { this.buttons(false, false); $(window).bind('load', function() { self.setup(); });} else this.setup(); I just replaced this section with: this.setup(); In my case, since window has already loaded, the carousel was not completing its setup stage. Disabling this browser hack had no other effect, perhaps it was put in to avoid an issue that doesn't appear in newer versions ofSafari. I can't guarantee this will fix your issue, but it's probably worth a shot. Charlie On Jan 25, 3:33 pm, kinesias talk2matth...@googlemail.com wrote: Hi, please check outhttp://www.mirox-media.com/blog_add/media/data/film_festivals.html When loading it the first time intosafari, the next button and the dot array at the top are disabled. It works only if you click on the refresh button insafaria couple of times. Can anyone help?? thank you very much, Matthias
[jQuery] Delayed Checkboxes in IE
Has anyone any idea why the code below doesn't work correctly in IE. Basically what is supposed to happen is when the parent checkbox is checked the child ones are also supposed to be checked. This works fine in FireFox and Safari, but not in Internet Explorer, the child checkboxes only get checked when something else changes on the form, for instance you check another item. Any help would be great. --- div id=navigation ul lia href=test.htmItem /a ul lia href=test.htmItem/a/li lia href=test.htmItem /a ul lia href=test.htmItem/a/li lia href=test.htmItem/a/li /ul /li /ul /li lia href=test.htmItem /a ul lia href=test.htmItem /a ul lia href=test.htmItem/a/li lia href=test.htmItem /a ul lia href=test.htmItem/a/li lia href=test.htmItem/a/li lia href=test.htmItem/a/li lia href=test.htmItem/a/li lia href=test.htmItem/a/li /ul /li /ul /li lia href=test.htmItem/a/li /ul /li /ul /div script type=text/javascript src=http://ajax.googleapis.com/ajax/ libs/jquery/1.3.1/jquery.min.js/script script type=text/javascript $(document).ready(function() { $(#navigationullia).each(function () { $(this).before($(this).text()); $(this).remove(); }); var checknum = 0; $(#navigation a).each( function () { checknum = checknum +1; newInput = document.createElement(input); newInput.setAttribute(name,dchannel+checknum); newInput.setAttribute(id,dchannel+checknum); newInput.type = checkbox; newInput.value = $(this).attr('href').replace(/'/ig, \'); $(newInput).insertBefore(this); $(#dchannel+checknum).val($(#dchannel+checknum).val().replace (http://boston;, )); newLabel = document.createElement(label); newLabel.setAttribute(for,dchannel+checknum); newLabel.innerHTML = $(this).text(); $(newLabel).insertBefore(this); $(this).remove(); }); $(input:checkbox).change(function () { if($(this).attr(checked)) { $(this).parents(li:first).find(input:checkbox).each(function () { $(this).attr(checked, true); }); } else { $(this).parents(li:first).find(input:checkbox).each(function () { $(this).attr(checked, false); }); } }); }); /script --
[jQuery] form plugin and prettypopin/lightbox
I am using prettyPopin lightbox for a file upload form, and I am also using jQuery Form Plugin to upload the image file and update it accordingly. Unfortunately, the file is not being sent. The $_FILES array is empty. I've included the jQuery and HTML being used. If someone can please look and let me know if I'm missing something, because from all the examples I've seen it doesn't seem to require too much to upload a file. Thanks. updatephoto.php jQuery: $(document).ready(function() { var options = { target: '#divupdate', beforeSubmit : function() { $('#divupdate').html('img src=pics/loader.gif border=0 alt=Please wait... /'); } }; $('#phupdt').ajaxForm(options); // $('#phupdt').submit(function() { // $(this).ajaxSubmit(options); // return false; // }); }); updatephoto.php HTML: div id=divupdate br /br / form id=phupdt action=updtphresponse.php method=post enctype=multipart/form-data input type=hidden name=MAX_FILE_SIZE value=525 / table tr tdinput type=file name=headshot size=30 //td /tr tr tdinput type=submit name=request value=Update photo //td /tr /table /form /div updtphresponse.php HTML: print_r($_FILES); $html = ' table tr tdbSuccessfully updated./b/td /tr /table '; echo $html;
[jQuery] Problems...
Hi, i have a function like this: function test(s, t, c) { var Ss = # + s; var S = # + s + cod; if(t == 1) { $(S).empty().html(a href='#' onClick='test(+s+, 0, +c+)'-/ a +s); $(Ss).show(); } else { $(S).empty().html(a href='#' onClick='test(+s+, 1, +c+)'+/ a +s); $(Ss).hide(); } } Can you guys understand what im trying to do... I wanna generate the HTML with the same function but with some changes, i can do all, but i dont know why the +s+ doesnt work. theres no value, i tried to use an alert for s and it says object, so the function only work first time when i load the page, i think its something wrong with the format: $(S).empty().html(a href='#' onClick='test(+s+, 0, +c+)'-/ a +s); $(S).empty().html(a href='#' onClick='test(+s+, 1, +c+)'+/ a +s);
[jQuery] [validate] 'please wait' message on submission
Hi - fantastic validation script Jörn - I wonder if you could advise me on something? In some forms I have in a backoffice, I use a 'please wait' message which appears after the form is submitted. The jQuery looks like this: $(form.myform).submit(function() { $(span.pleasewait).addClass(display); }); and gives the pleasewait span the CSS property of 'display: block' whereas it is previously 'display: none'. This is pretty rudimentary stuff (it's all i'm capable of) but works fine. However, even when the validation script prevents the form from returning, this 'please wait' message appears. Could someone suggest how I should perform the addClass only after the form has been successfully validated and submitted? Thanks in advance!
[jQuery] click on gmail new button design (goog-imageless-button) !
I use this code (jQuery) to find and fire the delete button on the gmail tool bar, but the click (3rd line) didn't work as expected since gmail change to the new look where buttons are now div., what is wrong with the new gmail imageless design? var gmCanvasFrame = $('iframe#canvas_frame'); var btnDelete = $(gmCanvasFrame).contents().find('div.goog-imageless- button-content:contains(Delete)'); $(btnDelete).click();
[jQuery] Re: [jQuery UI] UI/Datepicker Documentation broken
I just updated it. Can you give it another shot? I only have IE6 on this machine. Thanks. - Richard On Tue, Feb 10, 2009 at 2:56 AM, zubin zubin...@yahoo.com wrote: Just letting you guys know that the documentation for UI/Datepicker is not showing (IE7)
[jQuery] Re: input file and val()
I totally missed the fact it was a file and not a text type, my bad _-_ 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: ezod pured...@gmail.com To: jQuery (English) jquery-en@googlegroups.com Date: 02/10/2009 06:52 AM Subject:[jQuery] Re: input file and val() Great idea Adrian, but you can´t change the type property ;) Well, you could also remove the element from the DOM and then add it again... On 10 Feb., 11:48, Adrian Lynch adely...@googlemail.com wrote: Maybe recreate the input and replace the existing one? Or turn it into text type, clear the value then back to file? Just guessing mind! Adrian On Feb 10, 8:45 am, ezod pured...@gmail.com wrote: Hi Michael, unfortunately that doesn´t work either (except FF ;)) On 9 Feb., 17:44, Michael Lawson mjlaw...@us.ibm.com wrote: Have you tried using the attr() function? $(#input1).attr(value,);) 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: ezod pured...@gmail.com To: jQuery (English) jquery-en@googlegroups.com Date: 02/09/2009 11:40 AM Subject: [jQuery] input file and val() Hi there, I tried to reset a file input element by using val(). html head titleFooBar/title /head script src=jquery.js/script script $(document).ready(function() { $(#resetMe).click(function () { $(#input1).val (''); }); }); /script body form name=foo input id=input1 type=file name=foobar brbr input id=resetMe type=button value=ResetMe! /form /body /html This works fine for FF, but IE doesn´t (re)set the value. Any hints? TIA ezod graycol.gif 1 KBAnzeigenHerunterladen ecblank.gif 1 KBAnzeigenHerunterladen inline: graycol.gifinline: ecblank.gif
[jQuery] Re: cycle plugin works on one page, but not on the other. NO DIFFERENCE!
... but not with scrollLeft... The images just disappear altogether. It doesn't display anything. i've tried changing the id name, nothing works. The weird thing is, I've implemented this in another project and it worked fine, but I can't really find what I did different because on the site where it works, it's embedded in hundreds of lines of HTML. But as far as I'm concerned, there's no difference in any of these pages regarding the key elements to make this thing work... So I'm literally at the end of my rope here. i have NO idea what I'm doing wrong. can someone PLEASE shed some light on this thing... What, if anything, is logged to the Firebug console? Is cycle.jquery.js the full Cycle download, or only the core?
[jQuery] Re: form plugin and prettypopin/lightbox
On Feb 10, 12:04 am, spiderling webmas...@spiderling.ca wrote: I am using prettyPopin lightbox for a file upload form, and I am also using jQuery Form Plugin to upload the image file and update it accordingly. Unfortunately, the file is not being sent. The $_FILES array is empty. I've included the jQuery and HTML being used. If someone can please look and let me know if I'm missing something, because from all the examples I've seen it doesn't seem to require too much to upload a file. Thanks. updatephoto.php jQuery: $(document).ready(function() { var options = { target: '#divupdate', beforeSubmit : function() { $('#divupdate').html('img src=pics/loader.gif border=0 alt=Please wait... /'); } }; $('#phupdt').ajaxForm(options); // $('#phupdt').submit(function() { // $(this).ajaxSubmit(options); // return false; // }); }); updatephoto.php HTML: div id=divupdate br /br / form id=phupdt action=updtphresponse.php method=post enctype=multipart/form-data input type=hidden name=MAX_FILE_SIZE value=525 / table tr tdinput type=file name=headshot size=30 //td /tr tr tdinput type=submit name=request value=Update photo //td /tr /table /form /div updtphresponse.php HTML: print_r($_FILES); $html = ' table tr tdbSuccessfully updated./b/td /tr /table '; echo $html; Everything you posted looks fine. Where does the prettyPopin lightbox come into play? Mike
[jQuery] Re: .post ajax issue
I'm attempting to use AJAX utilizing the .post function. Using Firebug, I see that the post is correctly passing the expected form variables to the page. However, the form variable do not exist when trying to locate them in the requested page. Can you please explain that again? I'm not sure what you're asking.
[jQuery] Re: [validation] How to pop current rules for given input and how to set them back?
That code you wrote should work just fine. Just try it! See also http://docs.jquery.com/Plugins/Validation/rules On Tue, Feb 10, 2009 at 9:32 AM, stej cerna.ze...@seznam.cz wrote: In some cases I need not to validate some fields. E.g. If I check some checkbox new inputs with further options are shown. These inputs should be validated when submitting form. If I uncheck the checkbox no options are needed and they disappear (they should not be validated). It's clear. My problem is how to remove them from validation. I could remove the rules on change on the checkbox, but I don't know the rules on inputs because they are generated. So is it possible to remove somehow the rules (when unchecking the checkbox) and set them back again (after checking the checkbox). E.g. inputRules = jQuery(#someInput).rules(); // gets the rules jQuery(#someInput).rules(remove);// and removes the rest (the two rows are equal to pop) //but how to put them back? jQuery(#someInput).rules(add, inputRules); // sets the rules Is it possible somehow?
[jQuery] Re: [validate] 'please wait' message on submission
Try to move that code into the submitHandler-callback: $(#myform).validate({ submitHandler: function(form) { $(span.pleasewait).addClass(display); form.submit(); } }); Note the call to form.submit - if you specify submitHandler, you have to handle the submit yourself. Jörn On Tue, Feb 10, 2009 at 1:21 PM, ianus i...@rs.nl wrote: Hi - fantastic validation script Jörn - I wonder if you could advise me on something? In some forms I have in a backoffice, I use a 'please wait' message which appears after the form is submitted. The jQuery looks like this: $(form.myform).submit(function() { $(span.pleasewait).addClass(display); }); and gives the pleasewait span the CSS property of 'display: block' whereas it is previously 'display: none'. This is pretty rudimentary stuff (it's all i'm capable of) but works fine. However, even when the validation script prevents the form from returning, this 'please wait' message appears. Could someone suggest how I should perform the addClass only after the form has been successfully validated and submitted? Thanks in advance!
[jQuery] Re: [autocomplete]
You're welcome, and thanks for the nice words! Jörn On Mon, Feb 9, 2009 at 6:10 AM, jami jamidw...@gmail.com wrote: I just want to thank the person (Jorn Zaefferer?) or people who wrote the autocomplete plugin. I've tried getting other live searches and autocompletes to work with my tiny Javascript knowledge, but it was never clear how everything hung together and I'd lose patience before getting anything done. But the way you bundle the files with a demo makes it easy to hack-and-see. Awesome. Thank you!!!
[jQuery] Re: jquery.form -- file upload problem
I'm using jquery 1.2.6 with jquery.form 2.21. Tests were done on firefox 3.0.5. When posting a file, I was able to track down a problem (io undefined) to the construction of $io that seems to be incorrect thus leading to an undefined io variable (line 167): var id = 'jqFormIO' + (new Date().getTime()); var $io = $('iframe id=' + id + ' name=' + id + ' src=about:blank /'); var io = $io[0]; // check if( $io.attr('id') != id) throw 'bad $io'; if (!io) throw 'undefined io'; It does not help to write '/iframe' instead of '/' nor to graft the iframe somewhere in the document. Any idea ? Can you post a link to a page that shows the problem? I've been running this code all morning in FF 3.0.5 without error.
[jQuery] Re: jquery cycle plugin issue
I'm having a problem with cycle which refuses to see the links I have put in the divs. When I click on my links it just move on the next slide (next div) I don't now how to fix this problem. I have seen there is a parameter pagerAnchorBuilder: null ... maybe there is any chance to modify it an put it to work correctly ?? I really don't know. If Somebody out there could help , it would be great !!! Thanks Please post some code or a link. You haven't provided enough information for me to help. Mike
[jQuery] Re: TableSorter plugin is not working in IE7
I test here and works fine for me in IE7 On Mon, Feb 9, 2009 at 18:47, Bluesapphire michealg...@gmail.com wrote: Hi! Kindly visit following link: http://vibersol.com/sitesdemo/shipping/admin/continent.php Table sorter plugin works fine in FireFox, but in IE7 this plugin doesn't work. Can some one guide me where and how to rectify this problem in my code, so that plugin begin to work in IE7. Thanks in advance
[jQuery] Re: Only show 5 list item, hide the rest?
Hi, try this one: var list = $('#myList li:gt(4)'); list.hide(); $('a#myList-toggle').click(function() { list.slideToggle(400); return false; }); by(e) Stephan 2009/2/10 mofle mofl...@gmail.com: Hi. I have an unordered list like this one: ul id=myList liItem 1/li liItem 2/li liItem 3/li liItem 4/li liItem 5/li liItem 6/li liItem 7/li liItem 8/li liItem 9/li liItem 10/li /ul I want to only show the 5 first items, and hide the rest. I have a link to toggle the hidden elements on and off: a href=# id=myList-toggleShow the rest/a I use the slideToggle(400) to slide the rest of the list in. Anyone? This is what I have now, it just toggles the whole list. script type=text/javascript $(document).ready(function() { $('#myList').hide(); $('a#myList-toggle').click(function() { $('#myList').slideToggle(400); return false; }); }); /script
[jQuery] Re: Get DOM elements under click
Hi Richard, you can bind one single event trigger to the document (or a parent element) and use the target property of the event. see: http://docs.jquery.com/Events/jQuery.Event e.g. $().click( function(ev) { $(ev.target).fadeOut().fadeIn(); }); by(e) Stephan 2009/2/10 Richard richar...@gmail.com: hello, I'm wondering how to access the elements under a mouse click. At first I tried iterating through all the elements and checking each one, but as you can guess it was too slow. Then I tried binding mouse click events to all the elements but it got messy. Is there a way to get a list of elements that the mouse has clicked on even if they don't have click events defined? Richard
[jQuery] Re: cycle plugin works on one page, but not on the other. NO DIFFERENCE!
cycle.jquery.js must be the full file, it is over 900 lines of code. Yep, must be the full deal. that's interesting that you mention the firebug... I just took a look at it, and the HTML editor is adding all sorts of attributes to each anchor tag. like this: what the heck would it be doing that for?! Not sure if this is a serious question or not. That's how animation is achieved. Style properties are changed dynamically to move stuff around on the screen, change opacity, etc. This just shows that cycle is running. still same problem. Nothing changed. What do you think? It looks like you haven't included any styles on this page. What does Firebug say the size of the container is? 0? You haven't included any sizes on the images either. Tough to resize things dynamically within this info.
[jQuery] Re: Problems...
Hi, 1. How do you set up your first s,t,c? 2. Where does cod come from? 3. I suppose s and c should be strings. Then you would have to escape the strings in the onClick function call: a href='#' onClick='test(\+s+\, 0, \+c+\)'-/a by(e) Stephan 2009/2/10 Po01 diogoapa...@gmail.com: Hi, i have a function like this: function test(s, t, c) { var Ss = # + s; var S = # + s + cod; if(t == 1) { $(S).empty().html(a href='#' onClick='test(+s+, 0, +c+)'-/ a +s); $(Ss).show(); } else { $(S).empty().html(a href='#' onClick='test(+s+, 1, +c+)'+/ a +s); $(Ss).hide(); } } Can you guys understand what im trying to do... I wanna generate the HTML with the same function but with some changes, i can do all, but i dont know why the +s+ doesnt work. theres no value, i tried to use an alert for s and it says object, so the function only work first time when i load the page, i think its something wrong with the format: $(S).empty().html(a href='#' onClick='test(+s+, 0, +c+)'-/ a +s); $(S).empty().html(a href='#' onClick='test(+s+, 1, +c+)'+/ a +s);
[jQuery] [Validate] API list for main validator object
One of the demos for Validation shows: var errors = validator.numberOfInvalids(); Going to the main list of methods for validator I do not see this documented anywhere. Where can I find the full list of methods I can call on validator?
[jQuery] Re: cycle plugin works on one page, but not on the other. NO DIFFERENCE!
It looks like you haven't included any styles on this page. What does Firebug say the size of the container is? 0? You haven't included any sizes on the images either. Tough to resize things dynamically within this info. = That was it!!! I just had to specify the size of the div container! div id=slideshow style=width:703px; height:302; a href=img src=images/slideshow/1.jpg border=0 //a a href=img src=images/slideshow/2.jpg border=0 //a a href=img src=images/slideshow/3.jpg border=0 //a a href=img src=images/slideshow/4.jpg border=0 //a a href=img src=images/slideshow/5.jpg border=0 //a a href=img src=images/slideshow/6.jpg border=0 //a a href=img src=images/slideshow/7.jpg border=0 //a /div Thank you so much Mike! You're the man!
[jQuery] Re: TableSorter plugin is not working in IE7
Also works for me here on IE7 I'd suggest totally clearing your cache and try again
[jQuery] Re: select inside an object
Thanks for help! On Feb 10, 2:12 am, Mike Alsup mal...@gmail.com wrote: $(form).('select')[0].selectedIndex = 2; But this wont work. What am I doing wrong? How should I use object subselectors? $(form).find('select');
[jQuery] Re: Delayed Checkboxes in IE
Hi John, It looks like IE doesn't send a change event when the checkbox has been clicked, only after the element has lost focus. You can test this by adding a debug alert to your change function. change your $(input:checkbox).change(function () {... line to $(input:checkbox).bind(change click keypress, function(){... to catch the checkbox every time it has been clicked (either with mouse or keyboard) by(e) Stephan 2009/2/10 John C j.cashm...@wigan.gov.uk: Has anyone any idea why the code below doesn't work correctly in IE. Basically what is supposed to happen is when the parent checkbox is checked the child ones are also supposed to be checked. This works fine in FireFox and Safari, but not in Internet Explorer, the child checkboxes only get checked when something else changes on the form, for instance you check another item. Any help would be great. --- div id=navigation ul lia href=test.htmItem /a ul lia href=test.htmItem/a/li lia href=test.htmItem /a ul lia href=test.htmItem/a/li lia href=test.htmItem/a/li /ul /li /ul /li lia href=test.htmItem /a ul lia href=test.htmItem /a ul lia href=test.htmItem/a/li lia href=test.htmItem /a ul lia href=test.htmItem/a/li lia href=test.htmItem/a/li lia href=test.htmItem/a/li lia href=test.htmItem/a/li lia href=test.htmItem/a/li /ul /li /ul /li lia href=test.htmItem/a/li /ul /li /ul /div script type=text/javascript src=http://ajax.googleapis.com/ajax/ libs/jquery/1.3.1/jquery.min.js/script script type=text/javascript $(document).ready(function() { $(#navigationullia).each(function () { $(this).before($(this).text()); $(this).remove(); }); var checknum = 0; $(#navigation a).each( function () { checknum = checknum +1; newInput = document.createElement(input); newInput.setAttribute(name,dchannel+checknum); newInput.setAttribute(id,dchannel+checknum); newInput.type = checkbox; newInput.value = $(this).attr('href').replace(/'/ig, \'); $(newInput).insertBefore(this); $(#dchannel+checknum).val($(#dchannel+checknum).val().replace (http://boston;, )); newLabel = document.createElement(label); newLabel.setAttribute(for,dchannel+checknum); newLabel.innerHTML = $(this).text(); $(newLabel).insertBefore(this); $(this).remove(); }); $(input:checkbox).change(function () { if($(this).attr(checked)) { $(this).parents(li:first).find(input:checkbox).each(function () { $(this).attr(checked, true); }); } else { $(this).parents(li:first).find(input:checkbox).each(function () { $(this).attr(checked, false); }); } }); }); /script --
[jQuery] Re: [Validate] API list for main validator object
The documented methods are here: http://docs.jquery.com/Plugins/Validation#Validator numberOfInvalids is missing - I'll add it. Jörn On Tue, Feb 10, 2009 at 3:27 PM, Raymond Camden rcam...@gmail.com wrote: One of the demos for Validation shows: var errors = validator.numberOfInvalids(); Going to the main list of methods for validator I do not see this documented anywhere. Where can I find the full list of methods I can call on validator?
[jQuery] Re: Delayed Checkboxes in IE
Worked a treat that, Ie will be the death of me. On Feb 10, 2:45 pm, Stephan Veigl stephan.ve...@gmail.com wrote: Hi John, It looks like IE doesn't send a change event when the checkbox has been clicked, only after the element has lost focus. You can test this by adding a debug alert to your change function. change your $(input:checkbox).change(function () {... line to $(input:checkbox).bind(change click keypress, function(){... to catch the checkbox every time it has been clicked (either with mouse or keyboard) by(e) Stephan 2009/2/10 John C j.cashm...@wigan.gov.uk: Has anyone any idea why the code below doesn't work correctly in IE. Basically what is supposed to happen is when the parent checkbox is checked the child ones are also supposed to be checked. This works fine in FireFox and Safari, but not in Internet Explorer, the child checkboxes only get checked when something else changes on the form, for instance you check another item. Any help would be great. --- div id=navigation ul lia href=test.htmItem /a ul lia href=test.htmItem/a/li lia href=test.htmItem /a ul lia href=test.htmItem/a/li lia href=test.htmItem/a/li /ul /li /ul /li lia href=test.htmItem /a ul lia href=test.htmItem /a ul lia href=test.htmItem/a/li lia href=test.htmItem /a ul lia href=test.htmItem/a/li lia href=test.htmItem/a/li lia href=test.htmItem/a/li lia href=test.htmItem/a/li lia href=test.htmItem/a/li /ul /li /ul /li lia href=test.htmItem/a/li /ul /li /ul /div script type=text/javascript src=http://ajax.googleapis.com/ajax/ libs/jquery/1.3.1/jquery.min.js/script script type=text/javascript $(document).ready(function() { $(#navigationullia).each(function () { $(this).before($(this).text()); $(this).remove(); }); var checknum = 0; $(#navigation a).each( function () { checknum = checknum +1; newInput = document.createElement(input); newInput.setAttribute(name,dchannel+checknum); newInput.setAttribute(id,dchannel+checknum); newInput.type = checkbox; newInput.value = $(this).attr('href').replace(/'/ig, \'); $(newInput).insertBefore(this); $(#dchannel+checknum).val($(#dchannel+checknum).val().replace (http://boston;, )); newLabel = document.createElement(label); newLabel.setAttribute(for,dchannel+checknum); newLabel.innerHTML = $(this).text(); $(newLabel).insertBefore(this); $(this).remove(); }); $(input:checkbox).change(function () { if($(this).attr(checked)) { $(this).parents(li:first).find(input:checkbox).each(function () { $(this).attr(checked, true); }); } else {
[jQuery] Re: [Validate] API list for main validator object
Ah ok - when I saw that missing, I assumed more was missing as well. Thank you. On Feb 10, 8:59 am, Jörn Zaefferer joern.zaeffe...@googlemail.com wrote: The documented methods are here:http://docs.jquery.com/Plugins/Validation#Validator numberOfInvalids is missing - I'll add it. Jörn
[jQuery] Re: [Validate] API list for main validator object
Added: http://docs.jquery.com/Plugins/Validation/Validator/numberOfInvalids There are many more methods on the validator object, but only those documented are considered part of the public API. On Tue, Feb 10, 2009 at 4:03 PM, Raymond Camden rcam...@gmail.com wrote: Ah ok - when I saw that missing, I assumed more was missing as well. Thank you. On Feb 10, 8:59 am, Jörn Zaefferer joern.zaeffe...@googlemail.com wrote: The documented methods are here:http://docs.jquery.com/Plugins/Validation#Validator numberOfInvalids is missing - I'll add it. Jörn
[jQuery] Re: How to get the CSS definitions of a class not existing in the DOM
Sorry, I just found this thread: http://groups.google.com/group/jquery-en/browse_thread/thread/7cbc9fb45f7dc133/578d5407199aaf31
[jQuery] Re: [validate] 'please wait' message on submission
Jörn - thanks for the quick response - I was a bit concerned that I hadn't made myself very clear, but you obviously got the idea.. Worked a treat! Thanks again. Ian
[jQuery] Re: [jQuery UI] UI/Datepicker Documentation broken
Works now Richard, Thanks On Feb 10, 9:20 pm, Richard D. Worth rdwo...@gmail.com wrote: I just updated it. Can you give it another shot? I only have IE6 on this machine. Thanks. - Richard On Tue, Feb 10, 2009 at 2:56 AM, zubin zubin...@yahoo.com wrote: Just letting you guys know that the documentation for UI/Datepicker is not showing (IE7)- Hide quoted text - - Show quoted text -
[jQuery] load page which includes swf and js functions
Hi, I'm trying to load a remote page using load function $('#middle').load(test.php); that page (test.php) has javascript functions that embed an swf using swf plugin. The problem is that it only loads html content and doesn't execute any javascript function. Any ideas? Thanks
[jQuery] Re: load page which includes swf and js functions
Are the functions actually being called? Which function are you trying to use? 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: adexcube alfonsoenci...@gmail.com To: jQuery (English) jquery-en@googlegroups.com Date: 02/10/2009 10:50 AM Subject:[jQuery] load page which includes swf and js functions Hi, I'm trying to load a remote page using load function $('#middle').load(test.php); that page (test.php) has javascript functions that embed an swf using swf plugin. The problem is that it only loads html content and doesn't execute any javascript function. Any ideas? Thanks inline: graycol.gifinline: ecblank.gif
[jQuery] Re: cycle plugin works on one page, but not on the other. NO DIFFERENCE!
lol On Feb 10, 9:27 am, visitorQ kzardko...@gmail.com wrote: It looks like you haven't included any styles on this page. What does Firebug say the size of the container is? 0? You haven't included any sizes on the images either. Tough to resize things dynamically within this info. = That was it!!! I just had to specify the size of the div container! div id=slideshow style=width:703px; height:302; a href=img src=images/slideshow/1.jpg border=0 //a a href=img src=images/slideshow/2.jpg border=0 //a a href=img src=images/slideshow/3.jpg border=0 //a a href=img src=images/slideshow/4.jpg border=0 //a a href=img src=images/slideshow/5.jpg border=0 //a a href=img src=images/slideshow/6.jpg border=0 //a a href=img src=images/slideshow/7.jpg border=0 //a /div Thank you so much Mike! You're the man!
[jQuery] Re: cycle plugin works on one page, but not on the other. NO DIFFERENCE!
lol On Feb 10, 9:27 am, visitorQ kzardko...@gmail.com wrote: It looks like you haven't included any styles on this page. What does Firebug say the size of the container is? 0? You haven't included any sizes on the images either. Tough to resize things dynamically within this info. = That was it!!! I just had to specify the size of the div container! div id=slideshow style=width:703px; height:302; a href=img src=images/slideshow/1.jpg border=0 //a a href=img src=images/slideshow/2.jpg border=0 //a a href=img src=images/slideshow/3.jpg border=0 //a a href=img src=images/slideshow/4.jpg border=0 //a a href=img src=images/slideshow/5.jpg border=0 //a a href=img src=images/slideshow/6.jpg border=0 //a a href=img src=images/slideshow/7.jpg border=0 //a /div Thank you so much Mike! You're the man!
[jQuery] Re: load page which includes swf and js functions
Well a simple test is to put an onload function in the body, it just simple doesn't work :( test.php ... body onload=alert('loaded') ... On 10 Feb, 16:01, Michael Lawson mjlaw...@us.ibm.com wrote: Are the functions actually being called? Which function are you trying to use? 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: adexcube alfonsoenci...@gmail.com To: jQuery (English) jquery-en@googlegroups.com Date: 02/10/2009 10:50 AM Subject: [jQuery] load page which includes swf and js functions Hi, I'm trying to load a remote page using load function $('#middle').load(test.php); that page (test.php) has javascript functions that embed an swf using swf plugin. The problem is that it only loads html content and doesn't execute any javascript function. Any ideas? Thanks graycol.gif 1KViewDownload ecblank.gif 1KViewDownload
[jQuery] Errors
Would somebody mind taking a look at this page http://consolidatedaggregates.com/ . I'm suddenly getting many cryptic jQuery errors. I'm not sure what is causing them because I don't know what they mean. Thanks
[jQuery] Re: modify from server two jquery elements in the same time
Well, if you HAD to stay HTML, you could split() the html. success: function(result){ var data1 = result.responseText.split([SPLIT CHARACTER]); etc ... you could use regular expressions, but json is so much more efficient.
[jQuery] jquery validate error
Hello, this is my first post - hope everthing goes fine :-) today I get a strange error trying to use the validation plugin from bassistance - used it several times before but never mentioned something like this (using latest v.1.5.1 jquery 1.3.1). Firebug shows me following error (my code follows at the end): validator.settings[on + event.type].call is not a function The error isn't shown if I remove the event options (onfocusout,onkeyup..) but I want to use the options of course. Also the blur event doesn't worked for me any more. I've tried for a few hours to change my code - e.g. remove the livequery optin - but nothing worked for me. Maybe someone has an idea. thx kind regards $(document).ready(function() { var formOptions = { focusInvalid: false, onfocusout: true, onkeyup: true, errorElement: span, submitHandler: function(form) { $(form).ajaxSubmit({ dataType: json, beforeSubmit: function(a,f,o) { o.dataType = html; $(#ajaxLoad).show(); }, success: function(data){ $(#ajaxLoad).hide(); } }); }, rules: { project[title]: {required: true} }, messages: { project[title]: {required: 'nbsp;'} } }; var validator = $(#project).livequery(function(){ $(this).validate(formOptions); }); });
[jQuery] Creating a copy of associative array
I cant figure out how to create a unique copy of an associate array. I need to create a backup of an array, but since arrays and objects are always passed by reference in javascript it ends up replicating whatever changes I do to the first array over to the backup. I would use the .slice() method but since the arrays are not initialized with new Array() it doesn't have that functionality. I've managed to get it to work using the following code, but when combined with jQuery it crashes the browser: Object.prototype.clone = function() { var newObj = (this instanceof Array) ? [] : {}; for (i in this) { if (i == 'clone') continue; if (this[i] typeof this[i] == object) { newObj[i] = this[i].clone(); } else newObj[i] = this[i] } return newObj; }; test = {'foo':{'bar':'orig message'}}; test2 = test.clone(); test3 = test; test2['foo']['bar'] = 'new message'; alert(test2['foo']['bar']); alert(test3['foo']['bar']); Any suggestions?
[jQuery] caching getScript() :: ajax question
hello, i am getting a script which calls back some json to my function showMyVideos. during my research in this group i read that getScript wouldn't cache. in my case i would like to add some cache (lazy loading) to my getScript function since it isn't necessary to update a already searched result (during one session). i am not an expert on jquery.ajax and didn't figured it out. i guess i messed it up with the execution of the link (remember: there's a callback function to call). # works, but doesn't cache $(#searchForm).submit(function() { $val = $('#searchText').val(); $url = 'http://gdata.youtube.com/feeds/api/videos?q=' + $val + 'alt=json-in-scriptcallback=showMyVideosmax-results=50format=5'; $.getScript($url); });
[jQuery] Re: load page which includes swf and js functions
I do have somewhat limited experience with this but the documentation says Load HTML from a remote file and inject it into the DOM. in reference to the load function, so I would think it's working as intended in only loading the html, not doing anything with it. 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: adexcube alfonsoenci...@gmail.com To: jQuery (English) jquery-en@googlegroups.com Date: 02/10/2009 11:12 AM Subject:[jQuery] Re: load page which includes swf and js functions Well a simple test is to put an onload function in the body, it just simple doesn't work :( test.php ... body onload=alert('loaded') ... On 10 Feb, 16:01, Michael Lawson mjlaw...@us.ibm.com wrote: Are the functions actually being called? Which function are you trying to use? 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: adexcube alfonsoenci...@gmail.com To: jQuery (English) jquery-en@googlegroups.com Date: 02/10/2009 10:50 AM Subject: [jQuery] load page which includes swf and js functions Hi, I'm trying to load a remote page using load function $('#middle').load(test.php); that page (test.php) has javascript functions that embed an swf using swf plugin. The problem is that it only loads html content and doesn't execute any javascript function. Any ideas? Thanks graycol.gif 1KViewDownload ecblank.gif 1KViewDownload inline: graycol.gifinline: ecblank.gif
[jQuery] Re: load page which includes swf and js functions
As a progress, the javascript functions are executed only if they're inside the body tags of the remote file!! Does someone know why? On 10 Feb, 16:17, Michael Lawson mjlaw...@us.ibm.com wrote: I do have somewhat limited experience with this but the documentation says Load HTML from a remote file and inject it into the DOM. in reference to the load function, so I would think it's working as intended in only loading the html, not doing anything with it. 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: adexcube alfonsoenci...@gmail.com To: jQuery (English) jquery-en@googlegroups.com Date: 02/10/2009 11:12 AM Subject: [jQuery] Re: load page which includes swf and js functions Well a simple test is to put an onload function in the body, it just simple doesn't work :( test.php ... body onload=alert('loaded') ... On 10 Feb, 16:01, Michael Lawson mjlaw...@us.ibm.com wrote: Are the functions actually being called? Which function are you trying to use? 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: adexcube alfonsoenci...@gmail.com To: jQuery (English) jquery-en@googlegroups.com Date: 02/10/2009 10:50 AM Subject: [jQuery] load page which includes swf and js functions Hi, I'm trying to load a remote page using load function $('#middle').load(test.php); that page (test.php) has javascript functions that embed an swf using swf plugin. The problem is that it only loads html content and doesn't execute any javascript function. Any ideas? Thanks graycol.gif 1KViewDownload ecblank.gif 1KViewDownload graycol.gif 1KViewDownload ecblank.gif 1KViewDownload
[jQuery] [autocomplete] sort two fields
I'm trying to build a stock symbol search field that will search both the symbol and the full name of the company. For example, search both AAPL and Apple Inc, or AMCC and Applied Micro Circuits Corp, and display both in the same row with character highlighting as in the usual autocomplete plugin. I'm still learning jQuery so this may be something simple, but here's my code. script type=text/javascript $(function(){ function formatItem(row) { return row[0] + (strongid: + row[1] + /strong); } function formatResult(row) { return row[0].replace(/(.+?)/gi, ''); } var data = [ {text:'APP', name:'Merrill Lynch Co Inc', url:'snapshot.php'}, {text:'AAPL', name:'Apple Inc', url: 'snapshot.php'}, {text:'AMAT', name:'Applied Materials Inc', url: 'snapshot.php'}, {text:'AAPI', name:'Advanced Plt Pharmaceuticals Inc', url: 'snapshot.php'}, {text:'AMCC', name:'Applied Micro Circuits Corp', url: 'snapshot.php'} ]; $(#searchbox).autocomplete(data, { formatItem: function(item) { return item.text; } }).result(function(event, item) { location.href = item.url; }); }); /script And for the html I just have an input box: input type=text id=searchbox I have it working displaying the 'text' element of the array, but it ignores the 'name' element I added to the example code from the plugin page. 2ND QUESTION: I want to add a row at the bottom of the autocomplete list that never changes, how do I append to the results list?
[jQuery] combine slide and fade
Hei there, i want to combine the slideUp with a fadeOut and the slideDown with a fadeIn. So while the sliding takes place the effect fade should fire: function toggleContent(){ if(!$(this).find(.imageBox).hasClass(active)){ // animate mit fade in var toHide=$(.contentList .active), toShow=$(this).find(.imageBox), hideHeight = toHide.height(), showHeight = toShow.height(), difference = showHeight / hideHeight; toShow.addClass(active).css({ height: 0, overflow: 'hidden'}).fadeIn(700); toHide.removeClass(active).animate({height:hide, opacity:'hide'},{ step: function(now) { //console.log(now/toHide.height()) var current = (hideHeight - now) * difference; if ($.browser.msie || $.browser.opera) { current = Math.ceil(current); } toShow.height( current ); //toHide.css(opacity, 1-now/toHide.height()) // this works but sucks to much recources }, duration: 500, easing: swing, complete: function() { } }); } } my problem is now: the fadeIn of toShow works, but i don't know how to fadeOut the toHide somebody has a clue or a workaround? cheers chris
[jQuery] [autocomplete ] Re: sort two fields
Updating title. This is using the autocomplete plugin
[jQuery] The order of these conditions should not matter
Here's my JS: http://pastebin.com/m6091a365 And the accompanying HTML: http://pastebin.com/m30c57ea6 For some reason, the if($(pay_... condition that comes first gets overridden by the one that follows it. The :checked states you see in the JS are mutually exclusive because they are a part of the same radio group (as seen in the HTML). The showCC and showCheck functions work perfectly in the focus() context (they switch normally). The reason that I'm setting this up this way is so that a user will only see the payment region that they need to see. Thanks, Thomas Allen
[jQuery] Re: Errors
Pulling the page up in FF3 on Windows resulted in no errors at all, the Cycle plugin worked fine on the retouching page, not sure what else you want people to look for/help with On Feb 10, 11:17 am, atomk akob...@adamkobrin.com wrote: Would somebody mind taking a look at this pagehttp://consolidatedaggregates.com/ . I'm suddenly getting many cryptic jQuery errors. I'm not sure what is causing them because I don't know what they mean. Thanks
[jQuery] jQuery / FF3 problem using show()
I wrote a relatively simple jQuery script to pick a random item from a list and show it. The other items are hidden. The script works in FF2, IE7, and IE8 RC 2. It does not work properly in FF3. A simple show() call is used to show the UL element after one of the items is chosen. The evidence suggests that the show() method is not working as expected in the specific circumstances of the test. You can see the problem on this test page: http://www.johncardinal.com/tests/jqff3/index.htm The problem has some odd characteristics that are described on the test page. Does anyone have an idea what's going on, and how I can avoid the issue? Is there a bug in my script? Thanks! John
[jQuery] Re: Errors
Thanks for looking. In FF3 on a Mac I get tons of errors in the Error Console... On Feb 10, 9:20 am, MorningZ morni...@gmail.com wrote: Pulling the page up in FF3 on Windows resulted in no errors at all, the Cycle plugin worked fine on the retouching page, not sure what else you want people to look for/help with On Feb 10, 11:17 am, atomk akob...@adamkobrin.com wrote: Would somebody mind taking a look at this pagehttp://consolidatedaggregates.com/ . I'm suddenly getting many cryptic jQuery errors. I'm not sure what is causing them because I don't know what they mean. Thanks
[jQuery] Re: selector to return the number of rows in a table before the row I just selected
rowsBefore = row.rowIndex; Ok, but jQuery(#activator + input).parent().parent(); selects the row, but when I try to get rowIndex of that selected row I get undefined back. var trow = jQuery(#activator + input).parent().parent(); alert(trow.attr(class)); // the class of my row alert(trow.rowIndex); // returns undefined. Cheers, Bryan Rasmussen
[jQuery] Re: jQuery / FF3 problem using show()
moving the link above the script will likely fix this. On Tue, Feb 10, 2009 at 12:21 PM, JohnnyCee jfcardi...@gmail.com wrote: I wrote a relatively simple jQuery script to pick a random item from a list and show it. The other items are hidden. The script works in FF2, IE7, and IE8 RC 2. It does not work properly in FF3. A simple show() call is used to show the UL element after one of the items is chosen. The evidence suggests that the show() method is not working as expected in the specific circumstances of the test. You can see the problem on this test page: http://www.johncardinal.com/tests/jqff3/index.htm The problem has some odd characteristics that are described on the test page. Does anyone have an idea what's going on, and how I can avoid the issue? Is there a bug in my script? Thanks! John
[jQuery] Re: Creating a copy of associative array
You can use jQuery's extend() to do it for you: test = {'foo':{'bar':'orig message'}}; var test2 = {} $.extend({}, test2, test); There's probably a simpler way. I'd also be interested to know. :) On Feb 10, 6:03 am, twooton tcwoo...@gmail.com wrote: I cant figure out how to create a unique copy of an associate array. I need to create a backup of an array, but since arrays and objects are always passed by reference in javascript it ends up replicating whatever changes I do to the first array over to the backup. I would use the .slice() method but since the arrays are not initialized with new Array() it doesn't have that functionality. I've managed to get it to work using the following code, but when combined with jQuery it crashes the browser: Object.prototype.clone = function() { var newObj = (this instanceof Array) ? [] : {}; for (i in this) { if (i == 'clone') continue; if (this[i] typeof this[i] == object) { newObj[i] = this[i].clone(); } else newObj[i] = this[i] } return newObj; }; test = {'foo':{'bar':'orig message'}}; test2 = test.clone(); test3 = test; test2['foo']['bar'] = 'new message'; alert(test2['foo']['bar']); alert(test3['foo']['bar']); Any suggestions?
[jQuery] jq.ui and the embedded autocomplete plugin
Earlier I received an embedded autocomplete plugin, when I downloaded a jquery.ui compilation. Now this plugin is missing and it seems like the rc2 version, I still have got here, does not catch on (no errors, just does not react in any way) anymore. Is this still maintained? Where can I get it or should I better look elsewhere? --Jan
[jQuery] Re: jQuery / FF3 problem using show()
On Feb 10, 1:14 pm, pete higgins phigg...@gmail.com wrote: moving the link above the script will likely fix this. Pete, Thanks! That did fix it. I presume it's a timing/sequence issue related to when ready() is called versus when the linked CSS file is loaded. After posting the first message I discovered that the issue affects Chrome and Safari, too. John
[jQuery] Re: form plugin and prettypopin/lightbox
I am using prettypopin for the link on the index page to open updatephoto.php. The index page also uses some other jQuery features. I've included the jQuery in case you see something that may be wrong or conflicting, and the HTML link tag. Thanks Pasquale jQuery: SCRIPT type=text/javascript src=/includes/jquery.js/SCRIPT SCRIPT type=text/javascript src=/includes/uicore.js/SCRIPT SCRIPT type=text/javascript src=/includes/uidrag-drop-sort.js/ SCRIPT SCRIPT type=text/javascript src=/includes/uiaccordion.js/ SCRIPT SCRIPT type=text/javascript src=/includes/jquery_pretty_popin.js charset=utf-8/SCRIPT SCRIPT type=text/javascript src=/includes/jquery_multifile.js/ SCRIPT SCRIPT type=text/javascript $(document).ready(function() { $('#photolist').sortable({ items: ' div', opacity: 0.7, revert: true, handle: 'img.handle', update: function () { var order = $('#photolist').sortable('serialize'); $.get('sortphotos.php?'+order); } }); $('#trash').droppable({ accept: '#photolist div', tolerance: 'pointer', drop: function(event, ui) { var pidarray = ui.draggable.attr('id').split('_'); $(#sortorder).load('deletephotos.php?pid='+pidarray[1]); $(ui.draggable).hide('slow', function() { $(this).remove(); }); } }); $('#accordion').accordion({ header: 'div.accordion_title', alwaysOpen: false, clearStyle: true, autoHeight: false }); $(a[rel^='prettyPopin']).prettyPopin({ modal : true, callback: function(){ window.location.reload(); } }); $('#filemulti').MultiFile({ STRING: { remove: 'img src=/includes/pics/bin.gif height=16 width=16 alt=x /' } }); }); /SCRIPT HTML: A href=updatephoto.php?photo=headshot rel=prettyPopinIMG src=pics/hs2.jpg class=border1 alt= //A On Feb 10, 6:38 am, Mike Alsup mal...@gmail.com wrote: On Feb 10, 12:04 am, spiderling webmas...@spiderling.ca wrote: I am using prettyPopin lightbox for a file upload form, and I am also using jQuery Form Plugin to upload the image file and update it accordingly. Unfortunately, the file is not being sent. The $_FILES array is empty. I've included the jQuery and HTML being used. If someone can please look and let me know if I'm missing something, because from all the examples I've seen it doesn't seem to require too much to upload a file. Thanks. updatephoto.php jQuery: $(document).ready(function() { var options = { target: '#divupdate', beforeSubmit : function() { $('#divupdate').html('img src=pics/loader.gif border=0 alt=Please wait... /'); } }; $('#phupdt').ajaxForm(options); // $('#phupdt').submit(function() { // $(this).ajaxSubmit(options); // return false; // }); }); updatephoto.php HTML: div id=divupdate br /br / form id=phupdt action=updtphresponse.php method=post enctype=multipart/form-data input type=hidden name=MAX_FILE_SIZE value=525 / table tr tdinput type=file name=headshot size=30 //td /tr tr tdinput type=submit name=request value=Update photo //td /tr /table /form /div updtphresponse.php HTML: print_r($_FILES); $html = ' table tr tdbSuccessfully updated./b/td /tr /table '; echo $html; Everything you posted looks fine. Where does the prettyPopin lightbox come into play? Mike
[jQuery] Re: tabs, ajax mode, spinner not removed
On Tue, Feb 10, 2009 at 4:21 AM, Klaus Hartl klaus.ha...@googlemail.com wrote: Hello Brian, would you mind to file a bug for this? --Klaus I don't mind at all.In fact, I've found a partial fix. Not really a fix, but a lead, anyway. However, I don't see any obvious way to reset my forgotten password for Trac. There really should be a link for that on the login page. I'm referring to the UI Trac site, not the main jquery bugtracker, for which I do have my password. I did search Trac before posting, btw, and found a similar bug but it's a year old and closed. Anyway, I'll leave some info here, for now. I altered the cleanup method (line 494) of ui.tabs.js var cleanup = function() { self.$tabs.filter('.ui-tabs-loading').removeClass('ui-tabs-loading') .each(function() { if (o.spinner) //inner(this).parent().html(inner(this).data('label.tabs')); inner(this).html(inner(this).find('em').data('label.tabs')); }); self.xhr = null; }; While the data is stored inside the EM, inner(this) here is actually the A tag. The change above causes the spinner to be properly removed on tab load. But, when I remove the spinner option and let the default text be used, inner(this) is then an EM tag and the loading ... text is not removed when a tab loads (with my change in place) So, the best I can figure out so far is that the 'ui-tabs-loading' class is applied to a different element--A or EM--depending on what's inside the tab's A tag. Thus, the filter in cleanup() will return a different element. Or something like that. I'm going to pursue that a bit more. I did wonder if the problem was related to nesting an img inside an em, but switching the doctype had no effect. If I figure out how to log in to UI Trac I'll post all of this there along with anything else I uncover.
[jQuery] Re: jq.ui and the embedded autocomplete plugin
After the jQuery UI 1.6rc2 release, the Autocomplete plugin was removed pending some further refactoring and changes for inclusion in a future version of jQuery UI. It is still being developed, but will not be in the final 1.6 version (and has not been in any of the later release candidates: rc3-rc6). The same happened at the same time with 3 other plugins that were in the 1.6rc2: colorpicker, magnifier, and spinner. The planning and development for these (where we welcome feedback) continues here: http://wiki.jqueryui.com/ColorPicker http://wiki.jqueryui.com/SelectComboboxAutocomplete http://wiki.jqueryui.com/Spinner Note: If you have any further questions about jQuery UI, I invite you to join the jQuery UI mailing list: http://groups.google.com/group/jquery-ui Thanks. - Richard On Tue, Feb 10, 2009 at 1:22 PM, Jan Limpens jan.limp...@gmail.com wrote: Earlier I received an embedded autocomplete plugin, when I downloaded a jquery.ui compilation. Now this plugin is missing and it seems like the rc2 version, I still have got here, does not catch on (no errors, just does not react in any way) anymore. Is this still maintained? Where can I get it or should I better look elsewhere? --Jan
[jQuery] Re: jq.ui and the embedded autocomplete plugin
Thanks a lot! Any idea, where autocomplete sans ui has its page or repository? Anything further, I'll move to the other list... On Feb 10, 4:45 pm, Richard D. Worth rdwo...@gmail.com wrote: After the jQuery UI 1.6rc2 release, the Autocomplete plugin was removed pending some further refactoring and changes for inclusion in a future version of jQuery UI. It is still being developed, but will not be in the final 1.6 version (and has not been in any of the later release candidates: rc3-rc6). The same happened at the same time with 3 other plugins that were in the 1.6rc2: colorpicker, magnifier, and spinner. The planning and development for these (where we welcome feedback) continues here: http://wiki.jqueryui.com/ColorPickerhttp://wiki.jqueryui.com/SelectComboboxAutocompletehttp://wiki.jqueryui.com/Spinner Note: If you have any further questions about jQuery UI, I invite you to join the jQuery UI mailing list: http://groups.google.com/group/jquery-ui Thanks. - Richard On Tue, Feb 10, 2009 at 1:22 PM, Jan Limpens jan.limp...@gmail.com wrote: Earlier I received an embedded autocomplete plugin, when I downloaded a jquery.ui compilation. Now this plugin is missing and it seems like the rc2 version, I still have got here, does not catch on (no errors, just does not react in any way) anymore. Is this still maintained? Where can I get it or should I better look elsewhere? --Jan
[jQuery] Re: jq.ui and the embedded autocomplete plugin
On Tue, Feb 10, 2009 at 1:55 PM, Jan Limpens jan.limp...@gmail.com wrote: Thanks a lot! Any idea, where autocomplete sans ui has its page or repository? The documentation is here http://docs.jquery.com/UI/Autocomplete The 1.6rc2 version is here http://jquery-ui.googlecode.com/svn/tags/1.6rc2/ui/ui.autocomplete.js and any further work is being done in a dedicated development branch here http://jquery-ui.googlecode.com/svn/branches/dev/autocomplete/ - Richard
[jQuery] Re: jq.ui and the embedded autocomplete plugin
Ah, never mind, found it: http://jquery-ui.googlecode.com/svn/branches/dev/autocomplete/ui/ On Feb 10, 4:55 pm, Jan Limpens jan.limp...@gmail.com wrote: Thanks a lot! Any idea, where autocomplete sans ui has its page or repository? Anything further, I'll move to the other list... On Feb 10, 4:45 pm, Richard D. Worth rdwo...@gmail.com wrote: After the jQuery UI 1.6rc2 release, the Autocomplete plugin was removed pending some further refactoring and changes for inclusion in a future version of jQuery UI. It is still being developed, but will not be in the final 1.6 version (and has not been in any of the later release candidates: rc3-rc6). The same happened at the same time with 3 other plugins that were in the 1.6rc2: colorpicker, magnifier, and spinner. The planning and development for these (where we welcome feedback) continues here: http://wiki.jqueryui.com/ColorPickerhttp://wiki.jqueryui.com/SelectCo... Note: If you have any further questions about jQuery UI, I invite you to join the jQuery UI mailing list: http://groups.google.com/group/jquery-ui Thanks. - Richard On Tue, Feb 10, 2009 at 1:22 PM, Jan Limpens jan.limp...@gmail.com wrote: Earlier I received an embedded autocomplete plugin, when I downloaded a jquery.ui compilation. Now this plugin is missing and it seems like the rc2 version, I still have got here, does not catch on (no errors, just does not react in any way) anymore. Is this still maintained? Where can I get it or should I better look elsewhere? --Jan
[jQuery] Re: selector to return the number of rows in a table before the row I just selected
Try: alert( trow.get(0).rowIndex ); On Feb 10, 8:19 am, pantagruel rasmussen.br...@gmail.com wrote: rowsBefore = row.rowIndex; Ok, but jQuery(#activator + input).parent().parent(); selects the row, but when I try to get rowIndex of that selected row I get undefined back. var trow = jQuery(#activator + input).parent().parent(); alert(trow.attr(class)); // the class of my row alert(trow.rowIndex); // returns undefined. Cheers, Bryan Rasmussen
[jQuery] Cycle Jumps in IE
Hi All, jQuery file: jquery-1.3.1.min.js jQuery Cycle file: jquery.cycle.all.min.js (I believe these are the most recent versions, downloaded both today) The cycle with pager is working fine on my site in all browsers. In IE7, when I refresh the page, the 4 images contained in the cycle ALL show at once - in a cascade - before collapsing into their desired div. It functions fine in IE (fading through the images perfectly with the pager), but how can I get rid of this jump? All 4 images show at once initially before they seem to fix themselves and fall into place. Any ideas?
[jQuery] ID's start with #
Hello, How do I find an element who's id starts with #? For example: textarea id=#SAM1/textarea the following does not seem to work $(##SAM1).text(hello); Any help is greatly appreciated. thank you, Sam
[jQuery] Re: selector to return the number of rows in a table before the row I just selected
rowIndex is a DOM property, so you'd have to use alert(trow [0].rowIndex); On Feb 10, 10:19 am, pantagruel rasmussen.br...@gmail.com wrote: rowsBefore = row.rowIndex; Ok, but jQuery(#activator + input).parent().parent(); selects the row, but when I try to get rowIndex of that selected row I get undefined back. var trow = jQuery(#activator + input).parent().parent(); alert(trow.attr(class)); // the class of my row alert(trow.rowIndex); // returns undefined. Cheers, Bryan Rasmussen
[jQuery] Re: ID's start with #
Try double backslash escaping the second #-sign: $(#\\#SAM1).text(hello); On Feb 10, 7:36 am, Shredder36 shredde...@gmail.com wrote: Hello, How do I find an element who's id starts with #? For example: textarea id=#SAM1/textarea the following does not seem to work $(##SAM1).text(hello); Any help is greatly appreciated. thank you, Sam
[jQuery] Re: ID's start with #
Oh yeah, if you want to put text in a textarea, you're suppose to use val() instead of text(): $(#\\#SAM1).val(hello); On Feb 10, 9:04 am, James james.gp@gmail.com wrote: Try double backslash escaping the second #-sign: $(#\\#SAM1).text(hello); On Feb 10, 7:36 am, Shredder36 shredde...@gmail.com wrote: Hello, How do I find an element who's id starts with #? For example: textarea id=#SAM1/textarea the following does not seem to work $(##SAM1).text(hello); Any help is greatly appreciated. thank you, Sam
[jQuery] Re: Cycle Jumps in IE
The cycle with pager is working fine on my site in all browsers. In IE7, when I refresh the page, the 4 images contained in the cycle ALL show at once - in a cascade - before collapsing into their desired div. It functions fine in IE (fading through the images perfectly with the pager), but how can I get rid of this jump? All 4 images show at once initially before they seem to fix themselves and fall into place. You're probably hitting an issue with the ready event in IE which will be fixed shortly with v1.3.2: http://dev.jquery.com/ticket/3988 Can you try it with this version of jQuery? http://code.jquery.com/nightlies/jquery-2009-01-28.js Mike
[jQuery] jQuery.tablesorter(destroy); ?????
Is there a way to destroy the tablesorter object like: jQuery.tablesorter(destroy); I don't see anything in the documentation or code. Thanks! Jay -- View this message in context: http://www.nabble.com/jQuery.tablesorter%28%22destroy%22%29tp21939503s27240p21939503.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.