How to identify which submit button was clicked: SOLVED
Hi I am tearing my hair out over this. I am in the process of 'ajaxifying' a form which has four different submit buttons, each of which has a different value and triggers a different set of logic on the controlling script which receives the form's input. This was fine when I was simply using straight php as I can simply write: if ($_POST[submit] == "blah") { //do stuff } However I now see that the one element of the $_POST array the JQuery form plug-in doesn't include is the value of the submit
Multiple sets of tabs on one page
Hey all, There's a few ways that I could pull off this kind of effect... But I have used the jUI Tabs plugin - www.webhero.co.uk/test The problem is, as you may find, that not all of the tabs work correctly! The first 2 or 3 do, but the last never does - and for what seems to be no reason! I want to keep this fading effect on open and closing, and I would also like the tabs to start off closed, but it doesn't seem to work. $('#1 > ul, #2 > ul, #3 > ul, #4 > ul').tabs({ selected: null }); // start
[jQuery] ajaxSubmit plugin question
I'm using the jQuery plugin located at the following URL. http://www.malsup.com/jquery/form/#code-samples The problem I'm having is with a submit button. I want to have the submit button disabled during the ajax call, and enabled once the call is finished. I want to use the options beforeSubmit and success to call these functions, however, I'm not sure exactly how this works. I want to call say toggleSubmit and pass through a value of true or false (depending on what callback option it's on). So
Draggable story book
I need to create a customizable story book. In the middle of the page I have a DIV that represents the book page. On the right side I have some characters, accessories and so on. I want to drag'n'drop the elements into the book page and then get the coordinates of each object dropped into this div since then I want to save these coordinates for printing the book. I also want if the user drag'n'drop the character outside the div move it to the original place. Do you know of something similar to what
[jQuery] .submit with ajax inside
In the code below It seems that if i uncomment the return true; at the bottom it seems to happen before the ajax call is complete.. is there anyway to force it to wait for the call or have the call back return true or false and have that be returned to the submit's function? $("form").bind("submit",function() { $.ajax({url: "", cache: false, type: "POST", dataType: "json", data: $("form").serializeArray(), success: function(data)
[jQuery] [treeview] hundreds of requests for images in IE6.
Hello, I am using the jQuery treeview plugin and am noticing that every time I expand and collapse nodes the browser is making hundreds of requests for the images associated with the tree. I notice it also happens on the treeview demo page. Does anyone have a workaround for this? Many Thanks. Darren
[jQuery] flashembed API not finding ExternalInterface Callback
I know I should just move on, because my old swfobject thisMovie/ makeCall functions work just fine, but I really want the flashembed API to work. I've wasted a lot of time just to have cleaner, more efficient code. function loadPage(content){ api = flashembed("content_div", { src:content, id:"content_swf", width:585, height:600, allowscriptaccess:"always", swliveconnect:"true" }); } this works: document["content_swf"]["xmlFromNet"]
[jQuery] X_REQUESTED_WITH ie6
Since JQuery auto sends "X_REQUESTED_WITH" i assumed it would probably work with most everything.. but it doesnt seem to be working with ie6... I tried changing the head name to a few different things but nothing seemed to work.. does anyone have any idea why this doesnt work or have any other ideas for a similar way to detect if ajax is making the call on the server side? i dont really want to use a QueryString variable because then that allows a person to just open that page up inside the browser..
[jQuery] Retrieve function signature from a list
I have a list of dynamically generated image hyperlinks that are displayed on a page as follows: <div class="imgBg"> <img id="imgProd" src="" alt=""/> </div> <div id="imgEnum"> <ul> <li><span class="sqr1" onmouseover="updImage('Images/aaa.01.jpg');">1</span></li> <li><span class="sqr1" onmouseover="updImage('Images/aaa.02.jpg');"> 2</span></li> ... <li><span..>N</span></li> </ul> </div> Problem: This scheme works fine when hovering
[jQuery] binding submit with ajax() inside
In the code below if i uncomment the return true; it will automatically submit the data instead of running the ajax.. is there anyway to get the $.ajax function to return the true or false value for the submit function? or have that if statement at the bottom wait for the $ajax to be done? $("form#register").bind("submit",function() { $.ajax({url: "registerajax", cache: false, type: "POST", dataType: "json", data: $("form#register").serializeArray(),
[jQuery] input textbox no typing but still check available
Hi, I have a input type=textbox in my page, this input have limit width(80), but inside could be a long string(> 80), now I use $("#myTextBox").attr("disabled", true); to disable it so end user can not type anyting in side, which works great. but I also like have end user put cursor inside and move cursor to check the hide part. this does not work well. How I can make this work? Thank you, Wes
[jQuery] trouble with fadeIn and fadeOut on a element in ie6 and ie7, works in firefox
Hello All, I'm working on a site here http://208.79.237.221/ On the home page I have an ordered list of icons to choose between five different pages. I'm using jQuery to add a hover image to the markup after each <a> element, and then fade in and fade out the hover image when on mouse hover. Here's the script: $("div#in-programs a").each(function(){ var iconHref=$(this).attr("href"); var iconClass=$(this).parent().attr("class"); var hoverSpan="<span class='"
[jQuery] Adding a privileged function to a class in a separate file.
Hello there, I am building a class in a namespace extending jQuery this way : ;(function($) { $.myNamespace = $.myNamespace || {}; $.extend($.myNamespace, { myClass: function() { this.myPrivilegedFunction = function() { return myVar; } var myVar = 42; } }); })(jQuery); Now I want to add myOtherPrivilegedFunction to myClass in a separate file. Every attempt so far failed... I just wonder if it's possible or if there is an alternative. Thanks for your help : )
css3 using jquery
Hi, I want to give shadow effect to a container by wrapping an image around it as border, using the border-image property (css3). Since most browsers don't support css3 as yet, is it possible to do so using jquery?. Thanks in advance.
[jQuery] AJAX Load posting script defined datas
I'm a jquery beginer. I want to use the load function in a special way, the datas should be defined by th sript, depending on which part of my form I'm posting. My code is the following : $(".form_param").change(function(){ var param_val = $(this).val(); var param_nom = $(this).attr("name"); $("#moniteur").load("session_maj.php", {param_nom: param_val}); }); The .form_param class is the class of the form elements (select, checkbox...), and I get
[jQuery] IE error on jquery braces {}
Anyone know why the following line throws an error in IE7 and works fine in FF3 and Opera9.5? The complete HTML and JS and be found here: http://veryheavy.org $("<span/>").attr({class:"tag", onclick:"javascript:showBookmarks(" + "\"" + i + "\"" + ");"}).text(i).appendTo("#leftcol"); IE seems to puke on the braces {} Any ideas?
[jQuery] clash in code? jQuery document ready and window.onload
hi, im new to jQuery and to programming in general so i hope this isnt a stupid question. A have an accordion which is animated to open and close when a user clicks a header div. The accordion holds a decent amount of content which takes some time load in ie (and only ie for some reason) before the javascript takes effect and closes the accordion to hide all the data inside them. Using the $(document).ready(function() I was able to have the page load with the accordion closed (content hidden but
[jQuery] select option name attribute
How do I retrieve the name attribute of a selected option using jquery. IE: <select name="textselector"> <option name="11">Text</option> <option name="12">Text 2</option> </select> In this example, I would be trying to get 12 when the "Text" option is selected. -- View this message in context: http://www.nabble.com/select-option-name-attribute-tp18124157s27240p18124157.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] jCarousel Lite and IE6/7
Hi all, I'm having problems getting jCarousel Lite working in IE6 & 7 http://www.gmarwaha.com/jquery/jcarousellite/ Firefox works fine, but the unordered list does not get any styling applied in IE There are several recent posts to the issues blog for the author that mention similar IE issues, but they have not had responses in the last month. http://gmarwaha.com/blog/?p=6 Has anyone else had issues with IE and found a fix? My markup is below: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
[jQuery] doctype breaks animate on ie6
Hi, after putting ie6 in strict mode it just "skips" animate. You just get the end state. any ideas?
[jQuery] Best way to detect between jQuery triggered event and actual browser-based event...
Just curious as to everyone's recommendations on detecting the difference between a jQuery created event object (i.e. $("#el").trigger("click")) and a real event object (i.e. create by the browser.) Right now I'm doing: if( !("ctrlKey" in e) ) I believe the ctrlKey should be sent by every browser when the event action occurs via a user's action, but just wanted to know if there's a better way. It would be really nice if jQuery would pass a key that indicates whether an event object is generated by
[jQuery] jqModal r12 release
Ladies and Gentleman, I have finally updated jqModal, and apologize for the ridiculous delay. I am also pleased to announce that the plugin page has been updated to include improved documentation. jqModal is a tiny general-purpose windowing / dialog / popup / modal / what-have-you plugin. The r12 release brings long-awaited jQuery 1.2.6 compatibility. This was a trivial fix. The issue was due to IE returning 0 for $.css('z-index') regardless if the attribute existed or not. Thanks go to Schabse Laks
[jQuery] Mirrored radio button select/disable problem
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><HTML><head><META content="text/html; charset=utf-8" http-equiv="Content-Type"> <META content="text/html; charset=utf-8" http-equiv=Content-Type> <META content="MSHTML 6.00.2900.2963" name=GENERATOR></head><BODY> <DIV STYLE="margin:0 0 20px 0;"> <DIV><SPAN class=678585313-01072008><FONT face="Trebuchet MS" size=2>Hi,</FONT></SPAN></DIV> <DIV><SPAN class=678585313-01072008><FONT face="Trebuchet MS" size=2>I've run out of brain power when
[jQuery] [autocomplete] Multiple Values, Update Hidden Field
Hello, I'm trying to to a message sending system. The message may have multiple destinations so i'm using the something similar to Multiple Birds (http://jquery.bassistance.de/autocomplete/demo/) When I add a new user it's id get added to the hidden field (with is correct). But if I delete a user from the autocomplete the id desn't get deleted from the hidden, is there anyway to do this? Is there any other type of autocomplete that allows this? With best regards, Luis Rodrigues
[jQuery] [jquery validate] Validating disabled inputs
Hi, I have a problem with disabled input when I try to validate them. I use class="required" but the validation plugin doesn´t detect when is empty. Any idea?
[jQuery] Using tabs - how do I get tabs to load on a nested page?
The tabs work fine on the first page, but I need a second group of tabs on the "by Season" tab. The code is there, but the tabs don't generate on document ready. front page: http://www.texas-asl.com/ladder/ladder.php by Seasons tab page: http://www.texas-asl.com/ladder/seasons.php
[jQuery] Google Analytics Cross domain link tracking: My pain and (hopefully) as nice solution
Hi, This is jQuery related so bear with me! I'm CCing someone who asked about this recently as I think this may help them. Apologies to you if this is out of turn :) I was recently asked by a client to implement cross domain link tracking. Fair enough, Google does this in their analytics system, however there are several limitations to this: 1. Their link tracking does not support target="blah" attributes of a elements. 2. Their link tracking does not simply plug in to optional popup windows (degrading
[jQuery] Strange jQuery cross-browser problem
Hi list, We are developing a site at http://www.trashortreasure.com.au/ When you click on an icon on a Google map, the info window opens and when you click on read more it should open a thickbox. Problem is that some of our users report the feature not working in FF3. Then for some it doesn't work in IE6. For others it works. Most of them got it to work in IE7. That's a strange FF3 and IE6 consistency problem. I was wondering if you can you have a go with it and see if you can spot anything unusual?
[jQuery] What is the opposite of the jQuery.param() method? (to deserialise an object)
Hi all, If we use the $.param(myobject) method to serialise an object, how can we deserialise that string back to an object? Maybe that function exists somewhere and I'm having a mental block. Please help! In the absence of such a method I would do something like this: jQuery.extend({ // The opposiite of jQuery's native $.param() method. Deserialises a param string to an object: // Note: TODO: Allow for multiple params with same name (to become an array attribute). unparam : function(params){
[jQuery] tutorial: how to convert from thickbox to jqModal + how to load external url in jqModal
I hope that my little blurb will be useful to some of you :) http://www.pixeline.be/blog/2008/javascript-loading-external-urls-in-jqmodal-jquery-plugin/ Let me know if you have any comments, questions, ok ? -- Alexandre Plennevaux LAb[au] http://www.lab-au.com
[jQuery] cluetip drop shadow problem
hi, is there a way to get drop shadows on cluetips without a fixed width? i need width:auto because the content of the cluetip differs in width and the cluetip have to scale with the content. but with width:auto the shadow just disappears, at least in ie6. any ideas?
[jQuery] [treeview] hundreds of requests for images in IE6.
Hello, I am using the jQuery treeview plugin and when expanding nodes in IE6 the browser is making large amounts of requests for the supporting images. Is there a way around this so that each image is only requested once. I noticed that this also happens with the samples. Thanks. Darren.
[jQuery] Extract the function signature from a list collection
On a page, I have a list of dynamically generated image links 1, 2.. N that are displayed on the page as follows: <div class="imgBg"> <img id="imgProd" src="" alt=""/> </div> <div id="imgEnum"> <ul> <li><span class="sqr1" onmouseover="updImage('Images/aaa.01.jpg');">1</span></li> <li><span class="sqr1" onmouseover="updImage('Images/aaa.02.jpg');"> 2</span></li> ... <li><span..>N</span></li> </ul> </div> Clicking on an image index
[jQuery] [treeview] Cookie domain and path
When setting a value for cookieId, is it possible to specify a cookie domain and path?
[jQuery] Is there a way to add namespace to every css class?
Hi, Is there a way to add namespace to every css class? a. Dynamically on the page? b. If it is not possible dynamically, how to do it not dynamically. For example --------- Original css------------------ .nav {.....some css atribute.... } .main {.....some css atribute.... } .box {.....some css atribute.... } ----------------------- I want to change the above css to below css ----------- Converted CSS ------------------- .newNameSpace .nav {.....some css atribute.... } .newNameSpace .main {.....some
[jQuery] Re[jQuery] moving character from title attribute
I'm sure this is easy but at a loss how to do it.. I need to strip out the underscore character "_" from... <div id="myDiv" title="name_surname"> resulting in <div id="myDiv" title="name surname"> I've got as far as targeting it fine using... $("#myDiv [title*='_']").attr({ // at a loss what to do here }); Any pointers anyone? Thanks -- View this message in context: http://www.nabble.com/Removing-character-from-title-attribute-tp18194975s27240p18194975.html Sent from the jQuery General Discussion
[jQuery] Lightbox alternative that supports .php files
Hi all, I'd really appreciate any advice on whether there is an alternative to Lightbox that supports .php or any server side extensions? I've looked at Thickbox which goes a step further than lightbox, but it only seems to support HTML on top of images. It also suggests on the comments to Thickbox using a server side script that parses from an HTML page. However this wouldn't work for us as we'd like to have our "sign-up" process done in this way. Any thoughts? Is this possible? Many thanks -- View
[jQuery] patience is an art well learnt when one is at the mercy
patience is an art well learnt when one is at the mercy of nature do as romans& live as romans god showers on you ************************************************* http://glamourworldpriya.blogspot.com/ *************************************************
[jQuery] adding and chaning delay to effects by extending the core problem
Hi, I just had a quick question. I'm trying to add a new set of effects functions to jquery (that I hope to release as a plugin), but for some reason I can't get them to work, despite returning the correct element from all my functions. Basically, i have extended the core with a .delay function which takes a delay and a callback, I'm then using this function within my effects functions to simulate a delay. My delay function is as follows: jQuery.extend({ delay: function( delay, callback
[jQuery] Cross Browser variance in scrollTop related calculation?
To determine if the document's vertical scroll bar is at the "bottom" of its travel, I've seen this calculation: delta = $(document).height() - $(window).height(); scrollTopIsAtMax = ($(window).scrollTop() == delta); As the document's scroll bar is scrolled down, the value of $ (window.scrollTop()) increases until it equals the value of delta, signifying the scrollbar is at the bottom end of its travel. Using jquery-nightly.js for June 28/08 with the DOCTYPE in strict mode I get the following when
Next Page