[jQuery] [validate] Does the validation plugin support required hidden inputs?
Hi, does the validation plugin support required hidden inputs? I have two input fields: field1 (text) and field2 (hidden). When i change the text od field1 a js-function is called and the value of the hidden field2 is changed (or not if the text in field1 is the wrong one). In jquery.validate i have set a rule for field2 (required). When i validate the form and field2 is empty it shows me an error message - that's good! When i change the field1 text (right one now), the field2- value is set but the
[jQuery] div select and change it's css
Hey guys, Wondered if anyone could point me i the right direction setting up an effect. Lets say I have many divs all laid out like so... <div id="section" class="section1"> Stuff </div> <div id="section" class="section2"> Stuff </div> <div id="section" class="section3"> Stuff </div> <div id="section" class="section4"> Stuff </div> <div id="section" class="section5"> Stuff </div> I want to be able to click inside a div above and change it's css style. BUT, change all the others back to the default.
XML tag name mismatch (expected link)
I'm stucked Here is my html http://www.paste.lt/paste/73249ad0a3743 ... e186618dc3 And I don't understand why jquery drops error XML tag name mismatch (expected link) in </head>\n
Getting $.load to add html to dom?
According to the JQuery docs, using .load you can add HTML to the dom, and be able to manipulate it via your Jquery script. However, in my load call; I cannot get Jquery to recognise any clicks from any input buttons my very basic HTML form. So, in summary what I want is; 1. I click on link, it grabs the html and dumps it into the div 2. I click on any input form within my div and JQuery recongises it, and allows me to do things (events, animations, etc). <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML
[jQuery] jQuery Validation Plugin
Hello, Has anybody use the jQuery Validation plugin with Ruby on Rails. I am having trouble with it. It seems only function when the form use the get action, but not with post. Thanks Juanma Cervera
[jQuery] [tooltip] Looping and variable tooltip setup
Greetings, After evaluating several different javascript tooltip libraries I've settled on the jQuery 'Tooltip' plug-in, however I'm having one minor issue getting something working. I'm trying to setup a series of pairs of tooltip triggers/bodies using a generic naming system so that it's easily enable through CGI scripts. To test I have two sets of triggers/bodies that look like this: <table> <tr> <td> <div id="tt0">Item 1</div> <div id="tb0" class="tb">Item 1's Tooltip</div> </td> <td> <div id="tt1">Item
[jQuery] Finding a matching class to a variable
Hi there, Here is my conundrum, im trying select a div whos class matches that of a variable ($i) so that I can then apply an effect to it. The div actually has two classes attached to it but only 1 matches the variable (if that makes sense). I've tried such things as $ ("div[class*=$i]") amongst other things but haven't had any luck. I'm still pretty new to jQuery but managing to get my head around the basics at least. Any help/pointers would be greatly appreciated. Philip
[jQuery] Problems in the overlay created by SimpleModal in IE6/7
Hi, I don't know how many of you have used or use SimpleModal to create modal dialogs but I'm having a little issue that's happening in IE6/7. It works fine in Firefox and I don't see any reason to not work on IE. Maye you guys can help me find a workaround. I've created a sample here: http://nazgulled.clok.info/simplemodal/ The problem is in the overlay <div> create by SimpleModal (I think), you can easily see the problem in IE6/7 if you compare it to Firefox. I've downloaded all the samples on
[jQuery] trying to parse XML
hey folks, could you look at this site: http://craniumdesigns.com/new/ and tell me why my xml isnt parsing on the portfolio area? i'm just trying to have SOME sort of output. once it works i want to generate all the portfolio images/info as "li" tags. the code is in the top of index.html for easy viewing. i'm very new to jquery and not really sure what i'm doing wrong.
[jQuery] preventDefault() not working in FF?
does anyone know why the preventDefault() would work fine in IE but not in Firefox? I tired placing it elsewhere and putting it in multiple plaves - no luck... Thanks for any pointers! isMouseDown = false; $('#dragger').mousedown(function(e){ isMouseDown = true; $(document).mousemove(function(e){ e.preventDefault(); // this bit for some reason is not taken seriously by Firefox if(isMouseDown == true){ // move things... } }); }).mouseup(function(e){ isMouseDown
[jQuery] Div Changer Using Hide And Show
I created this script to hide and show divs on a web page I am working on. It is working properly as far as the effects on the page go. I was just wondering if there is any way I can clean it up or make it simpler. Thanks. $(document).ready(function(){ //THIS HIDES ALL LISTED DIVS ON LOADING OF PAGE $('div.blackbook').hide(); $('div.canvas').hide(); $('div.pencil').hide(); $('div.murals').hide(); $('div.shows').hide(); $('div.tattoos').hide(); $('div.miscellaneous').hide(); $('a#blackbook').click(function()
[jQuery] IE problems with prepend since 1.2.3?
IE6 and IE7 since upgrading to jQuery 1.2.3 is targeting line 264 in the jquery.js (uncompressed) with the error message, "Unexpected call to method or property access." Here's the bit in jQuery it's referencing: prepend: function() { return this.domManip(arguments, true, true, function(elem){ if (this.nodeType == 1) this.insertBefore( elem, this.firstChild ); }); }, Specifically line 264 is claimed to be the culprit: " this.insertBefore( elem, this.firstChild
[jQuery] jQuery design pattern for dom.ready snippets
Hi there, I am going to be implementing jQuery on a very large enterprise level website, and have a few questions with regards to some best-practices for managing scripts. Where is the best place to include all of the initialization code for plugins? I'd like to keep everything external, but since the site is so large, I can't put all of the dom.ready initilizers inside of one big .js file (like jquery.com). I need to keep things split up for specific sections of the site, and if a plugin is only
[jQuery] autocomplete help - make another ajax call when results picked?
I'm using Jorn's Autocomplete plugin and am successfully using it to return a list of users along with a user_ID. What I'd like to do now is when the user selects a person from the autocomplete list - via Ajax take that user_ID, populate a table in my database and return another value . Right now I have: $("#personIDdisplay").result(function(event, data, formatted) { if (data) $('#personID').val(data[1]); }); This populates a hidden field (personID) with the value returned via autocomplete.
[jQuery] jqModal using jqmShow instead of trigger gives problems
Hi I use the following function to open modal windows by passing the correspondingly ID & html url . function jqmWindow(div_id , page){ $('div_id).jqm({ //trigger: '#edit', ajax: page, target: false, modal: true, /* FORCE FOCUS */ onHide: function(h) { h.o.remove(); // remove overlay h.w.fadeOut(444); // hide window }, overlay: 10 }).jqmShow(); } I use .jqmShow to open the window instead of the trigger which I have commented out. The modal window opens
[jQuery] SuperFish - Override/append onHover?
I have Superfish 1.4.1 implemented here: http://arraybeta.magiclamp.net I am using a bit of jQuery to swap the far left and right backgrounds of the dropdown navigation to the rounded corner graphics. I need to be able to change the Hover state background as well. When I attach a function for doing this to hover(), it doesn't work. I think this is because SuperFish is overriding it. Any suggestions? I've tried chaining in my hover() with the Superfish call, or adding it to the Initialize parameter
[jQuery] [treeview] Ajax loaded nodes
I'm using jQuery 1.2.2, and treeview 1.4, and I've read as much as I could find on treeview. I can't seem to find, however, a demo on loading specific nodes with dynamic data when they are expanded. The async demo doesn't necessarily show how to do that, either, unless it's a full tree load. Am I missing something?
[jQuery] Break out of a for loop.
Hi, I am this script: for (var i=0; i < 6; i++) { $('a#chan'+i).click(function(){ for (var j=0; j<6; j++) { $('a#chan'+j).removeClass("chSel"); } $(this).addClass ("chSel"); channel = i; }); } and I'm trying to get the value of "i" when the link is clicked and store it in the variable channel. But when I do it, it stores 6 (the max number) in it. I tried using continue; I tried using i = 7 (to break the loop, it works in Java, I guess not
[jQuery] How to keep text from being highlighted when I'm handling the mouse events
I have some graphics I'm moving around indirectly with the mouse. When I happen to drag across text as I move the mouse, that text gets highlighted as a selection. How do I prevent the browser's text-selection as I move? Is there an easy solution, or do I need to dig into the UI draggables to work it out? (No, I can't use draggables--I'm not dragging anything.) Right now I'm handling over, out, down, and up.
[jQuery] Refresh div
Hoping to get a little help since I know very little jquery and ajax. I am developing a site in drupal where I have an ad on just about every page and it currently refreshes on every page load with a different ad. I need the ad to reload every 5 seconds. I am sure this is possible with jquery. I have been trying to find a tut to do this but have been unsuccessful, hopefully someone can help me out with this. The currently exported code on the pages is this: <div class='view view-global-header-ad'><div
[jQuery] xml webservice & callback & document.domain
I am trying to call a .net webservice with a get and no parameters. It is returning a simple xml doc with a single string element like this: <?xml version="1.0" encoding="utf-8"?> <string xmlns="http://www.mysite.com/"> blahblah </string> </xml> here is the jquery code I am using: $.ajax({ type:"GET", dataType: "xml", url:$link.attr('href'), contentType: "application/x-www-form-urlencoded", data: {useSsl:useSsl}, success: function(data){ var res = $('string',data).text(); $('#' + dest).html(res);
[jQuery] Tool tip advice
Hey all, the design team here has a grid/table layout, with each image in a cell causing a tooltip style popup. Ok so, no worried so far, BUT, for the last column, the tool tip flips it's orientation so it doesn't display over the page border. So image a 2x4 table, which images in each cell. Each image will have the mouse over event to trigger the tooltip. The tool tip itself has graphical borders with live text, just to make things easier. I'm going to make the assumption that the tooltip doesn't
[jQuery] I am looking for the datagrid which supports row/column merging and JSON
Hi All, I am looking for the good js datagrid which supports AJAX column sorting, row/column merging (rowspan/colspan), and JSON. Does anyone know where I can find such datagrid? Thanks, Channa
[jQuery] submit
I would like to have a
[jQuery] How could I pass an object into an eval statement
For instance, say a function is passed an object and that function is supposed to set an event to fire on a timeout, how would I do it? Even more complicated, how would I do it if I needed to perform the action on a sub-selection of the object passed? If I wanted to do this and I have just id's, then I could do the following: setTimeout("$(#'" + obj.id + " #message').fadeOut('slow', function () {$(this).remove();});", 5000); But what if the object passed doesn't have an id?
[jQuery] What's the meaning of "underlying elements" in focus()
Hey all ! I read " This causes all of the functions that have been bound to the focus event to be executed. Note that this does not execute the focus method of the underlying elements." in focus() of jQuery's document. But I couldn't catch the meaning of "underlying elements". Anyone may tell me which element is "underlying elements"? Thanks.
[jQuery] jQuery Form Plugin help
hi i'm trying to use the jQuery Form Plugin from http://www.malsup.com/jquery/form/ it's apparently easy to use but at my first try i can't make anything out of it!! this is the page i'm working on http://www.eco-way.it/projects-and-communication/extra/curriculum.php In my comuni.js i use $('#formCurriculum').submit(function() { $(this).ajaxSubmit(); return false; }); pretty simple but when i submit nothing shows in firebug and less with my php file. Any help out there? thanks vitto
[jQuery] jquery and math functions
Is there something special that needs to be done to values selected with jQuery so math functions can work on them? parseInt or something? I am not sure, but all my calculations are getting NaN. For example, I have the following function that always produces NaN: var startmin = $("#timestartmin"); var stopmin = $("#timestopmin"); var totaltime = startmin - stopmin; $("#totaltime").val(totaltime); }<br clear="all"> I've tried adding .val to the first
[jQuery] A function I wrote that you might find useful (populateFieldsWithJson)
I needed a simple method to populate field names with corresponding data from a database (for an "edit entry" interface). So I wrote the following function, which accepts 3 arguments: the ajax get request url, the form id, and new text for the form's submit button, if required: function populateFieldsWithJson(url, form, submit_text) { $.ajax({ type: "GET", url: url, dataType: "json", success: function(json) { $("#"+form+" input[type=text]").each(function()
[jQuery] Loading html does not add it to the DOM
I have a simple ajax load which brings in an external form - at the moment it's just a simple input box with 2 buttons, a "save" and "cancel", however whenever I press any input button within the called form JQuery just doesn't seem to recognise it. Loading my external HTML form, and pressing on its input buttons should produce an alert message, but instead just goes to the page. How do I make jQuery recognise the form, add it to the DOM and work with it? [code] <!DOCTYPE html PUBLIC "-//W3C//DTD
[jQuery] $_FILES and $.ajax function
hi i'm trying to send a file uploaded thourgh a form to a php file with $.ajax function. In my php file i can grab the value of the file type input only if i use tha $_POST method; if i use $_FILES nothing happens. Does anyone know whether jquery $.ajax function supports this type of data in the data otpion? How do i do this? I tried with processData: false with no use.. Thanks Vitto
[jQuery] blockUI: moving the message that blocks an element to the top
This shows the test centered in the div. I really need to get it placed at the top. $('#test').block("Loading, please wait..."); I tried overriding several defaults, but did not have any luck. Thanks in advance, -Alan
[jQuery] Form submission without reloading modal window
Hello, I am looking for a solution to submit a form and instead of refreshing the whole page just refresh the contents of a div tag. Can anyone point me in the right direction? I tried jframes, but I can't figure out how to get the form to not open a new window. Thanks in advance! Let me know if more information is needed. -- ~Steve http://goodcf.instantspot.com/blog
[jQuery] jQuery in IE6
Hi, any reason why this snippet does not work in IE6? (whatever the last minor version was). $("#QuickLinksSelect").show(); I'm using the latest stable release of jQuery and it works in the latest IE7, Firefox, Opera flavours. In fact, jQuery doesn't seem to be working full stop in IE6... Can someone enlighten me? Thanks, Richard
[jQuery] Cluetip with trigger
i want to use triger in cluetip onShow ...but unable to tigger event . my code is $("#aprice_down").cluetip( { local:false, activation:'click', sticky:true, width:'610px', height:'420px', positionBy:'mouse', closePosition: 'title', onShow:function() { $ ("#txt_preseller_percent").trigger("blur"); }, closeText:'<img src="'+this_domain+'/images/common/cross.jpg"
[jQuery] jQuery + plugins compression
We've been using Include to make compressing and including scripts really easy. With jQuery, this would really simplify plugin loading and compression. Users could download their plugins, turn on compress mode, and automatically create one compressed script from their included scripts, without needing a server-side script. Check it out at http://javascriptmvc.com/include. I hope you find it as useful as we have. - Brian
[jQuery] ajaxfileuploads: how to add more fields?
Hi, I'm working with the ajax file upload script from here -- http://www.phpletter.com/Demo/AjaxFileUpload-Demo/. What I'm wanting to know is how do I add an additional hidden field into my form and have it parsed on the server side? If you visit here http://elearningrd.info/portal/ajaxfileupload.php you'll see I have added a hidden field "isbn". But something happens when the form is parsed and submitted because on the server end (doajaxupload.php), the parameter "isbn" is not submitted. Any help
[jQuery] Tutorial here
<div style="text-align: center;"><font style="color: rgb(255, 0, 0); font-weight: bold;" size="4"><span style="font-family: verdana;">PLEASE PASS THIS MAIL TO YOUR FRIENDS </span></font></div> <div style="text-align: center;"><a href="http://systemkeeper.blogspot.com/"><font style="color: rgb(204, 0, 0);" size="6"><span style="font-family: verdana;">http://systemkeeper.blogspot.com</span></font></a> </div> <h3 class="post-title"> <a href="http://systemkeeper.blogspot.com/2008/02/pc-booster-2008.html">PC
[jQuery] Request parameters from dynamically added html element are missing on the server side
Hi there, I tried to create input element dynamically using jQuery, in form of text field and file upload. But somehow when I dumped all my request parameters on the server side, I never received these parameters even though I saw the the input elements were created on HTML form. Could someone give me a hint ? I use jsp and java on the server side, jQuery 1.1.4, and jQuery Multiple File Upload Plugin v1.26. This is the snippet of the code : <script src="<%= themeDisplay.getPathJavaScript() %>/jquery/jquery.js"
[jQuery] find all cells with only text as children
I have a series of nested tables and i want to addClass() to the cells that are holding only text ( not ones that are holding more tables ). Any ideas on how to select those?
Next Page