[jQuery] Replace newline char with comma using jquery
Hello frendz, I'm trying to replace newline char frm Google finance csv file with comma but its not happening pls help. http://finance.google.com/finance/historical?q=GOOGstartdate=May+1%2C+2009enddate=May+5%2C+2009start=225num=25output=csv I'm using following code csvString=csvString.replace('\n',''); I think there is some platform newline char issue. how to do this using jquery? pls help
[jQuery] Re: Exclude single td from whole tr
WOW! That works perfect for me! Thanks!!! On 19 Mai, 19:50, aquaone aqua...@gmail.com wrote: Either you can bind to the td's that don't contain the checkbox or you can delegate and check the target of the clicked event to make sure it's not the td that has the checkbox. The former would be $(tr[link] td:not(:has(:checkbox))) I believe, and is the easiest. Hopefully others can chime in about which is best or perhaps yet another solution. aquaone On Tue, May 19, 2009 at 07:45, heohni heidi.anselstet...@consultingteam.dewrote: I found a good solution to make a complete table row clickable: tr link=/folder/here.php. $(tr[link]).bind(click, function(){ var link = $(this).attr(link); window.location.href = link; }); Only problem in my case: My tbale has as first td a checkbox to select my products. How can I change the jquery above to exclude a td containing a input type=checkbox? Is there a way? Thanks!!
[jQuery] Re: is it possible to add elements to validate on fly? [validate]
You have to specify that for each field, eg. name[0]: required, name[1]: required etc. Jörn On Wed, May 20, 2009 at 7:24 AM, quard qua...@gmail.com wrote: And I can use in my rules this : Name[] : { required : true} ?? On May 19, 6:51 pm, Jörn Zaefferer joern.zaeffe...@googlemail.com wrote: Make each name unique, eg. name[0], name[1] and so on. As long as the names are unique, the validation plugin can pick up new elements and validate them. In addition, rules must exist for each name. Using inline rules (metadata, or classes and attributes) is the best approach here. Otherwise use the rules method to add rules:http://docs.jquery.com/Plugins/Validation/rules Jörn On Tue, May 19, 2009 at 3:23 PM, quard qua...@gmail.com wrote: My form has multiple elements like Name[] , which added via AJAX call. And I want to add them to validation check. How can I do it?
[jQuery] Re: is it possible to add elements to validate on fly? [validate]
Mm, it's true, but the subject is to add elements to validate on fly. As I understand, when validate function calls, plugin populate elements only from config file, and does't look at overs On May 20, 12:41 pm, Jörn Zaefferer joern.zaeffe...@googlemail.com wrote: You have to specify that for each field, eg. name[0]: required, name[1]: required etc. Jörn On Wed, May 20, 2009 at 7:24 AM, quard qua...@gmail.com wrote: And I can use in my rules this : Name[] : { required : true} ?? On May 19, 6:51 pm, Jörn Zaefferer joern.zaeffe...@googlemail.com wrote: Make each name unique, eg. name[0], name[1] and so on. As long as the names are unique, the validation plugin can pick up new elements and validate them. In addition, rules must exist for each name. Using inline rules (metadata, or classes and attributes) is the best approach here. Otherwise use the rules method to add rules:http://docs.jquery.com/Plugins/Validation/rules Jörn On Tue, May 19, 2009 at 3:23 PM, quard qua...@gmail.com wrote: My form has multiple elements like Name[] , which added via AJAX call. And I want to add them to validation check. How can I do it?
[jQuery] Re: is it possible to add elements to validate on fly? [validate]
Thats why I suggest using inline rules. Take a look at the demo here, it just adds new elements to the form with classes and attributes to define the rules: http://jquery.bassistance.de/validate/demo/dynamic-totals.html Jörn On Wed, May 20, 2009 at 9:46 AM, quard qua...@gmail.com wrote: Mm, it's true, but the subject is to add elements to validate on fly. As I understand, when validate function calls, plugin populate elements only from config file, and does't look at overs On May 20, 12:41 pm, Jörn Zaefferer joern.zaeffe...@googlemail.com wrote: You have to specify that for each field, eg. name[0]: required, name[1]: required etc. Jörn On Wed, May 20, 2009 at 7:24 AM, quard qua...@gmail.com wrote: And I can use in my rules this : Name[] : { required : true} ?? On May 19, 6:51 pm, Jörn Zaefferer joern.zaeffe...@googlemail.com wrote: Make each name unique, eg. name[0], name[1] and so on. As long as the names are unique, the validation plugin can pick up new elements and validate them. In addition, rules must exist for each name. Using inline rules (metadata, or classes and attributes) is the best approach here. Otherwise use the rules method to add rules:http://docs.jquery.com/Plugins/Validation/rules Jörn On Tue, May 19, 2009 at 3:23 PM, quard qua...@gmail.com wrote: My form has multiple elements like Name[] , which added via AJAX call. And I want to add them to validation check. How can I do it?
[jQuery] Re: Javascript error on IE
give cornerz a go http://labs.parkerfox.co.uk/cornerz/ On May 19, 5:12 pm, Aaron Lee waifun...@gmail.com wrote: Thanks! I tracked it down to the use of curvycornerhttp://www.curvycorners.net/(whichbtw causes IE to pop up operation aborted error when you visit the site) I did $(.class_name).corner() and comment out that line works. So the mystery is solved but I wonder if anyone can recommend a good jQuery plugin for rounded corner which works across browsers? -Aaron On Tue, May 19, 2009 at 6:07 AM, ryan.j ryan.joyce...@googlemail.comwrote: it's going to be one of your selectors - if you're at a loss where to start maybe just chop out functions until it starts working, and then look more closely at what it was doing in that function. On May 19, 7:00 am, Aaron Lee waifun...@gmail.com wrote: Hi, I got the following error when I render the page using jquery-1.3.2.min.js Line: 20 Char: 2424 Error: Exception thrown and not caught Code: 0 URL: ... I then replaced it with jquery-1.3.2.source.js and the exception was thrown at: Sizzle.filter = function(expr, set, inplace, not){ snip // Improper expression if ( expr == old ) { if ( anyFound == null ) { throw Syntax error, unrecognized expression: + expr; } else { break; } } snip } Any ideas? -Aaron
[jQuery] Re: is it possible to add elements to validate on fly? [validate]
Oh, my mistake. Thanks, I'll check it On May 20, 12:50 pm, Jörn Zaefferer joern.zaeffe...@googlemail.com wrote: Thats why I suggest using inline rules. Take a look at the demo here, it just adds new elements to the form with classes and attributes to define the rules:http://jquery.bassistance.de/validate/demo/dynamic-totals.html Jörn On Wed, May 20, 2009 at 9:46 AM, quard qua...@gmail.com wrote: Mm, it's true, but the subject is to add elements to validate on fly. As I understand, when validate function calls, plugin populate elements only from config file, and does't look at overs On May 20, 12:41 pm, Jörn Zaefferer joern.zaeffe...@googlemail.com wrote: You have to specify that for each field, eg. name[0]: required, name[1]: required etc. Jörn On Wed, May 20, 2009 at 7:24 AM, quard qua...@gmail.com wrote: And I can use in my rules this : Name[] : { required : true} ?? On May 19, 6:51 pm, Jörn Zaefferer joern.zaeffe...@googlemail.com wrote: Make each name unique, eg. name[0], name[1] and so on. As long as the names are unique, the validation plugin can pick up new elements and validate them. In addition, rules must exist for each name. Using inline rules (metadata, or classes and attributes) is the best approach here. Otherwise use the rules method to add rules:http://docs.jquery.com/Plugins/Validation/rules Jörn On Tue, May 19, 2009 at 3:23 PM, quard qua...@gmail.com wrote: My form has multiple elements like Name[] , which added via AJAX call. And I want to add them to validation check. How can I do it?
[jQuery] jqModal hash undefined
Hi, I'm having problems with hash $(a.iwmodal).live(click,function(event){ event.preventDefault(); var target = $(#infowindow); target.jqm({ ajax: $(this).attr(href), trigger: $(this), modal: true, overlay: 60, onLoad: modal_options, onHide: function(hash) { hash.w.fadeOut(200,function(){ hash.o.remove(); target.html(); }); } }).jqmShow(); ; }); var modal_options = function(hash){ alert(hash.t); } I always get hash.t is undefined. Please help. i need to pass trigger to modal_options. And hash won't work. Thank you
[jQuery] Re: problems with ajaxSubmit and files when file(s) not selected
Hi, Thanks - I think that did the trick. Christian On May 19, 8:05 pm, Mike Alsup mal...@gmail.com wrote: This works fine as long as the user selects a file. The file plus the text form elements are send to the server. Some intercepted traffic: -7d92e142190a Content-Disposition: form-data; name=UserId 9bdfa5be-0608-4c14-92cd-defc92d64850 -7d92e142190a Content-Disposition: form-data; name=address_uid 1 -7d92e142190a Content-Disposition: form-data; name=IsLockedOut False The body(?) has elements that are separated by the boundary string (in this case 7d92e142190a). However, if the user does not select a file the body's intercepted traffic looks like this: UserId=3d7edf4d-84cb-4d03-87fa-26edfbebc6a0address_uid=3IsLockedOut=falseusername=testemail= (more like a GET request) If you want to force the multipart enctype then set the iframe option to true. var options = { iframe: true, url: %= Url.Content(../../Account/Upload) %, // other options... });- Hide quoted text - - Show quoted text -- Hide quoted text - - Show quoted text -
[jQuery] Negate a validation checkbox
Hi all, I have checkbox that if the user check it, the near tetxbox is no more required. In the normal case, I have: myTextbox: { required: #myCheckbox:checked }, How can I negate this? Simply speaking, get the tetxbox no required if the checkbox is checked. Thanks in advance. Luigi
[jQuery] Re: Closing jqModal from inside of content loaded with AJAX
On May 16, 1:33 pm, wardenik radek.anton...@gmail.com wrote: Hi, I've put the sample code here:http://www.warden.pl/jq/test1/ Any help appreciated cause I'm out of ideas... :/ After clicking Reload button, the same ajax.php is loaded, but the closeme doesn't work any more. Nor the test me which is invoked as you have written earlier. Anybody?
[jQuery] Re: non-recursive find?
Thank you for your help! By using directly children() I got the result I wanted. I had obviously misunderstood some JQuery concepts. However, another problem raised that is related to this one. In my XML there is a dot (.) in tag name like P108B.was_produced_by. If I use find() I could write something like this: $(xml).find(P98B\\.was_born,P100B\\.died_in,P108B\ \.was_produced_by); And it worked but this is not working: $(xml).children(P10B\\.contains,P89B\\.contains); Any ideas about that?
[jQuery] Re: How to print json data, key and value
Hi Charlie, I'm not good at explaining the exact terms javascript definitions for value and key but they are javascript identifiers? change it to what their values are in the array, works great what I want to do is to print the name and the value of a json object without knowing what the object has inside. The only thing I know is that inside the json object there are only [{name:value,name:value,name:value}], the object is not fixed lenght and the name:value are not always the same. Is it possible? -- Massimiliano Marini m...@linuxtime.it
[jQuery] Re: adding $(script) node actually runs the script - correct behavior?
I don't see the point. That script tag you added is not going to be evaluated anytime, it will just sit there doing nothing. You'll have to move it to the head to execute it. On May 20, 2:17 am, Paul Tarjan ptar...@gmail.com wrote: I actually wanted to append the text to the document. Here is how I'm working around it, but I thought building up the tags using jquery functions was the preferred method. var embed = $(span/).append( $(span/) .text(data) .attr(id, wnval) ).html(); embed = embed + 'scriptvar ' + wnval + ' = function(data) { document.getElementById(' + wnval + ').innerHTML = data; }/' + 'script' + 'script src=http://webnumbr.com/'+ val + '.json (callback=' + wnval + ')/' + 'script' it works fine this way, but in my original method (see OP) I had expected jquery to just add the script to the span instead of adding it to the document and evaluating it. On May 18, 10:57 pm, Ricardo ricardob...@gmail.com wrote: Script elements are not really appended. To ensure execution you have to append them to the head of the document or eval them. jQuery does the latter, so the element ends up not being in the DOM at all. What are you trying to achieve? There's no point in creating a script tag when you can just declare a function instead. On May 18, 8:40 pm, PaulTarjanptar...@gmail.com wrote: If I have a node that isn't in the DOM, and then I add a script to it, then it is actually executed. Example Expected behavior : s variable contains the string scriptalert('hi') /script. Observed behavior : alert box pop up and s contains script var s = $(span/).append($(script/).text(alert('hi'))).html() script You can see it running here :http://paulisageek.com/tmp/jquery-script.html Am I doing something wrong? Can I not write javascript from within jquery?
[jQuery] search by (Filter by name,age,date ) any plugin in jquery
Hi all , My requirement is search by filter , So is there any search with selected option plugin , Also can u please tell select name=cmd_select_category id=cmd_select_category option value=anyAny word/option option value=dateDate/option option value=ageAge/option option value=subjectsubject/option /select input type=text name=txt_search id=txt_search input type=submit value=Search onClick = search_keyword('cmd_select_category','txt_search') How to bring the cmd_select_category value, and txt_search in the search_keyword function -- உங்கள் நண்பன் பரணி குமார் Regards B.S.Bharanikumar POST YOUR OPINION http://bharanikumariyerphp.site88.net/bharanikumar/
[jQuery] Jquery plugin validation remote option
$(document).ready(function() { var valprod = $(#frmProduct).validate({ onkeyup:false, rules: { txtProduct:{ required: true, minlength: 4, productCheck: true } } }); valprod.resetForm(); }); jQuery.validator.addMethod('productCheck', function(productname) { var postURL = product/confirm_prod; $.ajax({ cache:false, async:false, type: POST, data: txtProduct= + productname, url: postURL, success: function(msg) { result = (msg=='TRUE') ? true : false; }, }); return result; }, 'Record Found' ); my only issue is whenever 1st time it checks the record if found record it display message Record Found but whenever i try to change my textbox value it still gives me this message. it does not get reset if record not found.
[jQuery] .autoComplete/.autocomplete is not a function
Good day! I am using jQuery 1.3.2 with the autocomplete 1.2.5 plugin, however, I keep on getting $(#id_here).autcomplete is not a function error. Here's my code: script type=text/javascript src=jquery-1.3.2.min.js/script script type=text/javascript src=jquery.bgiframe.js/script script type=text/javascript src=jquery.auto-complete-1.2.5.js/ script script type=text/javascript var data = prod_list.php; $(document).ready(function(){ $(#id_num).autoComplete(data); //$(#id_num).autocomplete(data); - also doesn't work. }); /script What's wrong with my code? Thanks.
[jQuery] Can't get JQuery to work, Pls Help
Hi I'm using Eclispse for a small project and trying out Jquery for the first time. I have downloaded the jquery-1.3.2.min.js file and reference it as i should in my page, However the script does not seem to work and I get a firebug error '$ is not defined'. The jquery-1.3.2.min.js file is in the same directory as as my webpage. This is the following code I'm trying to run. %@ page language=java contentType=text/html; charset=ISO-8859-1 pageEncoding=ISO-8859-1% !DOCTYPE html PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN http:// www.w3.org/TR/html4/loose.dtd html head meta http-equiv=Content-Type content=text/html; charset=ISO-8859-1 script type=text/javascript src=jquery-1.3.2.min.js/script style type=text/css #box { background:red; width:80px; height:80px; } /style script type=text/javascript $(document).ready(function(){ $('a').click(function() { $('#box').fadeOut(); }); }); /script titleTest/title /head body div id=box/div a href=#Link/a /body /html Can someone please help.
[jQuery] Superfish: Mega Menu Ability
Hi Cy Morris, Firstly, great extension, love it!! Just wondering if it has the ability to be easily adapted into a mega menu style? For example: http://www.ea.com/ or http://www.gettyimages.com/ Basically, I guess I am after the ability to have multiple menu items in the one drop down, if that makes sense? I was looking through the code, but before I try anything, is there an easier way to adapt the menu? Thanks for your work and help, Charles
[jQuery] Can't get JQuery to work, Pls Help
Hi I'm new to Jquery and trying a simple example before I start working with it. Can someone please help me understand why the following is not working. Firebug repport '$ is not defined'. jquery-1.3.2.min.js is in the same directory as the web page as well. head meta http-equiv=Content-Type content=text/html; charset=ISO-8859-1 script type=text/javascript src=jquery-1.3.2.min.js/script style type=text/css #box { background:red; width:80px; height:80px; } /style script type=text/javascript $(document).ready(function(){ $('a.box').click(function() { $('#box').fadeOut(); }); }); /script titleTest/title /head body div id=box/div a href=# Link/a /body /html
[jQuery] Re: No event on node after add node.
Does the item2-1 loaded via ajax ? if true you might use .live() to let jquery add event handler after all dom node loaded asynchronously. in your example it could give something like : $(span[id]).live('click', function() { .. On May 19, 9:15 pm, mrkeyser mathieu.develo...@gmail.com wrote: maybe = peut-être en français. ;) No, the problem is that no event is raised. $(span[id]).click(function() { alert(Toto); }); If I add an alert ( toto ), it appears when I click on item 2 but not when I click on Item 2-1 . On 19 mai, 16:15, #micah micah.a.sm...@gmail.com wrote: Is the extra '-' in span id=item-2-1 the issue? Should it be span id=item 2-1? How do you say maybe in french? :) On May 19, 9:00 am, mrkeyser mathieu.develo...@gmail.com wrote: Hello, I'm french, sorry for my English, thank you google translation! ;) I'd like to make ajax calls to load sub-nodes in my treeview. I have the following tree: Tree HTML : ul id=tree li id=1spanItem 1/span/li li id=2span id=item-2Item 2/span/li li id=3spanItem 3/span/li /ul Method JS : $(span[id]).click(function() { var toto = $(this).parent(); if (toto.find(ul).length == 0) { var id = $(this).attr(id).substring(item-.length); $.post(/Export/GetChildItem, { id: id }, function(data) { var branches = $(data).appendTo(# + id); $(#tree).treeview({ add: branches }); }); } }); Result : ul id=tree li id=1spanItem 1/span/li li id=2span id=item-2Item 2/span ul lispan id=item-2-1Item 2-1/span/li lispanItem 2-2/span/li /ul /li li id=3spanItem 3/span/li /ul When I click on item 2, no problem. If I click on item 2-1, no event, why? I've tried everything, I do not see... Thanks
[jQuery] How to convert csv file to json
How to convert csv file to json using jquery / javascript??
[jQuery] Re: search by (Filter by name,age,date ) any plugin in jquery
Am not get ur mail, Hi all tell me how to pass the value into function for example input type=submit value=Search onClick = search_keyword('document.getElementById('cmd_select_category').value','document.getElementById('txt_search').value') Can u please tell me , how to do this, put the quotes clear and send me , thanks On Wed, May 20, 2009 at 3:43 PM, bharani kumar bharanikumariyer...@gmail.com wrote: Hi all , My requirement is search by filter , So is there any search with selected option plugin , Also can u please tell select name=cmd_select_category id=cmd_select_category option value=anyAny word/option option value=dateDate/option option value=ageAge/option option value=subjectsubject/option /select input type=text name=txt_search id=txt_search input type=submit value=Search onClick = search_keyword('cmd_select_category','txt_search') How to bring the cmd_select_category value, and txt_search in the search_keyword function -- உங்கள் நண்பன் பரணி குமார் Regards B.S.Bharanikumar POST YOUR OPINION http://bharanikumariyerphp.site88.net/bharanikumar/ -- உங்கள் நண்பன் பரணி குமார் Regards B.S.Bharanikumar POST YOUR OPINION http://bharanikumariyerphp.site88.net/bharanikumar/
[jQuery] [Validate]: Exception thrown by validator.
We recently did an update on our website, http://www.equanet.co.uk with a design refresh and an update to the library of javascript. We upgraded jQuery to 1.3.2, the validator to 1.5.1 and various other libraries and plugins to their latest version. Doing this seems to have broken the validator, when an invalid value is entered an error class is still added to fields, but an error message doesn't appear in the accompanying label anymore. Worse, submitting invalid forms is no longer blocked. According to Firefox the following exception is thrown: [Exception... 'Syntax error, unrecognized expression: [...@for=email]' when calling method: [nsIDOMEventListener::handleEvent] nsresult: 0x8057001e (NS_ERROR_XPC_JS_THREW_STRING) location: unknown data: no] Line 0 The @for will be different depending on which form field is invalid. I recognise the problem being the use of @selectors in the code somewhere but don't know enough about the validator plugin source to fix it myself. For reference, here are the comment headers from the libraries we are using: jQuery: /* * jQuery JavaScript Library v1.3.2 * http://jquery.com/ * * Copyright (c) 2009 John Resig * Dual licensed under the MIT and GPL licenses. * http://docs.jquery.com/License * * Date: 2009-02-19 17:34:21 -0500 (Thu, 19 Feb 2009) * Revision: 6246 */ jQuery Metadata: /* * Metadata - jQuery plugin for parsing metadata from elements * * Copyright (c) 2006 John Resig, Yehuda Katz, J�örn Zaefferer, Paul McLanahan * * Dual licensed under the MIT and GPL licenses: * http://www.opensource.org/licenses/mit-license.php * http://www.gnu.org/licenses/gpl.html * * Revision: $Id: jquery.metadata.js 3620 2007-10-10 20:55:38Z pmclanahan $ * */ jQuery Validate: /* * jQuery validation plug-in 1.5.2 * * http://bassistance.de/jquery-plugins/jquery-plugin-validation/ * http://docs.jquery.com/Plugins/Validation * * Copyright (c) 2006 - 2008 Jörn Zaefferer * * $Id: jquery.validate.js 6243 2009-02-19 11:40:49Z joern.zaefferer $ * * Dual licensed under the MIT and GPL licenses: * http://www.opensource.org/licenses/mit-license.php * http://www.gnu.org/licenses/gpl.html */ Some pages that use the validator and for which you don't have to be registered: http://www.equanet.co.uk/account/register-user.jtp http://www.equanet.co.uk/account/account-application.jtp
[jQuery] Re: .autoComplete/.autocomplete is not a function
Don't mind this. It turns out I'm using a different autocomplete plugin. I searched the plugin repository and there are two autocomplete plugins having the same name (sheesh!). Took sometime before I knew that. Hehehe. On May 20, 12:12 pm, mives29 mive...@gmail.com wrote: Good day! I am using jQuery 1.3.2 with the autocomplete 1.2.5 plugin, however, I keep on getting $(#id_here).autcomplete is not a function error. Here's my code: script type=text/javascript src=jquery-1.3.2.min.js/script script type=text/javascript src=jquery.bgiframe.js/script script type=text/javascript src=jquery.auto-complete-1.2.5.js/ script script type=text/javascript var data = prod_list.php; $(document).ready(function(){ $(#id_num).autoComplete(data); //$(#id_num).autocomplete(data); -also doesn't work. }); /script What's wrong with my code? Thanks.
[jQuery] Re: Replace newline char with comma using jquery
That code that you posted is replacing a newline with nothing - the comma is BETWEEN the parameters and is not one of them Try csvString=csvString.replace('\n',','); Nitin Sawant wrote: Hello frendz, I'm trying to replace newline char frm Google finance csv file with comma but its not happening pls help. http://finance.google.com/finance/historical?q=GOOGstartdate=May+1%2C+2009enddate=May+5%2C+2009start=225num=25output=csv I'm using following code csvString=csvString.replace('\n',''); I think there is some platform newline char issue. how to do this using jquery? pls help No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.339 / Virus Database: 270.12.35/2124 - Release Date: 05/20/09 06:22:00
[jQuery] Re: Replace newline char with comma using jquery
Hello Liam, Thanks for your reply, i'm retrieving csv file from google finance and parsing it, however the script which i wrote doesn't replace newline char from csv file with comma, I want to convert csv file to javascript array. html head title- Another CSV parser -/title script type=text/javascript src=flotr/jquery.js/script script type=text/javascript function loadData(){ $.get(http://finance.google.com/finance/historical;, { q:'GOOG', startdate:'Apr 1 2009', enddate:'May 1 2009', start:'225', num:'25', output:'csv' }, function(data) { // Writing output into div $(#csvDiv).html(data); $(#csvDiv).hide(); ConvertToArray(data); } ); } function ConvertToArray(data){ var myArr=$(#csvDiv).html(); myArr=myArr.replace(\n,,);//this line doesn't work myArr=myArr.split(','); document.writeln(array length is: +myArr.length+br/); //show all elements of array var i=0; for (i; imyArr.length; i++) { document.writeln(myArr[i]+'br /'); } } /script /head body div id=csvDiv /div script type=text/javascript loadData(); /script !-- http://finance.google.com/finance/historical?q=GOOGstartdate=May+1%2C+2009enddate=May+5%2C+2009start=225num=25output=csv -- /body /html On May 20, 3:56 pm, Liam Byrne l...@onsight.ie wrote: That code that you posted is replacing a newline with nothing - the comma is BETWEEN the parameters and is not one of them Try csvString=csvString.replace('\n',','); Nitin Sawant wrote: Hello frendz, I'm trying to replace newline char frm Google finance csv file with comma but its not happening pls help. http://finance.google.com/finance/historical?q=GOOGstartdate=May+1%2... I'm using following code csvString=csvString.replace('\n',''); I think there is some platform newline char issue. how to do this using jquery? pls help No virus found in this incoming message. Checked by AVG -www.avg.com Version: 8.5.339 / Virus Database: 270.12.35/2124 - Release Date: 05/20/09 06:22:00
[jQuery] Re: Superfish: Mega Menu Ability
put a div inside sub li, put whatever you want in the div. If various dropdowns have different widths add supersubs.js and adjust accordingly Hetneo wrote: Hi Cy Morris, Firstly, great extension, love it!! Just wondering if it has the ability to be easily adapted into a mega menu style? For example: http://www.ea.com/ or http://www.gettyimages.com/ Basically, I guess I am after the ability to have multiple menu items in the one drop down, if that makes sense? I was looking through the code, but before I try anything, is there an easier way to adapt the menu? Thanks for your work and help, Charles
[jQuery] Re: Can't get JQuery to work, Pls Help
your anchor doesn't have a class of box. you don't really want to get classes and IDs muddles up either, IDs should be unique on a page, classes can be applied to multiple elements. On May 20, 11:23 am, Kerry vkerrysi...@gmail.com wrote: Hi I'm new to Jquery and trying a simple example before I start working with it. Can someone please help me understand why the following is not working. Firebug repport '$ is not defined'. jquery-1.3.2.min.js is in the same directory as the web page as well. head meta http-equiv=Content-Type content=text/html; charset=ISO-8859-1 script type=text/javascript src=jquery-1.3.2.min.js/script style type=text/css #box { background:red; width:80px; height:80px; } /style script type=text/javascript $(document).ready(function(){ $('a.box').click(function() { $('#box').fadeOut(); }); }); /script titleTest/title /head body div id=box/div a href=# Link/a /body /html
[jQuery] Re: Can't get JQuery to work, Pls Help
try... $(function() { $(a).click(function () { $(#box).fadeOut(); }); }); also, you're not linking the jquery lib sucessfully. replace ... script type=text/javascript src=jquery-1.3.2.min.js/script ... with ... script type=text/javascript src=http://ajax.googleapis.com/ajax/ libs/jquery/1.3.1/jquery.min.js/script On May 20, 11:23 am, Kerry vkerrysi...@gmail.com wrote: Hi I'm new to Jquery and trying a simple example before I start working with it. Can someone please help me understand why the following is not working. Firebug repport '$ is not defined'. jquery-1.3.2.min.js is in the same directory as the web page as well. head meta http-equiv=Content-Type content=text/html; charset=ISO-8859-1 script type=text/javascript src=jquery-1.3.2.min.js/script style type=text/css #box { background:red; width:80px; height:80px; } /style script type=text/javascript $(document).ready(function(){ $('a.box').click(function() { $('#box').fadeOut(); }); }); /script titleTest/title /head body div id=box/div a href=# Link/a /body /html
[jQuery] Re: Jquery plugin validation remote option
Implementing remote methods isn't as simple as that. Your method returns undefined on the first call, and further calls will return the result of the previous validation. Use the remote method instead: http://docs.jquery.com/Plugins/Validation/Methods/remote Jörn On Wed, May 20, 2009 at 11:08 AM, viralme viral00...@gmail.com wrote: $(document).ready(function() { var valprod = $(#frmProduct).validate({ onkeyup:false, rules: { txtProduct:{ required: true, minlength: 4, productCheck: true } } }); valprod.resetForm(); }); jQuery.validator.addMethod('productCheck', function(productname) { var postURL = product/confirm_prod; $.ajax({ cache:false, async:false, type: POST, data: txtProduct= + productname, url: postURL, success: function(msg) { result = (msg=='TRUE') ? true : false; }, }); return result; }, 'Record Found' ); my only issue is whenever 1st time it checks the record if found record it display message Record Found but whenever i try to change my textbox value it still gives me this message. it does not get reset if record not found.
[jQuery] Re: [Validate]: Exception thrown by validator.
The error occurs with validate 1.5.1, which you say you are using, while the header says 1.5.2. Please make sure you are really using 1.5.2! Jörn On Wed, May 20, 2009 at 12:52 PM, Gordon grj.mc...@googlemail.com wrote: We recently did an update on our website, http://www.equanet.co.uk with a design refresh and an update to the library of javascript. We upgraded jQuery to 1.3.2, the validator to 1.5.1 and various other libraries and plugins to their latest version. Doing this seems to have broken the validator, when an invalid value is entered an error class is still added to fields, but an error message doesn't appear in the accompanying label anymore. Worse, submitting invalid forms is no longer blocked. According to Firefox the following exception is thrown: [Exception... 'Syntax error, unrecognized expression: [...@for=email]' when calling method: [nsIDOMEventListener::handleEvent] nsresult: 0x8057001e (NS_ERROR_XPC_JS_THREW_STRING) location: unknown data: no] Line 0 The @for will be different depending on which form field is invalid. I recognise the problem being the use of @selectors in the code somewhere but don't know enough about the validator plugin source to fix it myself. For reference, here are the comment headers from the libraries we are using: jQuery: /* * jQuery JavaScript Library v1.3.2 * http://jquery.com/ * * Copyright (c) 2009 John Resig * Dual licensed under the MIT and GPL licenses. * http://docs.jquery.com/License * * Date: 2009-02-19 17:34:21 -0500 (Thu, 19 Feb 2009) * Revision: 6246 */ jQuery Metadata: /* * Metadata - jQuery plugin for parsing metadata from elements * * Copyright (c) 2006 John Resig, Yehuda Katz, J�örn Zaefferer, Paul McLanahan * * Dual licensed under the MIT and GPL licenses: * http://www.opensource.org/licenses/mit-license.php * http://www.gnu.org/licenses/gpl.html * * Revision: $Id: jquery.metadata.js 3620 2007-10-10 20:55:38Z pmclanahan $ * */ jQuery Validate: /* * jQuery validation plug-in 1.5.2 * * http://bassistance.de/jquery-plugins/jquery-plugin-validation/ * http://docs.jquery.com/Plugins/Validation * * Copyright (c) 2006 - 2008 Jörn Zaefferer * * $Id: jquery.validate.js 6243 2009-02-19 11:40:49Z joern.zaefferer $ * * Dual licensed under the MIT and GPL licenses: * http://www.opensource.org/licenses/mit-license.php * http://www.gnu.org/licenses/gpl.html */ Some pages that use the validator and for which you don't have to be registered: http://www.equanet.co.uk/account/register-user.jtp http://www.equanet.co.uk/account/account-application.jtp
[jQuery] Re: [Validate]: Exception thrown by validator.
Sorry, my mistake. We originally rolled out with 1.5.1 and then upgraded to 1.5.2 today when the error came to light. Doing so didn't fix the problem. On May 20, 12:31 pm, Jörn Zaefferer joern.zaeffe...@googlemail.com wrote: The error occurs with validate 1.5.1, which you say you are using, while the header says 1.5.2. Please make sure you are really using 1.5.2! Jörn On Wed, May 20, 2009 at 12:52 PM, Gordon grj.mc...@googlemail.com wrote: We recently did an update on our website,http://www.equanet.co.uk with a design refresh and an update to the library of javascript. We upgraded jQuery to 1.3.2, the validator to 1.5.1 and various other libraries and plugins to their latest version. Doing this seems to have broken the validator, when an invalid value is entered an error class is still added to fields, but an error message doesn't appear in the accompanying label anymore. Worse, submitting invalid forms is no longer blocked. According to Firefox the following exception is thrown: [Exception... 'Syntax error, unrecognized expression: [...@for=email]' when calling method: [nsIDOMEventListener::handleEvent] nsresult: 0x8057001e (NS_ERROR_XPC_JS_THREW_STRING) location: unknown data: no] Line 0 The @for will be different depending on which form field is invalid. I recognise the problem being the use of @selectors in the code somewhere but don't know enough about the validator plugin source to fix it myself. For reference, here are the comment headers from the libraries we are using: jQuery: /* * jQuery JavaScript Library v1.3.2 *http://jquery.com/ * * Copyright (c) 2009 John Resig * Dual licensed under the MIT and GPL licenses. *http://docs.jquery.com/License * * Date: 2009-02-19 17:34:21 -0500 (Thu, 19 Feb 2009) * Revision: 6246 */ jQuery Metadata: /* * Metadata - jQuery plugin for parsing metadata from elements * * Copyright (c) 2006 John Resig, Yehuda Katz, J�örn Zaefferer, Paul McLanahan * * Dual licensed under the MIT and GPL licenses: * http://www.opensource.org/licenses/mit-license.php * http://www.gnu.org/licenses/gpl.html * * Revision: $Id: jquery.metadata.js 3620 2007-10-10 20:55:38Z pmclanahan $ * */ jQuery Validate: /* * jQuery validation plug-in 1.5.2 * *http://bassistance.de/jquery-plugins/jquery-plugin-validation/ *http://docs.jquery.com/Plugins/Validation * * Copyright (c) 2006 - 2008 Jörn Zaefferer * * $Id: jquery.validate.js 6243 2009-02-19 11:40:49Z joern.zaefferer $ * * Dual licensed under the MIT and GPL licenses: * http://www.opensource.org/licenses/mit-license.php * http://www.gnu.org/licenses/gpl.html */ Some pages that use the validator and for which you don't have to be registered: http://www.equanet.co.uk/account/register-user.jtp http://www.equanet.co.uk/account/account-application.jtp
[jQuery] Re: change ?q= to predefined param name or get field value for extraParams call
@MorningZ Yes.I figured that out as well. Thank you for your prompt and courteous reply and for the record I did search the forum first, but could not find this question. Is there a better way? I hestitate to hack the core autocomplete plugin if I can avoid it and if I could somehow override it more elegantly from my calling code. On May 19, 10:25 pm, MorningZ morni...@gmail.com wrote: I've gotten it to work before when a member on the list previous asked for it. go into the js file and search for function request in there, you'll see $.ajax defined, change q: lastWord(term) to YourKey: lastWord(term) and it *should* work... it's surely easy enough to just give it a shot On May 19, 3:36 pm, jakemonO jakeo...@gmail.com wrote: Is there a way to change the ?q= parameter name to something that was predefined by the JSON emmitter? For example, Lotus Domino expects the querystring to be of the form ?Startkey=... . Alternately, I can put that query in the extraParams call, but how do I populate the value portion of extraParam? Is there a(n efficient) way for me to accomplish what the autocompleter is accomplishing internally with its lastWord($input.val()) call?
[jQuery] Re: No event on node after add node.
Yes!! it's ok, thank you very much. On 20 mai, 12:26, sebastien creme sebastien.cr...@gmail.com wrote: Does the item2-1 loaded via ajax ? if true you might use .live() to let jquery add event handler after all dom node loaded asynchronously. in your example it could give something like : $(span[id]).live('click', function() { .. On May 19, 9:15 pm, mrkeyser mathieu.develo...@gmail.com wrote: maybe = peut-être en français. ;) No, the problem is that no event is raised. $(span[id]).click(function() { alert(Toto); }); If I add an alert ( toto ), it appears when I click on item 2 but not when I click on Item 2-1 . On 19 mai, 16:15, #micah micah.a.sm...@gmail.com wrote: Is the extra '-' in span id=item-2-1 the issue? Should it be span id=item 2-1? How do you say maybe in french? :) On May 19, 9:00 am, mrkeyser mathieu.develo...@gmail.com wrote: Hello, I'm french, sorry for my English, thank you google translation! ;) I'd like to make ajax calls to load sub-nodes in my treeview. I have the following tree: Tree HTML : ul id=tree li id=1spanItem 1/span/li li id=2span id=item-2Item 2/span/li li id=3spanItem 3/span/li /ul Method JS : $(span[id]).click(function() { var toto = $(this).parent(); if (toto.find(ul).length == 0) { var id = $(this).attr(id).substring(item-.length); $.post(/Export/GetChildItem, { id: id }, function(data) { var branches = $(data).appendTo(# + id); $(#tree).treeview({ add: branches }); }); } }); Result : ul id=tree li id=1spanItem 1/span/li li id=2span id=item-2Item 2/span ul lispan id=item-2-1Item 2-1/span/li lispanItem 2-2/span/li /ul /li li id=3spanItem 3/span/li /ul When I click on item 2, no problem. If I click on item 2-1, no event, why? I've tried everything, I do not see... Thanks
[jQuery] Re: [Validate]: Exception thrown by validator.
1.5.2 contains an explicit fix for compability with 1.3.x. Please test again. Jörn On Wed, May 20, 2009 at 1:39 PM, Gordon grj.mc...@googlemail.com wrote: Sorry, my mistake. We originally rolled out with 1.5.1 and then upgraded to 1.5.2 today when the error came to light. Doing so didn't fix the problem. On May 20, 12:31 pm, Jörn Zaefferer joern.zaeffe...@googlemail.com wrote: The error occurs with validate 1.5.1, which you say you are using, while the header says 1.5.2. Please make sure you are really using 1.5.2! Jörn On Wed, May 20, 2009 at 12:52 PM, Gordon grj.mc...@googlemail.com wrote: We recently did an update on our website,http://www.equanet.co.uk with a design refresh and an update to the library of javascript. We upgraded jQuery to 1.3.2, the validator to 1.5.1 and various other libraries and plugins to their latest version. Doing this seems to have broken the validator, when an invalid value is entered an error class is still added to fields, but an error message doesn't appear in the accompanying label anymore. Worse, submitting invalid forms is no longer blocked. According to Firefox the following exception is thrown: [Exception... 'Syntax error, unrecognized expression: [...@for=email]' when calling method: [nsIDOMEventListener::handleEvent] nsresult: 0x8057001e (NS_ERROR_XPC_JS_THREW_STRING) location: unknown data: no] Line 0 The @for will be different depending on which form field is invalid. I recognise the problem being the use of @selectors in the code somewhere but don't know enough about the validator plugin source to fix it myself. For reference, here are the comment headers from the libraries we are using: jQuery: /* * jQuery JavaScript Library v1.3.2 *http://jquery.com/ * * Copyright (c) 2009 John Resig * Dual licensed under the MIT and GPL licenses. *http://docs.jquery.com/License * * Date: 2009-02-19 17:34:21 -0500 (Thu, 19 Feb 2009) * Revision: 6246 */ jQuery Metadata: /* * Metadata - jQuery plugin for parsing metadata from elements * * Copyright (c) 2006 John Resig, Yehuda Katz, J�örn Zaefferer, Paul McLanahan * * Dual licensed under the MIT and GPL licenses: * http://www.opensource.org/licenses/mit-license.php * http://www.gnu.org/licenses/gpl.html * * Revision: $Id: jquery.metadata.js 3620 2007-10-10 20:55:38Z pmclanahan $ * */ jQuery Validate: /* * jQuery validation plug-in 1.5.2 * *http://bassistance.de/jquery-plugins/jquery-plugin-validation/ *http://docs.jquery.com/Plugins/Validation * * Copyright (c) 2006 - 2008 Jörn Zaefferer * * $Id: jquery.validate.js 6243 2009-02-19 11:40:49Z joern.zaefferer $ * * Dual licensed under the MIT and GPL licenses: * http://www.opensource.org/licenses/mit-license.php * http://www.gnu.org/licenses/gpl.html */ Some pages that use the validator and for which you don't have to be registered: http://www.equanet.co.uk/account/register-user.jtp http://www.equanet.co.uk/account/account-application.jtp
[jQuery] Re: How to convert csv file to json
there are some applications for doing this, but you'd be much better serving the data as JSON than trying to convert it on the fly which would be a massive overhead trying to do it in jquery. On May 20, 11:28 am, Nitin Sawant nitin.jays...@gmail.com wrote: How to convert csv file to json using jquery / javascript??
[jQuery] Re: [autocomplete] change ?q= to predefined param name or get field value for extraParams call
On 5/19/09 3:36 PM, jakemonO jakeo...@gmail.com wrote: Is there a way to change the ?q= parameter name to something that was predefined by the JSON emmitter? For example, Lotus Domino expects the querystring to be of the form ?Startkey=... . Alternately, I can put that query in the extraParams call, without modifying the plugin, i think that's what you have to do. but how do I populate the value portion of extraParam? Is there a(n efficient) way for me to accomplish what the autocompleter is accomplishing internally with its lastWord($input.val()) call? i'm not sure what your question is but have you read: http://docs.jquery.com/Plugins/Autocomplete#Dependencies_between_fields
[jQuery] Something changed from 1.2.2 to 1.3.2 with hashes
Hi everyone, I have the following problem with the latest jQuery version. Thanks already to anyone wanting to help me. With jQuery 1.2.2 I could get a targets hash like this: var $target = $(this.hash); Sometimes, people use just href=# to get to the top of page and not href=#header (or similar). Hence, if it was just a #, I considered it to have an undefined target. Now to check whether the hash is undefined or not, I used the following: var $defined = $target.length; Now if the hash was undefined, I would get a zero. If it was defined, I would get a 1. Then with a simple if statement I was able to sort through the stuff... Apparently with jQuery 1.3.2 this is no longer possible? Anyone know why and possibly know a fix to this? Thanks Max
[jQuery] traverse complete DOM of a webpage
Hi I am new to jQuery.I have a problem where I want to traverse through DOM.For example a complete webpage.Is there any jQuery way to traverse complete DOM of the current page where the jQuery script resides ? Thanks in advance. - Sourabh
[jQuery] Re: Can't get JQuery to work, Pls Help
Hey thanks! That works perfectly! You are truly heaven sent!! 1)But I'm confused, why should i have to link to google(specified in the src), as jquery.com provides the jquery-1.3.2.min.js download, which you are supposed to link in your webpage? As really what i'll be interested in using later on is the tablesorter plugin, to be able to resort a table by clicking on a header in a column. In this case would the link above suffice or would i have to download and include the plugin : script src=jquery.tablesorter.js/script 2) in their example(http://docs.jquery.com/ Tutorials:Getting_Started_with_jQuery#Hello_jQuery), they start their function with $(document)... whereas you just did $(function).. whats the difference? Although both ways work now. On May 20, 12:24 pm, ryan.j ryan.joyce...@googlemail.com wrote: try... $(function() { $(a).click(function () { $(#box).fadeOut(); }); }); also, you're not linking the jquery lib sucessfully. replace ... script type=text/javascript src=jquery-1.3.2.min.js/script ... with ... script type=text/javascript src=http://ajax.googleapis.com/ajax/ libs/jquery/1.3.1/jquery.min.js/script On May 20, 11:23 am, Kerry vkerrysi...@gmail.com wrote: Hi I'm new to Jquery and trying a simple example before I start working with it. Can someone please help me understand why the following is not working. Firebug repport '$ is not defined'. jquery-1.3.2.min.js is in the same directory as the web page as well. head meta http-equiv=Content-Type content=text/html; charset=ISO-8859-1 script type=text/javascript src=jquery-1.3.2.min.js/script style type=text/css #box { background:red; width:80px; height:80px; } /style script type=text/javascript $(document).ready(function(){ $('a.box').click(function() { $('#box').fadeOut(); }); }); /script titleTest/title /head body div id=box/div a href=# Link/a /body /html
[jQuery] Re: [Validate]: Exception thrown by validator.
Sorry! I just discovered there was a single [...@for= in my validateutils.js library of custom validation functions. I feel really stupid now. On May 20, 12:57 pm, Jörn Zaefferer joern.zaeffe...@googlemail.com wrote: 1.5.2 contains an explicit fix for compability with 1.3.x. Please test again. Jörn On Wed, May 20, 2009 at 1:39 PM, Gordon grj.mc...@googlemail.com wrote: Sorry, my mistake. We originally rolled out with 1.5.1 and then upgraded to 1.5.2 today when the error came to light. Doing so didn't fix the problem. On May 20, 12:31 pm, Jörn Zaefferer joern.zaeffe...@googlemail.com wrote: The error occurs with validate 1.5.1, which you say you are using, while the header says 1.5.2. Please make sure you are really using 1.5.2! Jörn On Wed, May 20, 2009 at 12:52 PM, Gordon grj.mc...@googlemail.com wrote: We recently did an update on our website,http://www.equanet.co.uk with a design refresh and an update to the library of javascript. We upgraded jQuery to 1.3.2, the validator to 1.5.1 and various other libraries and plugins to their latest version. Doing this seems to have broken the validator, when an invalid value is entered an error class is still added to fields, but an error message doesn't appear in the accompanying label anymore. Worse, submitting invalid forms is no longer blocked. According to Firefox the following exception is thrown: [Exception... 'Syntax error, unrecognized expression: [...@for=email]' when calling method: [nsIDOMEventListener::handleEvent] nsresult: 0x8057001e (NS_ERROR_XPC_JS_THREW_STRING) location: unknown data: no] Line 0 The @for will be different depending on which form field is invalid. I recognise the problem being the use of @selectors in the code somewhere but don't know enough about the validator plugin source to fix it myself. For reference, here are the comment headers from the libraries we are using: jQuery: /* * jQuery JavaScript Library v1.3.2 *http://jquery.com/ * * Copyright (c) 2009 John Resig * Dual licensed under the MIT and GPL licenses. *http://docs.jquery.com/License * * Date: 2009-02-19 17:34:21 -0500 (Thu, 19 Feb 2009) * Revision: 6246 */ jQuery Metadata: /* * Metadata - jQuery plugin for parsing metadata from elements * * Copyright (c) 2006 John Resig, Yehuda Katz, J�örn Zaefferer, Paul McLanahan * * Dual licensed under the MIT and GPL licenses: * http://www.opensource.org/licenses/mit-license.php * http://www.gnu.org/licenses/gpl.html * * Revision: $Id: jquery.metadata.js 3620 2007-10-10 20:55:38Z pmclanahan $ * */ jQuery Validate: /* * jQuery validation plug-in 1.5.2 * *http://bassistance.de/jquery-plugins/jquery-plugin-validation/ *http://docs.jquery.com/Plugins/Validation * * Copyright (c) 2006 - 2008 Jörn Zaefferer * * $Id: jquery.validate.js 6243 2009-02-19 11:40:49Z joern.zaefferer $ * * Dual licensed under the MIT and GPL licenses: * http://www.opensource.org/licenses/mit-license.php * http://www.gnu.org/licenses/gpl.html */ Some pages that use the validator and for which you don't have to be registered: http://www.equanet.co.uk/account/register-user.jtp http://www.equanet.co.uk/account/account-application.jtp
[jQuery] Re: change ?q= to predefined param name or get field value for extraParams call
Is there a better way? No, you can clearly see he has the key of q hard-coded right in the code. this was the previous topic i spoke of http://groups.google.com/group/jquery-en/browse_thread/thread/4afe40edefcaed19/2d981b31387bdc98?hl=enlnk=gstq=morningz+q and in there, it was the same answer, but in that case I had lightly tested it and it worked fine...
[jQuery] Re: How to convert csv file to json
What server side language? On May 20, 6:28 am, Nitin Sawant nitin.jays...@gmail.com wrote: How to convert csv file to json using jquery / javascript??
[jQuery] Cycle plugin and print styles
Hello I'm using the excellent Cycle plugin, but I have a problem in that I would like my print style to act as if the Javascript wasn't there, i.e. each frame appear on the page rather than being set to display: none. Is this possible using Cycle and if so does anyone have any pointers as to what I need to do? Many thanks Martin.
[jQuery] Re: How to convert csv file to json
If, by any chance, you are using php as serverside language, you can use http://en.php.net/manual/en/function.json-encode.php for this. On 20 mei, 12:28, Nitin Sawant nitin.jays...@gmail.com wrote: How to convert csv file to json using jquery / javascript??
[jQuery] Re: hoverIntent mouseover on page load
On May 19, 9:44 pm, Charlie charlie...@gmail.com wrote: grab the index of menu click, pass it in the URI , grab it on opening page and pass it to the new page menu. Works great for opening jQuery UI tabs and accordions however they have selected or activate functions built in. Thanks for the suggestion... Might be a little more difficult depending on how menu script designed. It's superfish within the dev version of Drupal's 'nice menus' module. Much obliged, Paul N.
[jQuery] Re: Something changed from 1.2.2 to 1.3.2 with hashes
Well, in 1.3.2 it now throws an exception, since the CSS selector # is invalid. If you wish to use that precise technique I'd wrap a try/catch around the jQuery statement to catch the error. --John On Wed, May 20, 2009 at 8:22 AM, madmax019 maxi.karr...@googlemail.comwrote: Hi everyone, I have the following problem with the latest jQuery version. Thanks already to anyone wanting to help me. With jQuery 1.2.2 I could get a targets hash like this: var $target = $(this.hash); Sometimes, people use just href=# to get to the top of page and not href=#header (or similar). Hence, if it was just a #, I considered it to have an undefined target. Now to check whether the hash is undefined or not, I used the following: var $defined = $target.length; Now if the hash was undefined, I would get a zero. If it was defined, I would get a 1. Then with a simple if statement I was able to sort through the stuff... Apparently with jQuery 1.3.2 this is no longer possible? Anyone know why and possibly know a fix to this? Thanks Max
[jQuery] Re: Something changed from 1.2.2 to 1.3.2 with hashes
Thanks - that worked perfectly. Max On May 20, 3:39 pm, John Resig jere...@gmail.com wrote: Well, in 1.3.2 it now throws an exception, since the CSS selector # is invalid. If you wish to use that precise technique I'd wrap a try/catch around the jQuery statement to catch the error. --John On Wed, May 20, 2009 at 8:22 AM, madmax019 maxi.karr...@googlemail.comwrote: Hi everyone, I have the following problem with the latest jQuery version. Thanks already to anyone wanting to help me. With jQuery 1.2.2 I could get a targets hash like this: var $target = $(this.hash); Sometimes, people use just href=# to get to the top of page and not href=#header (or similar). Hence, if it was just a #, I considered it to have an undefined target. Now to check whether the hash is undefined or not, I used the following: var $defined = $target.length; Now if the hash was undefined, I would get a zero. If it was defined, I would get a 1. Then with a simple if statement I was able to sort through the stuff... Apparently with jQuery 1.3.2 this is no longer possible? Anyone know why and possibly know a fix to this? Thanks Max
[jQuery] How to use conditional tags to identify a page in Wordpress - is it necessary for jQuery?
I understand how to use conditional tags to identify a wordpress page with php: if (is_page('Home')) {run function here} Can (should?) this be done with jQuery also? For example, I would like to run the accordion widget on a F.A.Q. page only. Could I do something like this: if (is_page('F.A.Q.)) { jQuery(document).ready(function() { jQuery(#faq_accordion).accordion(); }); } Is this even necessary? Sorry in advance if this is more of a javascript question.
[jQuery] Recommendations for jQuery method to play mp3 audio
Is there a cross-browser jQuery plug-in that can preload several different mp3 audio files and provide play / stop methods?
[jQuery] Re: How to use conditional tags to identify a page in Wordpress - is it necessary for jQuery?
Usually its fine to check if the id exist, and much sure its unique across pages. If the id doesn't exist, nothing happens. Jörn On Wed, May 20, 2009 at 4:00 PM, KD ess33...@yahoo.com wrote: I understand how to use conditional tags to identify a wordpress page with php: if (is_page('Home')) {run function here} Can (should?) this be done with jQuery also? For example, I would like to run the accordion widget on a F.A.Q. page only. Could I do something like this: if (is_page('F.A.Q.)) { jQuery(document).ready(function() { jQuery(#faq_accordion).accordion(); }); } Is this even necessary? Sorry in advance if this is more of a javascript question.
[jQuery] Validate textbox on at least one checkbox selected
Hi all, I have a textbox and 2 checkbox, and I'd like to validate the textbox if at least one of the two checkbox is selected. If is just one checkbox, I'll write: myTextboxl: { required: '#myFirstCheckbox:checked' } but in the case of 2 checkbox, how can I solve? Thanks a lot. Louis
[jQuery] Refresh SPAN without entire page
Hi All, How to Refresh SPAN without page refresh , Can you tell name of the jquery function , -- உங்கள் நண்பன் பரணி குமார் Regards B.S.Bharanikumar POST YOUR OPINION http://bharanikumariyerphp.site88.net/bharanikumar/
[jQuery] Re: Portlets / Sortables (highlight get text within portlet using mouse)
Thanks, that solved half my problem. I changed it so dragging is only initiated from the header of the each portlet. I still can't select any of the text with the mouse though. I'll post a question in the JQuery UI forum. Thanks for your help. On May 19, 11:39 pm, Karl Swedberg k...@englishrules.com wrote: On May 19, 2009, at 6:01 PM, slenzi wrote: So I've been experimenting with JQuery's portlets and in the example found on their site (http://jqueryui.com/demos/sortable/#portlets) you can't select the text in the portets with the mouse. Say you want to highlight some of the text and then right click and copy, you can't. Anytime you click within the portlet it immediately starts dragging. Is there a way in which the dragging can be restricted to the portlet header so users can still hightlight and copy text within the portlet? Yes, look at the handle option:http://jqueryui.com/demos/sortable/#option-handle Also, this sort of question is probably better suited for the jquery- ui Google Group. --Karl Karl Swedbergwww.englishrules.comwww.learningjquery.com
[jQuery] Re: How to convert csv file to json
There's quite a difference between the two. JSON uses a key: value format, while CSV is generally value only On Wed, May 20, 2009 at 6:28 AM, Nitin Sawant nitin.jays...@gmail.com wrote: How to convert csv file to json using jquery / javascript??
[jQuery] superfish mouseover behaviour on page load
I'll restate this previously posted issue with a little more context... I'm using superfish with hoverIntent to trigger flyout submenus. Works well, but I'd like to trigger the submenu from the mouse position when a new page is loaded. So, for example, your mouse hovers over a link in the main menu, and the display of the corresponding submenu has been triggered. If you then click on the link you're hovering over, when the new page is loaded the menu (and submenu) should ideally come up in the same state. Presently the page comes up uninitialized, and in fact you need to pull the mouse out of the menu and then return it to the menu link in order to trigger the submenu. You can see the issue I'm talking about in the hoverIntent examples at http://cherne.net/brian/resources/jquery.hoverIntent.html. If you reload the page while your mouse is within the color boundaries in the jQuery's hover example, the dropdown is reactivated when the page is loaded. The hoverIntent as hover replacement examples require that you move the mouse outside of the color patch and then return it to trigger the dropdown after reload. Thanks, Paul N.
[jQuery] Re: Portlets / Sortables (highlight get text within portlet using mouse)
OK, just in case anyone stumbles across this post, I found in the Portlet example on the JQuery site you need to remove the following: $(.column).disableSelection(); You will then be able to select text with the mouse. On May 20, 10:43 am, slenzi sle...@gmail.com wrote: Thanks, that solved half my problem. I changed it so dragging is only initiated from the header of the each portlet. I still can't select any of the text with the mouse though. I'll post a question in the JQuery UI forum. Thanks for your help. On May 19, 11:39 pm, Karl Swedberg k...@englishrules.com wrote: On May 19, 2009, at 6:01 PM, slenzi wrote: So I've been experimenting with JQuery's portlets and in the example found on their site (http://jqueryui.com/demos/sortable/#portlets) you can't select the text in the portets with the mouse. Say you want to highlight some of the text and then right click and copy, you can't. Anytime you click within the portlet it immediately starts dragging. Is there a way in which the dragging can be restricted to the portlet header so users can still hightlight and copy text within the portlet? Yes, look at the handle option:http://jqueryui.com/demos/sortable/#option-handle Also, this sort of question is probably better suited for the jquery- ui Google Group. --Karl Karl Swedbergwww.englishrules.comwww.learningjquery.com
[jQuery] Compatibility Issues
I have a client using 1.1.4.js and we are using 1.2.6.min.js. If the client upgrades, will it break their 1.1.4.js code? Is there any way to tell? Thank you in advance, Ken
[jQuery] Re: executing priority jquery script
Think I've got it; changed the order of loading around. On May 19, 5:59 pm, webvideoto...@gmail.com webvideoto...@gmail.com wrote: on this pagehttp://nl.pokerunlimited.eu/home-test-99/ The banner images are first loaded and only assembled into the sliding banner when the whole page is done loading. This has obvious drawbacks; being ugly and all :) Anyone know of a good solution for this? its jquery 171 and i can post the slider script if it helps... (i've currently src'd it in the head)
[jQuery] Re: superfish mouseover behaviour on page load
On May 20, 12:19 pm, Charlie charlie...@gmail.com wrote: have you tried using pathToclass? built in function insuperfishallows opening path you choose by adding class of your choice. Hey, many thanks, I missed that - a very neat feature, works great. However, the selected submenu doesn't return to the one corresponding to the current page unless one of the submenus has been triggered initially by a mouseover. Ideally it should trigger at the current mouse position on page load, but it doesn't. Much obliged, Paul N.
[jQuery] Re: superfish mouseover behaviour on page load
have you tried using pathToclass? built in function in superfish allows opening path you choose by adding class of your choice. Examples on superfish home page pauln wrote: I'll restate this previously posted issue with a little more context... I'm using superfish with hoverIntent to trigger flyout submenus. Works well, but I'd like to trigger the submenu from the mouse position when a new page is loaded. So, for example, your mouse hovers over a link in the main menu, and the display of the corresponding submenu has been triggered. If you then click on the link you're hovering over, when the new page is loaded the menu (and submenu) should ideally come up in the same state. Presently the page comes up uninitialized, and in fact you need to pull the mouse out of the menu and then return it to the menu link in order to trigger the submenu. You can see the issue I'm talking about in the hoverIntent examples at http://cherne.net/brian/resources/jquery.hoverIntent.html. If you reload the page while your mouse is within the color boundaries in the "jQuery's hover" example, the dropdown is reactivated when the page is loaded. The "hoverIntent as hover replacement" examples require that you move the mouse outside of the color patch and then return it to trigger the dropdown after reload. Thanks, Paul N.
[jQuery] FormCheck Validation
Hi everyone, Does anyone know of a jquery verions of Mootools FormCheck Validation Plugin? http://mootools.floor.ch/en/demos/formcheck/index.htm I don't want to reinvent the wheel it's already be done. thanks -- Isaac G.
[jQuery] Jquery Tabs problem with Tabs width
Hi All, I need to spread tabs evenly on one row and make the text wrap, when I am using fixed width for .ui-tabs-nav li the panel and nav are not aligned. I don't want the tabs to shift to the next line. PLEASE HELP!! Kobi
[jQuery] Re: vertical jcarousel + galleria + IE = bug
I merged Jcarousel and Galleria so you can show images with diferent sizes perfectly (=centered in v and h). Even, the thumbnails cycle. In one or two rows!. Download demos here : http://www.libasoles.com.ar/demo1.html -- View this message in context: http://www.nabble.com/vertical-jcarousel-%2B-galleria-%2B-IE-%3D-bug-tp20943833s27240p23637423.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Re: JQuery Form Plugin
Doh! Of course as soon as I post that something occurs to me that hadn't before. During a testing cycle a script tag for jquery was added to the output from the form. I guess that reinitializes everything, which makes sense. Pulled the tag from the output and everything is fine again. -Sean
[jQuery] Re: EasySlider 1.5: Tabbing through forms
I really need some help here, people. Either a fix to the plugin, a workaround, or a new plugin altogether - can someone out there help me? On May 18, 2:02 pm, Francis \Pat\ Patterson francis.patter...@gmail.com wrote: I'm developing a form using the jQuery plugin EasySlider 1.5: http://cssglobe.com/post/4004/easy-slider-15-the-easiest-jquery-plugi... I want to add the ability to initiate the slider action when a user tabs to a field located off-screen, as in this example: http://www.fordpas.org/registration/teachers_coordinators/form_v2.asp So, when someone tabs through that first form area, and gets to Repeat Email, when they tab to the next field, it triggers the EasySlider much like the Next span tag. Any suggestions? It has to be possible, but I haven't come up with a solution yet. Help me Obi-Wan, you're my only hope.
[jQuery] Re: Cycle plugin and print styles
I'm using the excellent Cycle plugin, but I have a problem in that I would like my print style to act as if the Javascript wasn't there, i.e. each frame appear on the page rather than being set to display: none. Is this possible using Cycle and if so does anyone have any pointers as to what I need to do? Here's an example: http://www.malsup.com/jquery/cycle/basic2.html
[jQuery] Re: Recommendations for jQuery method to play mp3 audio
On 5/20/09 10:02 AM, SamCKayak s...@elearningcorner.com wrote: Is there a cross-browser jQuery plug-in that can preload several different mp3 audio files and provide play / stop methods? yes. http://plugins.jquery.com/search/node/mp3+type%3Aproject_project but for mp3 i really like 1bit. but it is not dependent on jquery so it may not meet your needs: http://1bit.markwheeler.net/
[jQuery] Re: update from 1.2.6 to 1.3.2 $('select') - strange!?
I'm using v1.3.2 as well, and incidentally, I also happen to be using the same selector pattern. I get the SELECT element, just as expected. My guess would be that a space snuck into your selector, like this: $ ('select[name^=q_select_]') And I'd venture further and hypothesize that your options' names start with q_select_. If that's not the case, we'd indeed need a proper test case where the selector behaves unexpectedly. On May 19, 4:33 pm, asrij...@googlemail.com asrij...@googlemail.com wrote: Hi Guys, just started to upgrade my site jquery version to the latest, now I'm facing some strange behaviour. In 1.2.6 - $('select[name^=q_select_]') - returns the select - object In 1.3.2 - $('select[name^=q_select_]') - returns the options of the select !? Some1 else facing this problem? Regards
[jQuery] Re: How to print json data, key and value
$.each(data, function(index, item){ var name; for(name in item){ console.log(name + = + item[name]);} }); On Wed, May 20, 2009 at 5:51 AM, Massimiliano Marini m...@linuxtime.itwrote: Hi Charlie, I'm not good at explaining the exact terms javascript definitions for value and key but they are javascript identifiers? change it to what their values are in the array, works great what I want to do is to print the name and the value of a json object without knowing what the object has inside. The only thing I know is that inside the json object there are only [{name:value,name:value,name:value}], the object is not fixed lenght and the name:value are not always the same. Is it possible? -- Massimiliano Marini m...@linuxtime.it -- Christopher Thatcher
[jQuery] Re: Recommendations for jQuery method to play mp3 audio
hi see this http://flowplayer.org/plugins/streaming/audio.html ,I have other .. I SEARCH ... or http://www.longtailvideo.com ...
[jQuery] jqgrid implementation in a HTML form
Hi, I am trying to implement jqGrid in my form. The form has some extra element like textbox and dropdown. While submitting the form i have to store it into some variable to keep this for next page where i want to show the summary page and then commit the changes. But once i click Continue and on submission of the form i get the form element but not able to send the stringData along with that. Is there any way to do that(like the way we do it for date picker by assigning it to an id of an input box). $(#btn_Continue).click(function(){ var idArr = new Array(); var objRowData = new Array(); // var stringData; idArr = jQuery(#list).getDataIDs(); for(var i=0;iidArr.length;i++){ var cl = idArr[i]; objRowData = jQuery(#list).getRowData(cl); if(stringData == undefined) stringData = (objRowData [checkin]); else stringData = stringData + ':'+(objRowData [checkin]); }}); I dont want to post this data to the server and save it in a database instead i want to keep this info in some variable(along with form variable) to be processed in the next page where on committing i will save this to the db. Thanks and Regards, ~Sumit
[jQuery] Re: Recommendations for jQuery method to play mp3 audio
Here's a few I've come across: jQuery Media PlugIn: http://malsup.com/jquery/media/ jPlayer http://www.happyworm.com/jquery/jplayer/ FlowPlayers a nice PlugIn as well but it looks like the site is down at the moment. On May 20, 10:02 am, SamCKayak s...@elearningcorner.com wrote: Is there a cross-browser jQuery plug-in that can preload several different mp3 audio files and provide play / stop methods?
[jQuery] jQuery XML
I have this XML file, and I've gotten a few values from it, but I need one more, a create a variable from it, and insert that in to an img tag. XML : http://itiz.in/idvt JS : http://itiz.in/318m So as is clear, getting the track name etc. is fine, but I want the medium sized album art to be inserted in to an img tag (img src=medium_sized_image_url alt=). I've tried searching but can't find anything, I'm doubly interested because I wouldn't mind using the URL that's in there as well.
[jQuery] JQuery Form Plugin
I've been using the Form plugin for a while a just recently (within the last week) something has gummed up the works and I'm not sure what. Here is my code. $().ready( function(){ $('#productListForm').ajaxForm({ target: '#toolList', error: function(request, textStatus, errorThrown){ $(#toolList).html( request.responseText ); } }); $('.oep_search').autocomplete('consolidator/fetch_oep.asp', { width: 250, minChars: 2, cacheLength: 1 }); $(.oep_search).result(function(event, data, formatted) { if (data){ table = $(this).parents(table); table.find('input[name=oepid]').val( data[1] ); sel = table.find('.lruSelector'); sel.show(); $.ajax({type: POST, url: consolidator/fetch_lru.asp, data: { id: data[1] }, success: function(data){ sel.html( data ); $(#toolList).html( ajaxloader ); $(#productListForm).submit(); // this call works }, error: function(request, textStatus, errorThrown){ sel.html( request.responseText ); } }); } }); }); function fetchTools(){ $(#toolList).html( ajaxloader ); $(#productListForm).submit(); // this call does not } The ajax call in $('#oep_search').result() (from an autocomplete plugin) adds some checkboxes to the form. Each checkbox has an onclick=fetchTools() on it. The first call to submit the form in the ajax success function works. It doesn't change the page and populates the output div like it should. However, any subsequent attempts to submit the form don't work. There are two possible ways to trigger a submit. Either clicking on a checkbox or triggering the autocomplete result function again. Neither works the second time around. The form is submitted the old fashioned way and I'm taken away from the page. This used to work like a champ. I have no idea what has changed. I haven't been mucking about with the javascript code. No need. I was using jquery 1.2.6 and form plugin 2.17. I updated to 1.3.2 and 2.18 respectively, but that did not help. This happens both in Firefox and IE. Does this ring bells for anyone? Can someone give me some ideas on what I should be looking for? -Sean
[jQuery] Re: SOT: execute JS before a specific image loads
Andy, Dunno if you can do thatcurious though, could you just do an ajax call that gives you the extra stuff? It won't fire if they don't have javascript present, so it would do pretty much the same thing. -- Josh _ From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On Behalf Of Andy Matthews Sent: Wednesday, May 20, 2009 8:52 AM To: jquery-en@googlegroups.com Subject: [jQuery] SOT: execute JS before a specific image loads Can I intercept the loading of an image BEFORE it loads? We're looking at using an img tag for inserting stats on our server. Here's what I'm considering... 1) Collect certain information server side, write an img to the document like so (note the URL vars): img id=statsImg src=stats.cfm?somevar=someval width=1 height=1 / 2) Using JS, intercept the load of this image BEFORE it takes place, and add things to the URL vars. This way, if JS is not present, you get the default stuff, but if JS is present, you get extra stuff. Anyone? Andy Matthews Senior Web Developer OLE Object: Picture (Metafile) www.dealerskins.com P Please consider the environment before printing this e-mail. Total customer satisfaction is my number 1 priority! If you are not completely satisfied with the service I have provided, please let me know right away so I can correct the problem, or notify my manager Aaron West at aw...@dealerskins.com. attachment: winmail.dat
[jQuery] Re: should I use .txt or a database to retrieve data from it every second
Comet (server-push technology) is that the other way around? So normaly with jQuery you ask the server every sec to check for new data and then display it, but with Comet, you don't do the request but new data is automaticly pushed and displayed when the server received new data? Do I understand this correctly? That would be so nice.
[jQuery] Re: SOT: execute JS before a specific image loads
I could, and that's the way we're approaching this. I'd rather do it all at once, rather than have two db inserts. No biggie. _ From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On Behalf Of Josh Nathanson Sent: Wednesday, May 20, 2009 12:51 PM To: jquery-en@googlegroups.com Subject: [jQuery] Re: SOT: execute JS before a specific image loads Andy, Dunno if you can do thatcurious though, could you just do an ajax call that gives you the extra stuff? It won't fire if they don't have javascript present, so it would do pretty much the same thing. -- Josh _ From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On Behalf Of Andy Matthews Sent: Wednesday, May 20, 2009 8:52 AM To: jquery-en@googlegroups.com Subject: [jQuery] SOT: execute JS before a specific image loads Can I intercept the loading of an image BEFORE it loads? We're looking at using an img tag for inserting stats on our server. Here's what I'm considering... 1) Collect certain information server side, write an img to the document like so (note the URL vars): img id=statsImg src=stats.cfm?somevar=someval width=1 height=1 / 2) Using JS, intercept the load of this image BEFORE it takes place, and add things to the URL vars. This way, if JS is not present, you get the default stuff, but if JS is present, you get extra stuff. Anyone? Andy Matthews Senior Web Developer OLE Object: Picture (Metafile) www.dealerskins.com P Please consider the environment before printing this e-mail. Total customer satisfaction is my number 1 priority! If you are not completely satisfied with the service I have provided, please let me know right away so I can correct the problem, or notify my manager Aaron West at aw...@dealerskins.com. attachment: winmail.dat
[jQuery] Re: Superfish - Multi-Column Dropdown
Outstanding! Thanks for the time and support. Worked like a charm :D On Tue, May 19, 2009 at 9:24 PM, Charlie charlie...@gmail.com wrote: I read that wrong, what I proposed shifts the 1st level subs to the left, to get second level subs to show on left side instead of right, assign some class like show_left to second tier of subs if ($(this ).hasClass(show_left)) { $(this).css(left, -10em);// if using supersubs, or variable width UL's have to test parent UL for width and use that value instead of -10em } Ethan Mateja wrote: I was able to acheive multiple columns by giving the ul a width that is n times bigger than the li, where n is the number of columns desired. -THANX Cy Morris! I now face an issue where items close to the right hand side of the screen bleed off with multiple columns. I wonder how I can force the last few elements in the UL to have the multi-columns open to the left? Any tips? -cheers On Mon, May 18, 2009 at 7:18 AM, okdok ethan.mat...@gmail.com wrote: Can anyone provide me an example of how I can modify supersubs.js to create a multi-column dropdown? Thanks! On May 16, 12:46 pm, Ethan Mateja ethan.mat...@gmail.com wrote: Thanks for the prompt reply! I took a peek at supersubs.js and my question is this: Is it just a matter of adding an extra div tag between ul's and styling in a manner similar to the link below? http://www.gunlaug.no/tos/moa_41.html I have been working with suckerfish menu's for a year or so and have just gotten into the multicolumn feature. What I have yet to wrap my head around is how to create the second column. Any examples are greatly appreciated. On Sat, May 16, 2009 at 10:16 AM, Charlie charlie...@gmail.com wrote: you can put columns into the sub menus fairly easily with supersubs.js okdok wrote: I would like to integrate a multi-column superfish into a Joomla! 1.5.10 production site. Has anyone been able to accomplish something similar? -- Respectfully, Ethan Mateja +++ Packetforwardwww.packetforward.com -- Respectfully, Ethan Mateja +++ Packetforward www.packetforward.com -- Respectfully, Ethan Mateja +++ Packetforward www.packetforward.com
[jQuery] Re: Cycle plugin - frame number / IE behaviour
It works ! Thanks again :o) On May 19, 9:24 pm, Mike Alsup mal...@gmail.com wrote: Use CSS style rules to position and stack the images. Do you mean forcing the images to be all at the same position ? Yes. That's what the plugin does once it is run, but you can do it in CSS to avoid flicker on page load.
[jQuery] Re: jQuery XML
Solved the URL thing, that was me being lazy and not thinking hard enough $('p.track').append(a href=\ + $(this).find(url).text() + \ + $(this).find(name).text() + /a); That thankfully means that I'll be able to embed the image, but I'm still not sure how to select it. I've tried find(image size=\medium \) but it didn't work. On May 20, 5:51 pm, alex boba...@googlemail.com wrote: I have this XML file, and I've gotten a few values from it, but I need one more, a create a variable from it, and insert that in to an img tag. XML :http://itiz.in/idvt JS :http://itiz.in/318m So as is clear, getting the track name etc. is fine, but I want the medium sized album art to be inserted in to an img tag (img src=medium_sized_image_url alt=). I've tried searching but can't find anything, I'm doubly interested because I wouldn't mind using the URL that's in there as well.
[jQuery] Re: How to print json data, key and value
Native JS is capable of this sort of thing. For instance: var obj = { p1: v1, p2: v2 }; for (p in obj) { document.write( p + : + obj[p] + br ); } This would output: p1 : v1 p2 : v2 Using the for..in loop structure, you can iterate over each of the properties of a given object. In this case, p contains the name of the current property, and by doing obj[p], we treat obj as a hash object and get the value of the property in question. The loop then moves on to the next property. (disclaimer - the document.write() line is for sample purposes only, I'm assuming you'll using something more appropriate) This will work with ANY object (assuming my memory isn't to far gone), but will not go into the tree structure. If a propertie is another object, or array, then it's value would be displayed as [object]. HTH And I hope this is what you were after. Shawn Massimiliano Marini wrote: Hi Charlie, I'm not good at explaining the exact terms javascript definitions for value and key but they are javascript identifiers? change it to what their values are in the array, works great what I want to do is to print the name and the value of a json object without knowing what the object has inside. The only thing I know is that inside the json object there are only [{name:value,name:value,name:value}], the object is not fixed lenght and the name:value are not always the same. Is it possible?
[jQuery] Re: question about getJSON, objects and/or scope - confused
Josh, thanks for your response - it helped clear up some of my problems when I moved the var thisStory = $.getJSON(javascript/ test.js, function(json){etc.}); out of the $(document).ready(); block. Now at least the document.write is executing on the page... But it's being written out as undefined by undefined which means that the values in the test.js still aren't available outside of the var thisStory = $.getJSON() script (a (not) working full html file is available at : script type=text/javascript //![CDATA[ var thisStory = $.getJSON(javascript/test.js, function(json){ alert(title: + json.title + '\n'+ author: + json.author + '\n' + frame3 : + json.frames.frame3 + ' ' + json.texts.frame3 + '\n' + imgurl: + json.imgURL + '\n'); return json; }); //]]/script [later in the body] script type=text/javascript //![CDATA[ document.write('i' + thisStory.title + '/i' + ' by ' + thisStory.author + 'brbr'); //]]/script In other words, that alert() function is working fine. But the document.write isn't getting the value of thisStory.title, for example. Is this a problem with scope? I tried returning json at the end of the getJson bit thinking maybe thisStory = $.getJSON(javascript/test.js) wasn't enough to load the values from the test.js file into the thisStory object. Am I missing something fundamental here? I feel like I am, but as I've mentioned I can't tell exactly what. The same code works great if the JSON object is in the HTML file, so I feel like this is a weird thing associated with JSON somehow. Thanks for any insight or clarification!
[jQuery] animate padding start value - Firefox (getComputedStyle)
(Firefox 3.0.10, OS X) I am setting a padding value via a stylesheet and trying to animate it - - CSS myElement { padding: 20px } - Javascript myElement.animate( {padding: 12px} ) When calculating the start padding value, jQuery calls 'getComputedStyle'. Unfortunately, computedStyle.padding = computedStyle.padding-top = 20px computedStyle.padding-right = 20px computedStyle.padding-bottom = 20px computedStyle.padding-left = 20px and the call to 'getPropertyValue' returns an empty string (which is translated to 0px). Would this be considered a jQuery or Firefox issue?
[jQuery] IE iframe bug? Attributes not available on $(document).ready - any advice?
Hi all, I have a problem which is well over my JQuery/javascript head. I have a page (http://www.norabrowndesign.com/new_site/portfolio/ websites/index.html) in which you can click on any thumbnail and up pops an iframe, using the thickbox plugin. The iframe loads a new html document (for example http://www.norabrowndesign.com/new_site/portfolio/websites/ror/index.html). Now in *that* document, I have some jquery which calculates and sets some margins, based on the heights and widths of images (which are explicitly declared in the html): var max_height = 0; $('#slideBox img').each(function() { max_height = Math.max(max_height, $(this).attr(height)); }); var marg_top = Math.round((500 - max_height)/3); $('#wrapper').css('margin-top',marg_top); This works dandy in everything but...IE. At least IE8, I haven't been able to test IE7 or 6. Thing is, if I just open the page on its own, it works fine. It is when the page is loaded into the iframe that it screws up. If I put a little alert(max_height); in there, IE gives 0 when the page is called from the iframe. Curses! Any help is sincerely appreciated.
[jQuery] Re: IE iframe bug? Attributes not available on $(document).ready - any advice?
Just to note, maybe the problem is related to document.ready firing too early within iframe : http://groups.google.com/group/jquery-dev/browse_thread/thread/460f3f6a6bf0b61/1f7ae233a9485450 ?
[jQuery] Re: SOT: execute JS before a specific image loads
Use a noscript tag for the non-JavaScript case, and a script tag with document.write() for the JavaScript case: noscript img id=statsImg src=stats.cfm?somevar=someval width=1 height=1 / /noscript script type=text/javascript document.write( 'img id=statsImg src=stats.cfm?somevar=someval', /* your extra stuff here, e.g.: */ 'anothervar=anotherval', ' width=1 height=1 /' ); /script -Mike _ From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On Behalf Of Andy Matthews Sent: Wednesday, May 20, 2009 8:52 AM To: jquery-en@googlegroups.com Subject: [jQuery] SOT: execute JS before a specific image loads Can I intercept the loading of an image BEFORE it loads? We're looking at using an img tag for inserting stats on our server. Here's what I'm considering... 1) Collect certain information server side, write an img to the document like so (note the URL vars): img id=statsImg src=stats.cfm?somevar=someval width=1 height=1 / 2) Using JS, intercept the load of this image BEFORE it takes place, and add things to the URL vars. This way, if JS is not present, you get the default stuff, but if JS is present, you get extra stuff. Anyone? attachment: winmail.dat
[jQuery] Re: FormCheck Validation
Its certainly not a clone of that mootools plugin, but a good choice for a jQuery validation plugin is this: http://bassistance.de/jquery-plugins/jquery-plugin-validation/ Let me know if you have specific questions about it. Jörn On Wed, May 20, 2009 at 8:09 PM, Isaac Gonzalez ier...@gmail.com wrote: Hi everyone, Does anyone know of a jquery verions of Mootools FormCheck Validation Plugin? http://mootools.floor.ch/en/demos/formcheck/index.htm I don't want to reinvent the wheel it's already be done. thanks -- Isaac G.
[jQuery] Re: EasySlider 1.5: Tabbing through forms
I suspect you might have to have the focus() event on each field (or a delegate for it) do something to figure out what slide the focused field is in and have a function to move to that slide (or fire the click handler for Next). I don't remember seeing any slider plugins that will do that natively. I've got probably 20 bookmarked, but if you find one that does, I'd be interested in knowing about it. - Jack Francis Pat Patterson wrote: I really need some help here, people. Either a fix to the plugin, a workaround, or a new plugin altogether - can someone out there help me? On May 18, 2:02 pm, Francis \Pat\ Patterson francis.patter...@gmail.com wrote: I'm developing a form using the jQuery plugin EasySlider 1.5: http://cssglobe.com/post/4004/easy-slider-15-the-easiest-jquery-plugi... I want to add the ability to initiate the slider action when a user tabs to a field located off-screen, as in this example: http://www.fordpas.org/registration/teachers_coordinators/form_v2.asp So, when someone tabs through that first form area, and gets to Repeat Email, when they tab to the next field, it triggers the EasySlider much like the Next span tag. Any suggestions? It has to be possible, but I haven't come up with a solution yet. Help me Obi-Wan, you're my only hope.
[jQuery] Re: How to convert csv file to json
Hello, Thanks for your reply. Actually i'm retrieving data from google finance site in csv format. http://finance.google.com/finance/historical?q=GOOGstartdate=May+1%2C+2009enddate=May+5%2C+2009start=225num=25output=csv I want to convert that data to json or any suitable format on webpage so that i can show stock quote chart on the page using that data. regards, Nitin Sawant On May 20, 7:45 pm, brian bally.z...@gmail.com wrote: There's quite a difference between the two. JSON uses a key: value format, while CSV is generally value only On Wed, May 20, 2009 at 6:28 AM, Nitin Sawant nitin.jays...@gmail.com wrote: How to convert csv file to json using jquery / javascript??
[jQuery] Re: How to convert csv file to json
I've posted that topic on bytes.com also http://bytes.com/topic/javascript/answers/869610-convert-google-finance-data-array On May 20, 7:45 pm, brian bally.z...@gmail.com wrote: There's quite a difference between the two. JSON uses a key: value format, while CSV is generally value only On Wed, May 20, 2009 at 6:28 AM, Nitin Sawant nitin.jays...@gmail.com wrote: How to convert csv file to json using jquery / javascript??
[jQuery] Re: Replace newline char with comma using jquery
I've posted this topic on bytes.com also, pls help me http://bytes.com/topic/javascript/answers/869610-convert-google-finance-data-array regards, Nitin Sawant On May 20, 4:03 pm, Nitin Sawant nitin.jays...@gmail.com wrote: Hello Liam, Thanks for your reply, i'm retrieving csv file from google finance and parsing it, however the script which i wrote doesn't replace newline char from csv file with comma, I want to convert csv file to javascript array. html head title- Another CSV parser -/title script type=text/javascript src=flotr/jquery.js/script script type=text/javascript function loadData(){ $.get(http://finance.google.com/finance/historical;, { q:'GOOG', startdate:'Apr 1 2009', enddate:'May 1 2009', start:'225', num:'25', output:'csv' }, function(data) { // Writing output into div $(#csvDiv).html(data); $(#csvDiv).hide(); ConvertToArray(data); } ); } function ConvertToArray(data){ var myArr=$(#csvDiv).html(); myArr=myArr.replace(\n,,);//this line doesn't work myArr=myArr.split(','); document.writeln(array length is: +myArr.length+br/); //show all elements of array var i=0; for (i; imyArr.length; i++) { document.writeln(myArr[i]+'br /'); } } /script /head body div id=csvDiv /div script type=text/javascript loadData(); /script !-- http://finance.google.com/finance/historical?q=GOOGstartdate=May+1%2... -- /body /html On May 20, 3:56 pm, Liam Byrne l...@onsight.ie wrote: That code that you posted is replacing a newline with nothing - the comma is BETWEEN the parameters and is not one of them Try csvString=csvString.replace('\n',','); Nitin Sawant wrote: Hello frendz, I'm trying to replace newline char frm Google finance csv file with comma but its not happening pls help. http://finance.google.com/finance/historical?q=GOOGstartdate=May+1%2... I'm using following code csvString=csvString.replace('\n',''); I think there is some platform newline char issue. how to do this using jquery? pls help No virus found in this incoming message. Checked by AVG -www.avg.com Version: 8.5.339 / Virus Database: 270.12.35/2124 - Release Date: 05/20/09 06:22:00
[jQuery] jQuery Cycle plugin (help show/hide slide shows on same page)?
Hi all, I'm trying to setup multiple cycle slide shows on the same page; Only they occupy the same space on the page. So, I'm trying to hide the second slide show right away (no problem showing the first automatically), but when I attempt to hide the first and show the second, nothing happens. Is it even possible? or.. am I needing to find another way to do it? Thanks
[jQuery] Re: How to convert csv file to json
Hi Nitin, Are you trying to do this conversion in JavaScript, or on your server? Parsing a CSV file as simple as this one is trivial, in JavaScript or in any reasonable server language. (BTW, you wouldn't convert it to JSON, but to a two-dimensional array.) Ah... I just checked your bytes.com post - the csvArray() funcition you have there is along the right lines. But if you're trying to do this in JavaScript in the browser, there is a much bigger problem: How are you going to retrieve the data at all? Cross-domain restrictions will prevent you from fetching it. Do you actually get any thing back from your $.get()? If you have to do this in JavaScript, does Google Finance offer a JSONP output format option? That will work cross-domain. Also, your ConvertToArray function in your bytes.com post can't possibly work. This function is called in the $.get() callback, long after the page has finished loading. But it calls document.write(), which you can only call *while* the page is loading. -Mike From: Nitin Sawant Hello, Thanks for your reply. Actually i'm retrieving data from google finance site in csv format. http://finance.google.com/finance/historical?q=GOOGstartdate= May+1%2C+2009enddate=May+5%2C+2009start=225num=25output=csv I want to convert that data to json or any suitable format on webpage so that i can show stock quote chart on the page using that data. regards, Nitin Sawant On May 20, 7:45 pm, brian bally.z...@gmail.com wrote: There's quite a difference between the two. JSON uses a key: value format, while CSV is generally value only On Wed, May 20, 2009 at 6:28 AM, Nitin Sawant nitin.jays...@gmail.com wrote: How to convert csv file to json using jquery / javascript??
[jQuery] loading message
Hi guys, I'm working on a Rails app connected to a legacy database. Since the reading process from the database takes several seconds (up to ten) I would like to display a loading message while the page is loading. Can I achieve that using jQuery? If so how? Thanks and have a nice day. Sig
[jQuery] AUTO: Michael Lawson is out of the office (returning 05/26/2009)
I am out of the office until 05/26/2009. Enjoying a weekend of anime geekdom at Animazement in Raleigh NC. www.animazement.org If you have any questions or concerns, please contact Leena Paulose Note: This is an automated response to your message [jQuery] Re: How to print json data, key and value sent on 5/20/09 14:52:22. This is the only notification you will receive while this person is away.
[jQuery] Re: adding $(script) node actually runs the script - correct behavior?
I don't want to execute it. I want to print it out to the html page so the user knows how to embed this stuff on their page. If you actually run the code in the OP, it DOES execute, which was very unexpected. On 5/20/09 2:58 AM, Ricardo ricardob...@gmail.com wrote: I don't see the point. That script tag you added is not going to be evaluated anytime, it will just sit there doing nothing. You'll have to move it to the head to execute it. On May 20, 2:17 am, Paul Tarjan ptar...@gmail.com wrote: I actually wanted to append the text to the document. Here is how I'm working around it, but I thought building up the tags using jquery functions was the preferred method. var embed = $(span/).append( $(span/) .text(data) .attr(id, wnval) ).html(); embed = embed + 'scriptvar ' + wnval + ' = function(data) { document.getElementById(' + wnval + ').innerHTML = data; }/' + 'script' + 'script src=http://webnumbr.com/'+ val + '.json (callback=' + wnval + ')/' + 'script' it works fine this way, but in my original method (see OP) I had expected jquery to just add the script to the span instead of adding it to the document and evaluating it. On May 18, 10:57 pm, Ricardo ricardob...@gmail.com wrote: Script elements are not really appended. To ensure execution you have to append them to the head of the document or eval them. jQuery does the latter, so the element ends up not being in the DOM at all. What are you trying to achieve? There's no point in creating a script tag when you can just declare a function instead. On May 18, 8:40 pm, PaulTarjanptar...@gmail.com wrote: If I have a node that isn't in the DOM, and then I add a script to it, then it is actually executed. Example Expected behavior : s variable contains the string scriptalert('hi') /script. Observed behavior : alert box pop up and s contains script var s = $(span/).append($(script/).text(alert('hi'))).html() script You can see it running here :http://paulisageek.com/tmp/jquery-script.html Am I doing something wrong? Can I not write javascript from within jquery?
[jQuery] cycle plugin with keyboard
In cycle plugin, ss there way to switch images by keyboard arrows instead of clicking next, prev
[jQuery] Re: cycle plugin with keyboard
see this web site www.stunicholls.com in gallery section...