[jQuery] jQuery Form Processing
Hello, I'm trying to use this method to process a form and return an alert without navigating to a new page for the form processing. http://jquery.malsup.com/form/#getting-started I have this in my head statement: script type=text/javascript src=js/jquery-1.3.2.js/script script type=text/javascript src=js/jquery.form.js/script script type=text/javascript $(document).ready(function() { $('#autoSumForm').ajaxForm(function() { alert(Thank you for your comment!); }); }); /script And this is the form: form name=autoSumForm action=posttime.php method=post ... input type=submit name=submit id=submit value=Submit / /form When I click the submit button though, it takes me to posttime.php, and doesn't give the alert. What did I do wrong?
[jQuery] Re: jQuery Form Processing
Thanks. That worked. On Jan 12, 10:12 am, Karl Swedberg k...@englishrules.com wrote: Your selector is for an ID: $('#autoSumForm') But your form has no ID: form name=autoSumForm action=posttime.php method=post Try adding an ID to the form: form name=autoSumForm id=name=autoSumForm action=posttime.php method=post --Karl Karl Swedbergwww.englishrules.comwww.learningjquery.com On Jan 12, 2010, at 9:49 AM, Seth wrote: Hello, I'm trying to use this method to process a form and return an alert without navigating to a new page for the form processing. http://jquery.malsup.com/form/#getting-started I have this in my head statement: script type=text/javascript src=js/jquery-1.3.2.js/script script type=text/javascript src=js/jquery.form.js/script script type=text/javascript $(document).ready(function() { $('#autoSumForm').ajaxForm(function() { alert(Thank you for your comment!); }); }); /script And this is the form: form name=autoSumForm action=posttime.php method=post ... input type=submit name=submit id=submit value=Submit / /form When I click the submit button though, it takes me to posttime.php, and doesn't give the alert. What did I do wrong?
[jQuery] Validation
Hello, I'm using jquery with the form and validation plugins. I have this: script type=text/javascript $(document).ready(function() { $(#autoSumForm).validate({ rules: { p1001: {number: true}, p1002: {number: true} }, messages: { p1001: , p1002: } }); $('#autoSumForm').ajaxForm(function() { alert(Time submitted.); }); }); /script The validation and the form submit both work, but the form submits even if not valid. How do I combine the two? Thanks.
[jQuery] JQuery Modal AJAX and ASP.NET
I am a newbie of JQuery and got stuck with sending data from JQuery Modal to asp.net page. Here is my code: code function getGrower(rowid) { // get data in the selected row and prepare query string var c = 0; var str = ; $(#result_tbl tr td. + rowid).each(function() { var cell_val = $(this).text(); cell_val = replace_and(cell_val); if (c == 0) str = GrowerID= + cell_val; if (c == 1) str += LicenseNumber= + cell_val; if (c == 2) str += FarmName= + cell_val; if (c == 3) str += FirstName= + cell_val; if (c == 4) str += LastName= + cell_val; if (c == 5) str += AddressLine1= + cell_val; if (c == 6) str += City= + cell_val; if (c == 7) str += State= + cell_val; if (c == 8) str += Zip= + cell_val; if (c == 9) str += Phone= + cell_val; if (c == 10) str += Email= + cell_val; if (c == 11) str += County= + cell_val; c++; }); // alert(str); // send data to server for processing and notify the user $.ajax({ type: POST, url: ClaimManagementType.aspx, data: str, success: function(){ alert( The form has been populated with selected grower successfully.); } }); } function replace_and(str) { return str.replace('', '[and]'); } /code Here is the VB.NET to grab data from the AJAX code Private Sub GetGrowerFromSearch() If Not String.IsNullOrEmpty(Request.Params(FirstName)) Then Me.tbClaimantFirstName.Text = Restore_and(Request.Params (FirstName)) End If If Not String.IsNullOrEmpty(Request.Params(LastName)) Then Me.tbClaimantLastName.Text = Restore_and(Request.Params (LastName)) End If If Not String.IsNullOrEmpty(Request.Params(AddressLine1)) Then Me.tbClaimantAddress.Text = Restore_and(Request.Params (AddressLine1)) End If If Not String.IsNullOrEmpty(Request.Params(City)) Then Me.tbClaimantCity.Text = Restore_and(Request.Params (City)) End If If Not String.IsNullOrEmpty(Request.Params(Zip)) Then Me.tbClaimantZip.Text = Restore_and(Request.Params(Zip)) End If Dim state As String If Not String.IsNullOrEmpty(Request.Params(State)) Then state = Restore_and(Request.Params(State)) GetGrowerStates(Me.ddClaimantState, state) End If If Not String.IsNullOrEmpty(Request.Params(Phone)) Then Me.txtPhone.Text = Restore_and(Request.Params(Phone)) End If If Not String.IsNullOrEmpty(Request.Params(FarmName)) Then Me.tbClaimantBusinessName.Text = Restore_and(Request.Params (FarmName)) End If End Sub Private Function Restore_and(ByVal str As String) As String Return str.Replace([and], ) End Function /code The sent data get all the way to the targeted ASP.NET page. My problem is that the form controls in the targeted page do not get populated. The data does not show up in the form on the targeted page. Please help explain and possibly identify the problem. Any helps will be appreciated.
[jQuery] html in xml tag
Hi guys, I have an XML file like this ?xml version=1.0 encoding=utf-8? data item nameLorem ipsum/name descriptionLorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.br //description imageimages/coal.jpg/image /item /data . etc now on description tag i need to enter some formating elements like br p li bold etc, if i enter html elements this line desc = $ (this).find(description).text(); will strip all my html code .. probably because of the .text() function at the end, my question is what function to try at the end because .html() is not working like this desc = $(this).find(description).html(); is not working .. basically i need to be able to read the html elements too so i can display in the div that will display the info ... dose anybody know some jquery function that dose that ? Thanks!
[jQuery] Re: html in xml tag
Thank you Michael for your reply however wrapping the data intro ! [CDATA[]] don't work ... i have try that before i just did not mention it, if anybody has other ideas or some suggestions i will appreciate it, i'm sure somebody has done this before i just hope he is here on forum :D Thanks! On Aug 12, 6:59 pm, Michael Lawson mjlaw...@us.ibm.com wrote: Try wrapping your html text in a CDATA section so that the xml parser doesn't strip them out cheers Michael Lawson Development Lead, Global Solutions, ibm.com Phone: 1-276-206-8393 E-mail: mjlaw...@us.ibm.com 'Whether one believes in a religion or not, and whether one believes in rebirth or not, there isn't anyone who doesn't appreciate kindness and compassion..' From: Seth claudiu.dan...@gmail.com To: jQuery (English) jquery-en@googlegroups.com Date: 08/12/2009 11:41 AM Subject: [jQuery] html in xml tag Hi guys, I have an XML file like this ?xml version=1.0 encoding=utf-8? data item nameLorem ipsum/name descriptionLorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.br //description imageimages/coal.jpg/image /item /data . etc now on description tag i need to enter some formating elements like br p li bold etc, if i enter html elements this line desc = $ (this).find(description).text(); will strip all my html code .. probably because of the .text() function at the end, my question is what function to try at the end because .html() is not working like this desc = $(this).find(description).html(); is not working .. basically i need to be able to read the html elements too so i can display in the div that will display the info ... dose anybody know some jquery function that dose that ? Thanks! graycol.gif 1KViewDownload ecblank.gif 1KViewDownload
[jQuery] Re: html in xml tag
sorry you are right :) not knowing everything is not very helpful, well i'm playing a bit with jquery and i made 1 page and 1 file with xml data .. the xml you have seen it above now i try to read the data from xml and insert it in to the html page, i will have a name witch will be the title of the page 1 image and description, now the description i want to be able to enter html code so i can format the text like bold, italic, list, ol, li, p, etc, and by having more items that means i can have more pages and like this i can build an entire website with out sql or php or whatever language, it's just and idea that i'm trying out, and this is the thing where i got stuck .. i can't read html from xml .. if i enter html info in xml like br p b etc my scripts are working but they strip the html tags thats because of the .text() function at the end of this line desc = $ (this).find(description).text(); so they work but no formatting, if i enter ![CDATA[]] in description then the scripts stop working ... any hint or idea would be great :) Claudiu On Aug 12, 11:00 pm, Michael Lawson mjlaw...@us.ibm.com wrote: It looks like you're using an RSS feed given the xml format, so you probably want to use the CDATA sections anyways so that RSS readers don't get confused by the HTML tags. Now, maybe I just don't understand exactly what you're trying to accomplish? Are you saying you want to just read the contents of the description field? cheers Michael Lawson Development Lead, Global Solutions, ibm.com Phone: 1-276-206-8393 E-mail: mjlaw...@us.ibm.com 'Whether one believes in a religion or not, and whether one believes in rebirth or not, there isn't anyone who doesn't appreciate kindness and compassion..' From: Seth claudiu.dan...@gmail.com To: jQuery (English) jquery-en@googlegroups.com Date: 08/12/2009 03:48 PM Subject: [jQuery] Re: html in xml tag Thank you Michael for your reply however wrapping the data intro ! [CDATA[]] don't work ... i have try that before i just did not mention it, if anybody has other ideas or some suggestions i will appreciate it, i'm sure somebody has done this before i just hope he is here on forum :D Thanks! On Aug 12, 6:59 pm, Michael Lawson mjlaw...@us.ibm.com wrote: Try wrapping your html text in a CDATA section so that the xml parser doesn't strip them out cheers Michael Lawson Development Lead, Global Solutions, ibm.com Phone: 1-276-206-8393 E-mail: mjlaw...@us.ibm.com 'Whether one believes in a religion or not, and whether one believes in rebirth or not, there isn't anyone who doesn't appreciate kindness and compassion..' From: Seth claudiu.dan...@gmail.com To: jQuery (English) jquery-en@googlegroups.com Date: 08/12/2009 11:41 AM Subject: [jQuery] html in xml tag Hi guys, I have an XML file like this ?xml version=1.0 encoding=utf-8? data item nameLorem ipsum/name descriptionLorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.br //description imageimages/coal.jpg/image /item /data . etc now on description tag i need to enter some formating elements like br p li bold etc, if i enter html elements this line desc = $ (this).find(description).text(); will strip all my html code .. probably because of the .text() function at the end, my question is what function to try at the end because .html() is not working like this desc = $(this).find(description).html(); is not working .. basically i need to be able to read the html elements too so i can display in the div that will display the info ... dose anybody know some jquery function that dose that ? Thanks! graycol.gif 1KViewDownload ecblank.gif 1KViewDownload graycol.gif 1KViewDownload ecblank.gif 1KViewDownload
[jQuery] Re: html in xml tag
yes basicaly i want to read the content of description but to keep the formatting elements from html b br p etc On Aug 12, 11:03 pm, Michael Lawson mjlaw...@us.ibm.com wrote: Scratch that, my bad. On closer look its not RSS :) (its the first thing that comes to mind when i see item followed by description) My previous question still stands though, are you just wanting to read the contents of the description field? cheers Michael Lawson Development Lead, Global Solutions, ibm.com Phone: 1-276-206-8393 E-mail: mjlaw...@us.ibm.com 'Whether one believes in a religion or not, and whether one believes in rebirth or not, there isn't anyone who doesn't appreciate kindness and compassion..' From: Michael Lawson/Raleigh/Contr/i...@ibmus To: jquery-en@googlegroups.com Cc: jQuery (English) jquery-en@googlegroups.com Date: 08/12/2009 04:01 PM Subject: [jQuery] Re: html in xml tag It looks like you're using an RSS feed given the xml format, so you probably want to use the CDATA sections anyways so that RSS readers don't get confused by the HTML tags. Now, maybe I just don't understand exactly what you're trying to accomplish? Are you saying you want to just read the contents of the description field? cheers Michael Lawson Development Lead, Global Solutions, ibm.com Phone: 1-276-206-8393 E-mail: mjlaw...@us.ibm.com 'Whether one believes in a religion or not, and whether one believes in rebirth or not, there isn't anyone who doesn't appreciate kindness and compassion..' Inactive hide details for Seth ---08/12/2009 03:48:48 PM---Thank you Michael for your reply however wrapping the data intro !Seth ---08/12/2009 03:48:48 PM---Thank you Michael for your reply however wrapping the data intro ! From: Seth claudiu.dan...@gmail.com To: jQuery (English) jquery-en@googlegroups.com Date: 08/12/2009 03:48 PM Subject: [jQuery] Re: html in xml tag Thank you Michael for your reply however wrapping the data intro ! [CDATA[]] don't work ... i have try that before i just did not mention it, if anybody has other ideas or some suggestions i will appreciate it, i'm sure somebody has done this before i just hope he is here on forum :D Thanks! On Aug 12, 6:59 pm, Michael Lawson mjlaw...@us.ibm.com wrote: Try wrapping your html text in a CDATA section so that the xml parser doesn't strip them out cheers Michael Lawson Development Lead, Global Solutions, ibm.com Phone: 1-276-206-8393 E-mail: mjlaw...@us.ibm.com 'Whether one believes in a religion or not, and whether one believes in rebirth or not, there isn't anyone who doesn't appreciate kindness and compassion..' From: Seth claudiu.dan...@gmail.com To: jQuery (English) jquery-en@googlegroups.com Date: 08/12/2009 11:41 AM Subject: [jQuery] html in xml tag Hi guys, I have an XML file like this ?xml version=1.0 encoding=utf-8? data item nameLorem ipsum/name descriptionLorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.br //description imageimages/coal.jpg/image /item /data . etc now on description tag i need to enter some formating elements like br p li bold etc, if i enter html elements this line desc = $ (this).find(description).text(); will strip all my html code .. probably because of the .text() function at the end, my question is what function to try at the end because .html() is not working like this desc = $(this).find(description).html(); is not working .. basically i need to be able to read the html elements too so i can display in the div that will display the info ... dose anybody know some jquery function that dose that ? Thanks! graycol.gif 1KViewDownload ecblank.gif 1KViewDownload graycol.gif 1KViewDownload ecblank.gif 1KViewDownload
[jQuery] Re: html in xml tag
no and i did not see it on jquery docs .. i will search on it now :) On Aug 12, 11:18 pm, Michael Lawson mjlaw...@us.ibm.com wrote: Just leave the html in there as it is have you tried the contents() function yet? cheers Michael Lawson Development Lead, Global Solutions, ibm.com Phone: 1-276-206-8393 E-mail: mjlaw...@us.ibm.com 'Whether one believes in a religion or not, and whether one believes in rebirth or not, there isn't anyone who doesn't appreciate kindness and compassion..' From: Seth claudiu.dan...@gmail.com To: jQuery (English) jquery-en@googlegroups.com Date: 08/12/2009 04:13 PM Subject: [jQuery] Re: html in xml tag yes basicaly i want to read the content of description but to keep the formatting elements from html b br p etc On Aug 12, 11:03 pm, Michael Lawson mjlaw...@us.ibm.com wrote: Scratch that, my bad. On closer look its not RSS :) (its the first thing that comes to mind when i see item followed by description) My previous question still stands though, are you just wanting to read the contents of the description field? cheers Michael Lawson Development Lead, Global Solutions, ibm.com Phone: 1-276-206-8393 E-mail: mjlaw...@us.ibm.com 'Whether one believes in a religion or not, and whether one believes in rebirth or not, there isn't anyone who doesn't appreciate kindness and compassion..' From: Michael Lawson/Raleigh/Contr/i...@ibmus To: jquery-en@googlegroups.com Cc: jQuery (English) jquery-en@googlegroups.com Date: 08/12/2009 04:01 PM Subject: [jQuery] Re: html in xml tag It looks like you're using an RSS feed given the xml format, so you probably want to use the CDATA sections anyways so that RSS readers don't get confused by the HTML tags. Now, maybe I just don't understand exactly what you're trying to accomplish? Are you saying you want to just read the contents of the description field? cheers Michael Lawson Development Lead, Global Solutions, ibm.com Phone: 1-276-206-8393 E-mail: mjlaw...@us.ibm.com 'Whether one believes in a religion or not, and whether one believes in rebirth or not, there isn't anyone who doesn't appreciate kindness and compassion..' Inactive hide details for Seth ---08/12/2009 03:48:48 PM---Thank you Michael for your reply however wrapping the data intro !Seth ---08/12/2009 03:48:48 PM---Thank you Michael for your reply however wrapping the data intro ! From: Seth claudiu.dan...@gmail.com To: jQuery (English) jquery-en@googlegroups.com Date: 08/12/2009 03:48 PM Subject: [jQuery] Re: html in xml tag Thank you Michael for your reply however wrapping the data intro ! [CDATA[]] don't work ... i have try that before i just did not mention it, if anybody has other ideas or some suggestions i will appreciate it, i'm sure somebody has done this before i just hope he is here on forum :D Thanks! On Aug 12, 6:59 pm, Michael Lawson mjlaw...@us.ibm.com wrote: Try wrapping your html text in a CDATA section so that the xml parser doesn't strip them out cheers Michael Lawson Development Lead, Global Solutions, ibm.com Phone: 1-276-206-8393 E-mail: mjlaw...@us.ibm.com 'Whether one believes in a religion or not, and whether one believes in rebirth or not, there isn't anyone who doesn't appreciate kindness and compassion..' From: Seth claudiu.dan...@gmail.com To: jQuery (English) jquery-en@googlegroups.com Date: 08/12/2009 11:41 AM Subject: [jQuery] html in xml tag Hi guys, I have an XML file like this ?xml version=1.0 encoding=utf-8? data item nameLorem ipsum/name descriptionLorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.br //description imageimages/coal.jpg/image /item /data . etc now on description tag i need to enter some formating elements like br p li bold etc, if i enter html elements this line desc = $ (this).find(description).text(); will strip all my html code .. probably because of the .text() function at the end, my question is what function to try at the end because .html() is not working like this desc
[jQuery] is .closest() included in 1.3.2. minified?
Hi I'm trying to keep the load time down on my site... many users from the UK! is .closest() included in 1.3.2. minified or do I need the full thing (114kb)?
[jQuery] [autocomplete] disable submit until valid selection is made
Hello, I have a situation where the only valid inputs on my autocomplete field are the ones supplied by my ajax method. Is there a way to disable the submit button on my form until the input field contains one of the autocomplete values?
[jQuery] Dynamically Created TextArea
I am creating a form to where a user will be able to create as many additional textareas as they would like. However, I need to add the ability to have them be able to click remove next to the added textareas so that that textarea will be removed. I would like the remove to be an option up until only one textarea remains. The following is what I have creating the textareas on the click of add_description $(#add_description).click(function(){ $(':input[type=textarea]:last').after(textarea id='description + $(':input[type=textarea]').length +' name='description + $ (':input[type=textarea]').length + ' tabindex='11' cols='80' rows='5' class='xlarge' style='width: 460px; margin-top: 10px;'/ textarea); return false; }); Any help is greatly appreciated. Seth
[jQuery] Safe Validate for Salesforce
I am using the Validate plugin for validating our contact form which sends data into SalesForce. We just implemented the AdWords plugin for SalesForce and they say that using form.submit will break their javascript for SalesForce. Currently with the Validate plugin I do some custom functions using the SubmitHandler option for creating values in the fields that go into SalesForce and at the end I use form.submit. $(#EmailForm).validate({ errorContainer: container, errorLabelContainer: $(ul, container), wrapper: 'li', meta: validate, submitHandler: function(form) { var comp = $(input[name='company']).val(); var ph = $(input[name='phone']).val(); var em = $(input[name='email']).val(); var ln = $(input[name='last_name']).val(); var fn = $(input[name='first_name']).val(); var comments = $([name='comments']).val(); var prod = ; //var checkboxes_product_code; //checkboxes_product_code = $('.product:checkbox').attr(name); //alert(checkboxes_product_code); var checkbox_count = 0; $(':checkbox:checked').each(function(checkbox_count){ if(checkbox_count $(':checkbox:checked').length - 1){ prod += $(this).val() + , ; } else{ prod += $(this).val(); } return checkbox_count++; }); var det = fn + + ln + of + comp + completed the form on the website and would like information on + prod +. Please contact + fn + at your earliest convenience at + ph + or + em +.; if(comments != ){ det = det + Comments / Questions: + comments; } //$(input[name=' + checkboxes_product_code + ']).val(prod); $(input[name='000jroe']).val(det); //console.log($(input[name='000jroe']).val()); //alert($(#000jroe).val()); form.submit(); } }); The recommend using an onsubmit call in the form. Plus the javascript which it uses to determine the lead source is looking for a button to submit the form. This is there recommended way http://blogs.salesforce.com/adwords/2007/09/web-to-lead-for.html. Any one have experience with this, or have any suggestions of not using form.submit? Thanks. Seth
[jQuery] Re: Selecting multiple table rows with jQuery and Tablesorter
First, I'm sorry I have no answers, but I want you to know you are not alone with this issue. I also need users to be able to select multiple rows at once, using a modifier key like shift. Sometimes they will select 20 rows at a time so clicking each one individually would be a usability nightmare. I will be watching this thread with high hopes, I've also seen Grid and Ingrid which are very close, but not quite there. On Oct 8, 1:15 pm, shakerdesigns [EMAIL PROTECTED] wrote: I've been looking around, but have yet to find the right jquery solution for selecting table rows using jQuery and the Tablesorter plugin. I've created a widget to toggle css classes and highlight each selected row, but I'm looking for more functionality than that. I've also seen other plugins like Ingrid andGrid, but they don't have the control I need. Specifically, I'm looking to use 'click' toselecta row, 'ctrl+click' toselectmultiple rows, keyboard shortcuts toselectall rows ('ctrl+a') and the ability to navigate thru the table with the arrow keys. Similar to the functionality found in a desktop spreadsheet program like Numbers or Excel. Does anyone know of a solution or could provide some feedback as to how I might make one? -- View this message in context:http://www.nabble.com/Selecting-multiple-table-rows-with-jQuery-and-T... Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Sifr removing header when printing
I am working to get my print CSS correct, however, the h2 tags which I am using sifr on, are getting hidden when printing the page. Any thoughts on how to remedy this? Thanks. Seth
[jQuery] ajax success within a plugin
I am trying to create a polling plugin called via $ (#element).poll(); Within the plugin I am calling the $.ajax function. I have a default success option within the plugin but also allow the developer to override if needed. The problem I am having is that withing the success of the ajax function I have: $(this).html(data). That isn't being called and I can't figure out why. Here is my code: $.fn.poll = function(options){ // extend our default options with those provided var opts = $.extend({}, $.fn.poll.defaults, options); setInterval(update, opts.interval); // method used to update element html function update(){ $.ajax({ type: opts.type, url: opts.url, success: opts.success }); }; }; // default options $.fn.poll.defaults = { type: POST, url: ., success: function(data){ $(this).html(data) }, interval: 2000 }; Can someone help me?
[jQuery] SimpleModal for lead generation
Hi there I am attempting to create a modal which will ask for an email address when a user attempts to download a document. The basic functionality is to capture a click, send document src (so redirecting from the modal can be done), send email address to remote page for processing, detect for errors (client and server side), redirect user to document whether they opted to enter email address or not. This is what I have so far $(a[rel='download']).click(function (e) { e.preventDefault(); $.get(/download.asp, function(data){ $(data).modal({ onShow: onShowFuncs, close: false }); }); }); function onShowFuncs () { $(#optout).click(function (e){ e.preventDefault(); $.modal.close(); }); } });
[jQuery] Re: Sorting Divs by Span Value
TinySort 0.2.0 was just released with the IE for each fix. http://plugins.jquery.com/node/2986 On Jun 18, 3:28 pm, Seth - TA [EMAIL PROTECTED] wrote: @Kevin I got that same error as well. I made a comment on the plugins page to the author. Hopefully I will get an answer, I like the plugin. Seth On Jun 12, 6:01 pm, Kevin Pepperman [EMAIL PROTECTED] wrote: This is a handy plugin. But it seems to be throwing an expected '(' error in IE. and not functiong correct. FF works OK. If anyone else can confirm the but I will post a bug report. On Tue, Jun 10, 2008 at 11:55 AM, Seth - TA [EMAIL PROTECTED] wrote: Found this plugin to do the job. TinySort - http://www.sjeiti.com/?page_id=321 On Jun 5, 7:29 pm, Dave Methvin [EMAIL PROTECTED] wrote: Wrap that html in a div id=hotels /div and try this code triggered by a button or link. function reorder(sortby, direction) { Array.prototype.sort.call($(div.hotel), function(a,b){ var av = $(a).find(span.+sortby).text(); var bv = $(b).find(span.+sortby).text(); return direction==ascending? av-bv : bv-av; }).appendTo(#hotels); } sortby is the class name of any of the spans like distance or rate; direction is ascending (low to high) or descending. The code assumes the spans should always be sorted as numeric values. That code should be plenty fast for a dozen or so entries, but it would get slow for 100 because it requeries for the span values on eachsortcomparison. -- He's spending $300 million in advertising to convince people of something he claims there is already a consensus on.-- --Think of it as going green by getting lots of green. -Glenn Beck (CNN) about Al Gore.
[jQuery] Re: firefox 3 RC1 : tremendous slow down
I am not sure how fast the animations were in FF2, but it seems to me that your site is pretty smooth, animation wise. I'm running FF3 on XP w/ Core Duo 2. Seth On Jun 19, 6:48 am, Aldo [EMAIL PROTECTED] wrote: Hi I'm experiencing the same slow dows in animations and fades with FF3 Final as well. Someone any idea? Thanks Aldo On 21 Mai, 21:52, Alexandre Plennevaux [EMAIL PROTECTED] wrote: hi friends, i just checked my jquery application using Firefox 3 Release Candidate 1 and whatever animations that are smooth and fluid in FF2 are staggering in FF3 RC1. Does anybody have the same issue, or knows why? the test is here:http://m2.lab-au.com/ (choose 'projects'). thanks for your feedback, Alexandre -- Alexandre Plennevaux LAb[au] http://www.lab-au.com
[jQuery] Re: Sorting Divs by Span Value
@Kevin I got that same error as well. I made a comment on the plugins page to the author. Hopefully I will get an answer, I like the plugin. Seth On Jun 12, 6:01 pm, Kevin Pepperman [EMAIL PROTECTED] wrote: This is a handy plugin. But it seems to be throwing an expected '(' error in IE. and not functiong correct. FF works OK. If anyone else can confirm the but I will post a bug report. On Tue, Jun 10, 2008 at 11:55 AM, Seth - TA [EMAIL PROTECTED] wrote: Found this plugin to do the job. TinySort - http://www.sjeiti.com/?page_id=321 On Jun 5, 7:29 pm, Dave Methvin [EMAIL PROTECTED] wrote: Wrap that html in a div id=hotels /div and try this code triggered by a button or link. function reorder(sortby, direction) { Array.prototype.sort.call($(div.hotel), function(a,b){ var av = $(a).find(span.+sortby).text(); var bv = $(b).find(span.+sortby).text(); return direction==ascending? av-bv : bv-av; }).appendTo(#hotels); } sortby is the class name of any of the spans like distance or rate; direction is ascending (low to high) or descending. The code assumes the spans should always be sorted as numeric values. That code should be plenty fast for a dozen or so entries, but it would get slow for 100 because it requeries for the span values on eachsortcomparison. -- He's spending $300 million in advertising to convince people of something he claims there is already a consensus on.-- --Think of it as going green by getting lots of green. -Glenn Beck (CNN) about Al Gore.
[jQuery] Re: New JQuery Plugin - Menu Toggle Adder
Just a suggestion - it took me a while to figure out I had to click the triangle for the drop down to work. Not many people are going to do that the first time. Might want to expand to having the triangle and the header clickable. Seth On Jun 13, 7:21 am, Ed [EMAIL PROTECTED] wrote: Thanks for the feed back. I still haven't installed ie8, but I finally got ff3. Everything in the example seems to be working as expected in ff3. Please let me know what you spotted that isn't working. For example: Here:http://robottoysreviews.com/menu_toggle_adder_example_1.htm or Here:http://robottoysreviews.com/menu_toggle_adder_example_2.htm On Jun 7, 11:25 am, steve_f [EMAIL PROTECTED] wrote: Your demo page does not work in FF3, also I get a script error running IE8.0 but in IE7.0 compat mode. On Jun 7, 4:20 pm, Ed [EMAIL PROTECTED] wrote: Here's a new JQuery Plugin: Menu Toggle Adder http://code.google.com/p/js-menu-toggle-adder/ It automatically adds toggle triangles to unordered list menus for each list item that contains an unordered list. It does a bunch of other stuff, like expanding the nested ul that matches the current url and adds a class to links that match the current url. It's designed to help long, vertical menus on ecommerce websites be more usable. This is my first JQuery plugin. Any feedback is greatly appreciated.
[jQuery] Re: Sorting Divs by Span Value
Found this plugin to do the job. TinySort - http://www.sjeiti.com/?page_id=321 On Jun 5, 7:29 pm, Dave Methvin [EMAIL PROTECTED] wrote: Wrap that html in a div id=hotels /div and try this code triggered by a button or link. function reorder(sortby, direction) { Array.prototype.sort.call($(div.hotel), function(a,b){ var av = $(a).find(span.+sortby).text(); var bv = $(b).find(span.+sortby).text(); return direction==ascending? av-bv : bv-av; }).appendTo(#hotels); } sortby is the class name of any of the spans like distance or rate; direction is ascending (low to high) or descending. The code assumes the spans should always be sorted as numeric values. That code should be plenty fast for a dozen or so entries, but it would get slow for 100 because it requeries for the span values on eachsortcomparison.
[jQuery] Plotkit Port?
I saw this when looking for chart functionality http://www.liquidx.net/plotkit/, but wasn't sure if anyone was looking to port it, or has? I saw the Chart plugin, but says 0.1 which says to me that it is pretty far off, although the demos looked alright. Just wondering. Seth
[jQuery] Re: Sorting Divs by Span Value
Something along the lines of this: div class=hotel pHotel 1br / Hotel 1 Addressbr / Hotel 1 Phone br / Distance: span class=distance5/spanmi br / Room Rate: $span class=rate125.50/span /p /div div class=hotel pHotel 2br / Hotel 2 Addressbr / Hotel 2 Phone br / Distance: span class=distance11/spanmi br / Room Rate: $span class=rate154.50/span /p /div div class=hotel pHotel 3br / Hotel 3 Addressbr / Hotel 3 Phone br / Distance: span class=distance1/spanmi br / Room Rate: $span class=rate105.50/span /p /div Of course it could be just a p with a span in it too. But that is the structure I am thinking. Thanks for any help. Regards, Seth On Jun 4, 7:51 pm, Dave Methvin [EMAIL PROTECTED] wrote: For some reason, when sorting numbers, it disregards the second number. So if I have {11,100, 500} it would sort it {100,11,500}. That is completely wrong. Looks like it's doing a character sort, at least for the data set you have there. Can you show the specific markup you'll have in this case? I think I see what you're trying to do but I want to make sure I know exactly what the markup looks like before I try some code.
[jQuery] Re: Collecting info on sites using jquery.
Here is a HUGE list, enjoy - http://docs.jquery.com/Sites_Using_jQuery On Jun 4, 6:36 am, Istvan Orban [EMAIL PROTECTED] wrote: Hi All, I have been using jQuery now more then 6 months. It is amazing. Although as a Java Programmer I found it very difficult to turn my head around, and start using prototypal inheritance and all the Javascript stuff. I have checked in many Frameworks, and jQuery seemed to be the least verbose and most expressing. which was a major point when we went for jQuery. There is clear documentation how to develop plugins, also due to the YUI theatre there are plenty of info on Javascript itself as well. So My big question is, I would like to collect and also maybe put together some info on : 1, Best practises with Portlets with JQuery 2, Best practises when writting component on the page generally. - do you prefer some inheritance ( I know with jQuery this is not the best ) - use delegation I would like to see example from Real Life projects where People faced these problems and I would like to learn from why and what they have decided. so Could we put together somewhere a little list of sites and preferable links to some js files and css etc. which shows some great examples of implementation with jQuery. Any suggestions, Links, infos are very welcome. Thanks Istvano So My big question is, I would like to learn and SEE how other have used jQuery with real sites and real implementation.
[jQuery] Sorting Divs by Span Value
I got a little bit of info from this old thread - http://groups.google.com/group/jquery-en/browse_thread/thread/e0d6c199552dd1f7/145d28867f5e9577?lnk=gstq=sorting#145d28867f5e9577, however, not enough. For some reason, when sorting numbers, it disregards the second number. So if I have {11,100, 500} it would sort it {100,11,500}. That is completely wrong. My intension is to have a Div which holds hotel information. (I know I could do a table and use tablesorter, but the layout does not look good with a table). Within each div will be two spans which will have either the price in one and a distance in the other. I will have two links above the list of divs which can be clicked on to determine how they are sorted. Any help is greatly appreciated. Seth
[jQuery] [tablesorter] Custom Sorts
I am having a couple issues with how to sort a few of my fields. The first, and I think most difficult is I have a field which holds the value of Empty or lists state abbreviations. What I'd like it to do is have Empty be grouped together and then sort the state abbreviations in alpha. I tried the grades demo, but with no success. The second is I have an ID field which is constructed by the year and then a sequential number. Example - 2008 - 1, 2008 - 2, 2008 - 3, etc. The problem is that when sorted it sorts like this... 2008 - 90, 2008 - 9, 2008 - 89 It does see the 9 as coming after 8 and before 10, but between 90 and 89. Help with either one is greatly appreciated. Seth
[jQuery] Tablesorter - Custom Sorts
[Tried posting this, but never saw it go through. Sorry if it duplicates] I am having a couple issues with how to sort a few of my fields. The first, and I think most difficult is I have a field which holds the value of Empty or lists state abbreviations. What I'd like it to do is have Empty be grouped together and then sort the state abbreviations in alpha. I tried the grades demo, but with no success. The second is I have an ID field which is constructed by the year and then a sequential number. Example - 2008 - 1, 2008 - 2, 2008 - 3, etc. The problem is that when sorted it sorts like this... 2008 - 90, 2008 - 9, 2008 - 89 It does see the 9 as coming after 8 and before 10, but between 90 and 89. Help with either one is greatly appreciated. Seth
[jQuery] Re: Printing A Div
Dave Check this out. http://designerkamal.com/jPrintArea/ Seth On May 13, 1:24 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I want to print a div that contains content. I know how to do it with CSS, I need to be able to print different things from different parts of a page. Need some advice on how to get started. DO I load the div into an iframe and print that? Any ideas? Lemme know.
[jQuery] Re: popup window like google map infowindow
Check this out. http://jqueryfordesigners.com/coda-popup-bubbles/ I haven't done it personally, but its close. Seems cool. Hope it helps. Seth On Apr 23, 9:22 am, wesbird [EMAIL PROTECTED] wrote: Hi, I'm looking for a solution to create a popup window like google map infowindow. when I google it, all about how to create infowindow in google map which is not what I am looking for. I start use jQuery about 3 month agos, I really like it. Does anybody experise it? or what's term of it so I can google it properly? Thank you, Wes
[jQuery] is there a way to retrieve objects with a given :hover color?
I'm trying to access all objects with a given color, but I can't figure out how to get objects by :hover color. I'm using this code: $(document).ready(function() { $('*').each(function() { var fg = $(this).css('color'); // do something with $(this) $(this).addClass(identifier + color2Id(fg)); } } This works for objects with basic selectors, like a {color:blue} but not for objects like a:hover {color:red}. Is there some way to find the objects that have :hover colors? Seth
[jQuery] Re: copying from one select box or combobox to another.
If I understood it correct I have a jQuery snippet where I did a Same as Shipping address kind of thing. code script $(document).ready(function(){ function same_billing() { var thisCheck = $(this); var owner_address = $(#owner_address).val(); var owner_city = $(#owner_city).val(); var owner_state = $(#owner_state).val(); var owner_zip = $(#owner_zip).val(); if (thisCheck.is (':checked')) { $(#billing_address).val(owner_address); $(#billing_city).val(owner_city); $(#billing_state).val(owner_state); $(#billing_zip).val(owner_zip); } else{ $(#billing_address).val(''); $(#billing_city).val(''); $(#billing_state).val(''); $(#billing_zip).val(''); } } $(#billing_same).click(same_billing); } /script /code On Apr 15, 1:50 pm, millitheKidd [EMAIL PROTECTED] wrote: I know I've already asked this before -- and, well, it may not even be possible, but, here goes again. Is it possible to copy from one combobox to another one; such as address information. After COMBING the web, I FINALLY found an example here: http://www.plus2net.com/javascript_tutorial/copy-listbox.php But, what I would like to do is use telerik's radcombobox or an asp.net combobox to do mine with. Below, you can see where I got it to work using just a plain old HTML select box, but I really want to get it to work using telerik's combo; as they have cool styling and functionality on theirs. Here's my radiobuttonlist control: asp:RadioButtonList ID=rblMailingAddress runat=server TabIndex=330 asp:ListItem Value=SameasBusaddrSame as my business address./asp:ListItem asp:ListItem Value=SameasHomeaddrSame as my home address./asp:ListItem asp:ListItem Value=SeparateaddrThis is a separate address./asp:ListItem /asp:RadioButtonList Here's my RadcomboBoxes: radC:RadComboBox ID=cmbBusinessState runat=server DataSourceID=StateListXmlDataSource SkinsPath=~/RadControls/ComboBox/Skins Width=140px TabIndex=160 DataTextField=Text DataValueField=Value Height=140px Skin=WindowsXP MarkFirstMatch=True /radC:RadComboBox 2 more with an ID of cmbResidentState and cmbMailingState And here's my jquery: $(document).ready(function(){ //For Mailing Address information $('#rblMailingAddress :radio').click(function() { var CurVal = $([EMAIL PROTECTED]'rblMailingAddress']:checked).val() if(CurVal == SameasBusaddr) { $(#tbMailingAddress).val($(#tbBusinessAddress).val()); //these 2 peterblum textboxes are working fine. $(#tbMailingCity).val($(#tbBusinessCity).val()); //so are these, they are working too. $('#Select2').val($('#Select1').val()); //this worked with just plain old html select boxes. $(#msdeMailingZip).val($(#msdeBusinessZip).val()); //Peter Blum's Multi-Segment Data Entry is not working either but I will contact him for that issue. } else if(CurVal == SameasHomeaddr) { $(#tbMailingAddress).val($(#tbResidentAddress).val()); $(#tbMailingCity).val($(#tbResidentCity).val()); $(#cmbMailingState).val($(#cmbResidentState).val()); //tried telerik.com's radcombobox but this didn't work. $(#msdeMailingZip).val($(#msdeResidentZip).val()); } else { //If This is a separate address. was clicked then clear 'em out and reset the comboboxes to 0 SelectedIndex. $(#tbMailingAddress).val(); $(#tbMailingCity).val(); $(#Select1).selectedIndex = 0; //This is not working either but I'll figure this part out later. $(#msdeMailingZip).val(); } }); //end click for Mailing Address info }); //end main function If ANYONE could help me I would appreciate it SOOO MUCH! This is driving me nuts. :-P p.s. Using Visual Studio 2005 with ASP.Net 2 dot 0 thanks, milli
[jQuery] Spam Plugin
I have a feed of new jQuery plugins that I like to check daily to see what great things are created. I saw this one today - http://plugins.jquery.com/project/n-contextmenu. Interested, I went to the demo, and I got like 5 pop-ups, redirected to a new site and another 3 pop-ups. Anyway to remove from the list? Regards, Seth
[jQuery] Re: attempting to replace img src
Here is a hover function. Same concept though. $(#solution_list ul li a).hover(function () { img_src = $(this).attr(id); $(#change_img).attr({src: images/ + img_src + .jpg}); }, function () { img_src = ; }); On Apr 9, 11:19 am, Dan Hudson [EMAIL PROTECTED] wrote: I would like to replace a link image with another image based on the location of the page in the site structure. Take for example this link - - a class=apply href=/apply/ img src=/images/sitewide/top_nav_apply.gif //a If some one clicks this link they would be onwww.example.com/apply/ and I would want the image at the top to be replaced with a class=apply href=/apply/ img src=/images/sitewide/ top_nav_on_apply.gif //a. I can get the directory from window.location() but do not know if jQuery has a 'replace' function. Thanks, Dan
[jQuery] Re: Spam Plugin
Weird, I just checked it and it works. Odd. On Apr 9, 12:30 pm, Bil Corry [EMAIL PROTECTED] wrote: Seth - TA wrote on 4/9/2008 9:46 AM: I have a feed of new jQuery plugins that I like to check daily to see what great things are created. I saw this one today - http://plugins.jquery.com/project/n-contextmenu. Interested, I went to the demo, and I got like 5 pop-ups, redirected to a new site and another 3 pop-ups. Anyway to remove from the list? It worked fine for me. - Bil
[jQuery] [tabs] Using jQuery inside tabs
I have created a page that calls $tabs.tabs(add, this.href, title); Where this.href is the link I am opening as a remote tab. This works and the tab is added with the correct page showing, however, any and all jQuery which is in the remote page called does not work. I noticed by looking at the generated code that the tab only has the pages body and has stripped all header information. So, in a thought of working around this, I added all the jQuery to the page creating the tabs. This did not work either. I would think you would be able to have jQuery within a remote tab. The ability to do so is important to what I am working on. Any help is greatly appreciated. Thanks. Seth
[jQuery] Tabs - Rempote tabs with jQuery not working
I have a page creating new remote tabs on the fly, however, the remote tabs which have jQuery it them do not work. Is it possible to get the jQuery in them to work? If not, is there a solution that allows for tabs and for jQuery to be used in the tabs. Thanks. Seth
[jQuery] Re: Using jQuery inside tabs
So if I understand what you are saying, any jQuery which I want to use in the tabbed content must be in the parent page (the page which is creating the tabs)? I have tried to add the appropriate jQuery statements to the parent page and have still had no success. Could you provide me with some tips on how to go about it? Thank you. Seth On Feb 25, 4:30 pm, Klaus Hartl [EMAIL PROTECTED] wrote: On Feb 25, 8:48 pm, Seth - TA [EMAIL PROTECTED] wrote: I have created a page that calls $tabs.tabs(add, this.href, title); Where this.href is the link I am opening as a remote tab. This works and the tab is added with the correct page showing, however, any and all jQuery which is in the remote page called does not work. I noticed by looking at the generated code that the tab only has the pages body and has stripped all header information. So, in a thought of working around this, I added all the jQuery to the page creating the tabs. This did not work either. I would think you would be able to have jQuery within a remote tab. The ability to do so is important to what I am working on. Any help is greatly appreciated. Thanks. You can have that without any problems, although you have to meet some basic requirements. You have to understand that in the end you're loading HTML into a div of an *existing* document. Thus you cannot load complete documents with html, head and body tags. You need to use HTML fragments. You have to take care of that in the back-end, this is no functionality the plugin can provide. With each Ajax request jQuery sends an extra request header (X-Requested-With: XMLHttpRequest), which you can use to determine if the page was loaded via Ajax or if was a standard request. The reason why you see what you see as generated code, is that the browser's HTML parser strips away stuff you cannot put into an existing body of an HTML document. --Klaus
[jQuery] Re: Email validation broken in plugin v1.2?!
Jörn - Thanks for doing that. Is 1.2.1 out? I saw in the trunk that the validate.js says 1.2.1pre. Is it usable? Thanks. Seth On Jan 31, 6:27 pm, Jörn Zaefferer [EMAIL PROTECTED] wrote: Scott González schrieb: Please, don't do that. The modified regex you provided is way over simplified. I'll try to produce the regex you want, it should be as easy as making the domain label required in the host name. 1.2.1 will includeemailvalidation that requires the tld, providing the current implementation via additional methods. Same goes for the url validation. Jörn
[jQuery] Re: [validate] Email validation broken in plugin v1.2?!
Is there a way to change that? Or, what part of the email regex could I modify? I would think that most people would agree with me that @localhost wouldn't really be a valid email for production use. If I am wrong, then tell me, however, could you point me in the right direction to not allow a valid email without a .com, .net, etc, etc. Thanks. Regards, Seth On Jan 28, 3:10 pm, Jörn Zaefferer [EMAIL PROTECTED] wrote: Yuval schrieb: Thisemail [EMAIL PROTECTED] validates perfectly on v1.2. No .com nothing... Is it broken or is it done on purpose? I tried it on my site AND on the remember-the-milk demo... Nope. Its perfectly valid, just as something like [EMAIL PROTECTED] is valid. Jörn
[jQuery] jQuery.getScript() way to test if the script has already been downloaded?
Hi, Is there a way to see if a script has already been downloaded before i 'download' it again? i.e. i have this: $(document).ready(function(){ $(#editor).click(function(){ $.getScript(/fckeditor/fckeditor.js, function(){ $.rteditor(body,{ buttons: { Cancel: false, Submit: true } }); }); }); }); what this does is download the .js file and then calls my rteditor obj. But i would like to be able to do a test: if user has downloaded /fckeditor/fckeditor.js, then call the rteditor obj. else getScript(...) and call rteditor so does anyone know how i would see if that script has been downloaded? thanks seth
[jQuery] Re: Patch for jCarousellite jQuery 1.2.1
Thanks for the patch. I still can't seem to get it working. Do you have a working example you could post? Thanks. Seth On Oct 10, 1:03 pm, Stosh [EMAIL PROTECTED] wrote: I haven't seen anyone post apatchforjCarouselliteyet, so if anyone is trying to get it to work with jQuery 1.2.0 the fixes are simple and you can use thepatchbelow. I've also posted thepatchon the author's blog. The issue seems to be limited (as best I can tell) to lt() and gt() instead of slice(). Anyhow, here it is, for those who need it - enjoy: --- Desktop/jquery.jcarousellite.js 2007-10-10 14:58:13.0 -0400 +++ Sites/higherthings.org-trunk/HTDB2/javascript/ jquery.jcarousellite.js 2007-10-10 14:56:51.0 -0400 @@ -227,7 +227,7 @@ var div = $(this), ul = $(ul, div), tLi = $(li, ul), tl = tLi.size(), v = o.visible; if(o.circular) { -ul.prepend(tLi.gt(tl- v-1).clone()).append(tLi.lt(v).clone()); +ul.prepend( tLi.slice(tl- v-1).clone() ).append( tLi.slice(0,v).clone() ); o.start += v; } @@ -289,7 +289,7 @@ }, o.auto+o.speed); function vis() { -return li.gt(curr-1).lt(v); +return li.slice(curr-1).slice(0,v); }; function go(to) {
[jQuery] n2menu Mouseout Function
Has anyone had any luck implementing a onmouseout function with n2menu. I looked at the JS file and saw a function that delt with onmoueout but it obviously does not do what I think it does. What I am trying to describe is when the user mouseovers the menu selection it expands like it does, but when they mouseout no matter where they go (another menu selection, some other location on the screen) the expanded menu is hidden. Any thoughts?? Thanks. Regards, Seth