Trouble with attr() and IE7, and onclick...
Ok, So my code is running fine under FF2, no problems. However, IE7 is a different story. The only thing that seems to be working under IE7 in all of my jQuery code is this... Now... all of this following code works under FF2 PERFECTLY... and I feel like its something simple I am doing wrong under IE7 with this code: $(document).ready(function() { $("form#add_comment").submit(function(){ //function for ajax comment system var body = $("#body").val(); var maxCharacters = 500; if(body == "") { //if
Adding load to ajax POST function
I am using the ajax POST from the examples on the jQuery site. $.ajax({ type: "POST", url: "some.php", data: "name=John&location=Boston", success: function(html){ $("#results").append(html); } }); I would like to add the "load" option onto this, so that I filter the server response, and only return a specific ID: $("#results").load("test.html #testing2"); How would I use these 2 together, to achieve what I am needing?
[jQuery] Question: Selecting all the links in div
Selecting all the links in div.. I know it should be really simple, but for some reason I can't make it work.. I work with asp.net and try to run something like this: $(document).ready(function(){ $('#UserSubPanel > a').addClass('sideLink'); }); but it doesn't work. The links are LinkButtons but rendered as <a> Can someone please help me with this? Thanks in advance.
[jQuery] Flexigrid Column Width
I have been using Flexigrid plugin for some time and really liking it. Congratulations Paulo for the excellent work. I am facing one problem though. If I specify the column size in colModel the grid shows up nicely. However, in case I leave the column size to auto, the column width for the header row and the data rows do not match. Has somebody else faced the similar problem? Am I doing something wrong? My code is at http://tinyurl.com/5dblm8. Thanks Sanjiv
Checkbox validation and Adding/ laoding complete content
Hi, I want to validate checkbox. suppose if checkbox "1" is selected then only sub checkboxes must be alowed to select. Once it is done. User should be able to add the whole checkbox content as many times as he wants in the same page. Can anyone plz help me out in this.
[jQuery] Function Running in the Background???
I know I've read about this somewhere and I should have bookmarked it, but what is the process for having a function running in the background so that if at any point something should change on the page (i.e. a <div> is now shown) that the function acts on it (such as adding a class to that div). For example, say you have a function where one clicks on some text and now they have the ability to edit the text inline (and the subsequent changes are made via AJAX) because it changes the text they've
[jQuery] Why is form submit action not being invoked?
Hi, When I submit the contact form http://elearningrd.info/jrl/contact.php I would like to validate the email address and possibly check non- empty values for the other fields. I'm using this code to try and check things upon form submission: $(document).ready(function() { $('#msgForm').submit(function() { var email = $('#Email').val(); if (!validateForm(email)) { alert("Invalid email format."); return false; } return true; }); }); but the form validation
[jQuery] Make Readonly input text
Hi, I'm newbie here there is two input form, checkbox and text. i want if I checked the chekbox, the input text will become readonly, and if i checked again, the input text back to normal. I'm trying make this function function makeReadOnly(a) { if ($("a:contains('readonly')")) { $("readonly = 'readonly'").replaceWith(" "); } else { $(a).append("readonly = 'readonly'"); } } but its not working. firebug says that replaceWith
[jQuery] TableSorter 2.0 - jQuery.noConflict() breaks Tablesorter appendCache in Firefox
Hi, I'm using TableSorter 2.0 with the pager plugin, and then appending table rows. This works fine when run without prototype.js, when run with prototype.js (but jQuery then breaks our prototype calls), and always works in IE 6. We had to add jQuery.noConflict() to the top of our script, and then change all of our $ references to jQuery. Adding function($) to our document.ready did nothing in particular to solve this after we changed our references. However in Firefox 2, I get an error on line 681
[jQuery] [validate] value is trimmed before getting to validation function
Hi, i'm developing a costum validation method for a password field, the password must not contain spaces. I thought my method worked fine until during a test i put a space at the end of the password, my method returned that the password was correct, and i noticed that the problem was that the value of the field is trimmed before it is sent to the validation method. And I thought it might be a good idea not to trim the values before they are sent to the validation methods, what do you think?
[jQuery] Help with fadeIn / fadeOut
Hi, If you look at this page http://elearningrd.info/jrl/policies.php and click on each of the links next to the arrow graphics, you'll see the center text switches out. However, it is choppy. It seems that as one div is fading out, the other is fading in at the same time. This is the code I'm using function swapDivs(oldDivId, newDivId) { $("#" + oldDivId).fadeOut("slow"); $("#" + newDivId).fadeIn("slow"); } // swapDivs How can I make one div fade in only after the other div
[jQuery] Cycle plugin with many image tabs
I'm using the cycle plugin and have set it up to automagically create the tabs for changing to the next image. http://www.actionhobby.ca/index.php?q=/node/524 But, this particular page has 32 images (possibly more to come). The tabs are generated in a single row, and do not wrap at the edge of the screen. So I'm looking for ideas how to resolve this. (works great on a 1650x1024 page, not so great at smaller resolutions) Can this be handled via CSS? Or am I going to be tweaking code? Thanks. Shawn
[jQuery] Im having trouble with selectors
Im new to using jquery so forgive my question that is probably so simple. Im trying to select the parent of element that contains a hidden element. In my case I need to grab the dt that contains hidden dd's. this is what I have but is not working: $('dt').has('dd:hidden').addClass('menu_bg').trigger('click'); Ive also tried: $('dd:hidden:parent').addClass('menu_bg').trigger('click'); and Ive tried many other variations but cant seem to get it. What am I doing wrong? Thanks in advance! Cheers, Clint
[jQuery] flexgrid plugin
I'm looking for the flexgrid plugin that used to live at http://webplicity.net/flexigrid/. The site is down, and I really want to use it! Anyone know of a backup site or have an archive to send me?
[jQuery] searching css id
Hi, What I'm trying to is that when there is certain css id appears in area. then it should hide right sidebar and change the width of center area. if($('#specialSection')) { $('#sidebar-right').hide(); $('#center').css('width','760px'); } But this code is not working properly. It hides right sidebar on every page.
Understanding the procedure
Hi, This problem regards my previous thread as well. But as I think this is a common question to understand the generall procedure I opened a new topic. I'm using jqModal but this problem could raise also in other tasks I guess. Please correct me if I'm wrong here. A layer is opened via a link and put into DOM dynamically. To close this layer I have written my own func. Unfortunately this func gets no reaction on the designated link. No matter if I test it with hover or something else, no action
[jQuery] Info about tablesorting plugin
Hi, how can I 'select' the sorting 'factor'? For example: I have a cell that contains this markup:
[jQuery] Autocomplete multiple entries
I know this is a simple question but ... In the Autocomplete multiple cities example (http://dev.jquery.com/view/trunk/plugins/ autocomplete/) how do you send the final set of chosen entries to the server ie. all the values in the input box when "Get Value" is clicked? Here is the code from the example: $().ready(function() { function findValueCallback(event, data, formatted) { $("<li>").html( !data ? "No match!" : "Selected: " + formatted).appendTo("#result"); } function formatItem(row)
[jQuery] [Tooltip] How to implement an fadeIn and fadeout?
Hi! I use the tooltip from here: http://bassistance.de/jquery-plugins/jquery-plugin-tooltip/ I use Jquery 1.2.3 and wish to know how to implement an fadeIn and fadeOut into it. I use this code: <script type="text/javascript"> //<![CDATA[ $(function() { $('.specials-title').tooltip({ track: true, delay: 0, showURL: false, showBody: " - ", extraClass: "specials-title", fixPNG: true, left: -92, top: -110 }); }); //]]> </script>
[jQuery] Safari won't load jquery.js
I'm looking into porting my current ad-hoc javascript solution to jQuery. I added a little bit of jQuery to the project and it works just fine on IE, Firefox, and Opera, but when I tried it on Safari the file seems to not load. When I look into the web inspector jquery.js has a long gray bar next to it. I tried adding all of the existing javascript files and jQuery into a test page, with a little jQuery script on it, and it worked fine, so it doesn't seem to be a javascript conflict. The project
[jQuery] [treeview] Mix of sync and asynced tree.
Hi, i am using Jörns TreeView Plugin (http://bassistance.de/jquery-plugins/ jquery-plugin-treeview/). I try to use the async version of it, because i need lazy loading (more than 9000 elements) but i want to render the starting <ul> with the following elements: root + folder one + folder two - current folder (open) - element one - element two - element three (current) + folder fourth So, when i click on one of the other folders, i set a JSON call, but not before. The current implementation is, that
[jQuery] New and Learning JQuery
I been going through JQuery to add it to my knowledge base so I can integrate some of its functionality to our new web 2.0 UI for our applications which use to reside in RPG on IBM system i. I have created is a "zebra" list that I want to click on the list to help build the next page. There is a hidden element in the <tr> that is highlighted that I need the value of to build the URL for the next page. Im trying to use a this() that is then chained to get the value of that element, but Im having no
[jQuery] [Validation]How to make two field check output one message?
Hi, Some question on the config of validation plugins. Suppose there are #fromDate and #toDate fields (using ui.datepicker). I have added these custom rules jQuery.validator.addMethod("afterFromDate" ,function(value, element, targetId){ var fromDate = $("#"+targetId).datepicker("getDate"); var toDate = $(element).datepicker("getDate"); if(toDate && fromDate && fromDate > toDate){ return false; } return
[jQuery] [Validation] Validate differently based on different action
Hi all, I think this is a rather rare situation but it happens in our apps all the time. The layout is like --- Search Result---- <table> .... <tr> [checkbox] status [input text] [input text] [textarea] </tr> .... </table> [Delete button] [Reject Button] [Update Button] There are different case of validation: - when press delete button, validate if checkbox is checked only - when press reject button, validate if checkbox is checked and status is not rejected - when press update button, validate that
[jQuery] Getting value of input type="file"
I am using ajax to post a form that has an image upload input field. I tried getting the value as I do with other inputs, but it does not seem to work, and returns undefined: var imageUpload = $("#image_0").val(); <input type="file" name="image_0" class="sq-form-field" /> Am I missing something here?
[jQuery] SOT: Using iframe to load in a Flash movie with dynamic height
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META http-equiv=Content-Type content="text/html; charset=us-ascii"> <META content="MSHTML 6.00.6000.16640" name=GENERATOR></HEAD> <BODY> <DIV><FONT face=Arial size=2><SPAN class=981452416-18042008>I've been dealing with this irritating issue on and off now for about a month. I'm finally going to ask for help.</SPAN></FONT></DIV> <DIV><FONT face=Arial size=2></FONT> </DIV> <DIV><SPAN class=981452416-18042008><FONT face=Arial
[jQuery] Help Needed Passing Checkbox Values to SELECT Element
I'm not the world's greatest Jquery coder so I'm hoping someone can help me with this. I have a client that needs me to pass the VALUES of certain items checked in one form, to a select box in another form. I've been successful at doing this between two select elements, but can't seem to get it to work between checkboxes and a select element. Here's the code I have thus far: $('#saveclose').click(function() { return !$('form#runitsform input[@name="runits"]:checked').appendTo('form#command
Removing / changing inline CSS styling using JQuery?
Hi, I have the code <div style="margin-top: 20px" class="myheader"> which I have no control over, all I have control over is the CSS file (the class .myheader). Is it possible using Jquery to remove the inline CSS style? Thanks in advance
Attaching a click event to an appended item
I just started working with jQuery not too long ago, and having a hard time figuring out how to attach a click event to something that you just appended. I want to convert the below into 1 chained thing: /*start*/ $("div#new_responsea,div#new_responseb,div#new_responsec,div#new_responsed,div#new_responsee,div#new_responsef,div#new_responseag").each( function() { id = $(this).attr('id') + "_check"; oldId = $(this).attr('id'); strAppend = "<input type=checkbox id=" + id + " name=" + id + " oldid="
[jQuery] bug tracker error
anyone getting this error when trying to open a bug report? http://dev.jquery.com/report/19 Trac detected an internal error: IntegrityError: (1062, "Duplicate entry '690bd2f84578796-0-0' for key 1")
[jQuery] BBC.co.uk style image switcher
Hi there, hope you can help. I'm looking for some javascript to create the same sort of effect the bbc.co.uk site has, when you roll over one of the news articles, the image changes. Is there anything in jquery js that does this? I'm a complete newbie to js i'm not sure where to start looking. Or, and forgive me if this is a very stupid question, but i can see that the code they have used is <script type="text/javascript"> var newsBoxImages = [ { 'alt' : "Harvesting switchgrass
[jQuery] AJAX Cancel? (sorry, hit post before I was done)
Hi, I have an AJAX GET going out on KeyUp on a text box. I want to Cancel the request or ignore the response if a new AJAX request has gone out since the first one began. In other words, I only want to process the AJAX request when the user is "done" entering. a la GMail address lookup. What's the best way to do this? Jamie
[jQuery] [validate] IE7 + google toolbar issues, solution.
Hi, I know a few people have had trouble with google toolbar in ie7 overwriting label values, just thought I'd share this: http://www.dream-revolver.com/2008/04/22/google-toolbar-overwriting-labels-when-using-jquerys-validate-plugin/
[jQuery] Focus First 'visible' field
Hi all, For focusing first input text field, the usual solution is $ (':text:visible:enabled:eq(0)').focus(). However, when these fields are in an ':hidden' parent (not 'visible' by our eyes), it won't work. Currently I tried to solve this by: $(":text:visible:enabled").filter(function(){ return $(this).parents(":hidden").size()==0; }).slice(0,1).focus(); I have setup a test page for this: http://www.seezone.net/dev/focusField.html Try to toggle different parent to and click 'focus'. It should
[jQuery] [Announce] jMaps3 RC1 Released
Hey folks, Today I am happy to announce that jMaps version 3 has been released today. This version is classed as a release candidate as I have not confirmed all bugs have been fixed, and some internals might still change slightly, however the API itself has stabilised. The plugin now has a proper page with API documentation and demos, and is available at http://jmaps.digitalspaghetti.me.uk/ The plugin also now more modular, so you can write your own macros under the $.jmap namespace and call them
[jQuery] :o
This is perfect!! Thanks Karl ^_^
[jQuery] [ TOOLTIP ] - Can I PULL IN the CONTENTS of the URL into the tooltip itself?
One of the tooltip-demos shows this embedded HTML, but somehow this is much more sophisticated than what I need. Is there a way how I can make the tooltip show the CONTENT of the url in the tooltip. For example, if the link points to x.html, and x.html contains "Hello World", I want to see Hello World in the tooltip rather than x.html. Is this possible with the JQuery Tooltip? I imagine it must be possible because this embedded HTML example seems more sophisticated than what I'm trying to do, but
[jQuery] Adding load to ajax POST function
I am using the ajax POST from the examples on the jQuery site. $.ajax({ type: "POST", url: "some.php", data: "name=John&location=Boston", success: function(html){ $("#results").append(html); } }); I would like to add the "load" option onto this, so that I filter the server response, and only return a specific ID: $("#results").load("test.html #testing2"); How would I use these 2 together, to achieve what I am needing?
[jQuery] Confused...is JQuery and EXT still being integrated together?
Feb 07 was an announcement that JQuery and EXT were going to integrate together. But it appears noting is happening? Is this what the ui.jquery.com is? Of have each separated... Thanks...
[jQuery] post a list of values from a function
using $.post("ajaxProc.asp", { cmd:'ups', mystring} "mystring" is a list of values created by a function that returns a result like city:phoenix,state:arizona, etc. I want to add it to the post but I get back an error saying it's missing the colon . my guess is that it thinks "mystring" is the first part of the named pair. I know "mystring" is holding the correct information because I can view it from the alert. how can I place "mystring" into the post so it gets processed correctly for the values
Next Page