Propagated event object is missing properties?
This object was passed to my click event handler. Why are so many properties missing? The click event came from an <a> in a <li>, propagated down to the <ul> on which the handler was set. If I click on the <ul>, the event object looks "normal". Please help, this is very confusing to me :) Edit: $ul.delegate('a', 'click', function(e){}); doesn't fire. What could cause this? Edit 2: component.$element.find('a').click(function(e){ console.debug('a', e); }); component.$element.find('li').click(function(e){
php forms, pager and tablesorter not working
Hi everyone I'm using a form to send a set of options to select data using mysql and then presenting that data in a tablesorter class with the pager. The problem is that with the form to select the data, the pager buttons do not work. Sorry complete noob and don't know what I'm doing - any help mucj appreciated. Some snippets of code below: <html> <head> <title>SPT Point Sources</title> <script type="text/javascript" src="http://code.jquery.com/jquery-latest.js"></script> <script type="text/javascript"
Loading image while fetching data
Apologies if this is a fairly simple question! I'm fetching data (from a MySQL database), and would like to show an animated loading image while the data is being downloaded, and obviously then hide it when the data is fully downloaded. I've found plenty of tutorials describing how to achieve this is the other direction (i.e. when submitting a form) but I'm not sure how to adapt these to what I want. If anyone's got any suggestions / links to tutorials, I'd be most grateful.
JQuery array problem?
Hi, I have an array like this: var = array1{ id1:"value1", id2:"value2", id3:"value3", id4:"value4"}; I need to compare these array items to my site div id's and make an onblur functionality that changes the input field value. $('input').live('blur',function(){ if (this.value == "valuetocheck") { $.each(array1, function(key, vall) { if (this.id == key) { this.value = vall; alert('got this far...'); } }
Append/Prepend Malfunctions
I am creating a small, dynamic chat widget using the Pusher App service. Below I have posted the code that initializes separate tabs for different chat "Channels," but I'm having issues in a couple different places. var channels = new Array( 'global', 'local', 'help' ); for( var i = 0; i < channels.length; i++ ) { var chat_log = $('#tab_chat .ui-widget-content').prepend('<div id="ui-chat-tabs-' + 2 * i + '"><div class="chatroom" id="' + channels[ i ] + '"></div></div>').find('.chatroom');
tablesorter cell color
Hi Everyone, I'm using tablesorter and I wish to color cells red if it fails a certain test (i.e. numer < 0). It doesn't seem to work if I just do a <td bgcolor=...>. What is the correct way to do this? Many thanks Ross
having issues filtering select option list with another select option list
I have tested this and it works in FF but not in IE. I initially tried show and hide select options but that works only in FF. Does someone have a good example of how to remove and add back options into the select list? My main confusion is how to get back the variables (like a reset button). $("#filterlist").change(function() { var filter = $(this).val(); $("#mainlist option").each(function() { if (filter == "*"){ $(this).attr("disabled","");
Getting generated obj width
Hi all, I'm new to the forums, yet not new to jQuery. Still, I never had to get properties from objects generated on-the-fly, till now. I have a pager generated by cycle plugin, for each slide, a button is created, and the container of those buttons is enlarged. The amount of slides is determined by the user, so can't specify a default or maximum width. When I examine the object with firebug, I get the full width, including the generated pager buttons. But my script keeps on getting 0 as width, which
Error DropDownList
Hello, i am starting in jquery and I would like implement one dropdownlist. When I select a combobox will be charged the other with the correct parameters. my code is down [code] function TrazComarcaSelec(tribunal) { //alert("Função Chamada" + tribunal); var url = "ajaxTrazComarca.asp?trn=" + tribunal; try { // alert(url); $.get(url, function(xml) { // alert("Função sendo executada"); $("#loadCom").show('show'); var xml2 = $("tribunais",
Random order of elements
So, I have a document like this (leaving the formal body and head tags out): <ul> <li>Listitem #1</li> <li>Listitem #2</li> <li>Listitem #3</li> <li>Listitem #4</li> <li>Listitem #5</li> </ul>Now my plan was to make the order of the <li> elements random, so that at certain times it appears like this <ul> <li>Listitem #4</li> <li>Listitem #2</li> <li>Listitem #5</li> <li>Listitem #1</li> <li>Listitem #3</li> </ul>or like this: <ul> <li>Listitem #3</li> <li>Listitem #2</li> <li>Listitem #1</li> <li>Listitem
got a problem using width()
I want the text area to auto-expand to fit the div's width. But so far it doesn't work. <!DOCTYPE HTML> <html> <head> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script> <script> $(function(){ function setWidth(target_object){ var width = target_object.width(); this.css("width", width); } $("#note").setWidth($(".content")); }); </script> </head> <body> <div class="content" style="background:#CCC"> <textarea
document.write with Accordion
Thanks for taking the time to read my question. I'm not that great with javascript, but am able to do a few things after looking it up on line etc. What I'd like to do is when the user clicks on one of the bars for the accordion, I'd like to do a document.getElementById().value to set a value in a form. On my page under each accordion section I have a form. If the user clicks on, say, the second accordion bar, then I'd like to write a value to the form that is under that accordion bar. Is that possible?
Problèmes d'affichage avec la vérification d'un formulaire avec "Remote"
bonjour, lorsque je saisie dans le champ destiné à l'email : - un email déjà sauvegardé en base, le contour rouge des autres champs disparaît anormalement - un email structuré correctement et non en bases, le message "Adresse email déjà utilisée" s'affiche pendant quelques secondes, alors qu'il ne devrait pas merci par avance de votre aide et voici mon code : translation.tmx ... <tu tuid="errorLBoxEmail"> <tuv xml:lang="fr_fr"><seg>Email incorrect</seg></tuv> <tuv xml:lang="en"><seg></seg></tuv>
my div disappear when i mouse over the link in the div i want to stop that
here is my complete code when i mouse over on popupcontact div it show the divtoshow div over it and it has one link of name rahul when i mouse over the link it hide the div name divtoshow. my div should hide when i mouseout not when i mouseover the link. please help asap. regards rahul <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" dir="ltr"> <head> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.0/jquery.min.js"
jQuery New release 1.4.2 doesn't suppoert cross server functionality
Hi, I am using jquery.1.3.2 version in my application. My application is running on two different server, one is on "http" and other is on "https" I am displaying few files from https server to http server via ajax. Everything works fine in IE 6 +. But same functionality not works in Firefox 3.5. Before changing jQuery's version (dont know exactly which version), my functionality works properly in IE and FF. Today I downloaded latest version of Jquery (1.4.2), and while testing I found
How to call a javascript function after an AJAX update is completed?
I am having a couple problems with what I am guessing is sequencing. I have several different events that perform a task and then refresh a portion of the screen using this code snippet: function RefreshComments(sID) { $.get("AjaxFunctions.php", {Act: "RefreshComments", BlogID: sID }, function(xml) { $("Comments",xml).each(function(i) { var sComments = $(this).find('CommentsText').text(); $('#CommContainer').html(sComments); }); },"xml" ); } What this does is retreive a chunk
Pop up box showing once using cookies
Hello Poeple! I'm trying to do a small survey on exit using onbeforeunload function. Now the jquery script for that works good, but once the page refreshes or the back button is pressed the pop up shows again. I'm trying to disable it using jquery cookies plugin. This is my script so far, it doesn't seems to keep track of the cookies: $.cookie('appeal'); // get cookie $.cookie('appeal', 'the_value'); // set cookie function PopIt() { if ($.cookie('appeal') == null) { $.cookie('appeal', 'CookiePlus',
JQuery UI Accordion Help
I am using 2 accordions on my site for an FAQ style page and want to have external links that when clicked will go to the page with the accorions and open the relevant panel but want to keep the theme as it is using Redmond which fits our site (and I am not very good with css). Can anyone advise on the best way to do this? Am desperate as have to launch this part of the site ASAP. Many thanks and sorry if this has been discussed before but the search isn't working for me :(
Dynamically setting the width and height of the tooltip created using qtip jQuery plugin based on the content length.
Hi, I want to set width and height of the tooltip created using qtip Jquery plugin based on the content length.The content is based on the reply of an ajax call .Each request will return different content based on the request params.So there arise the need of dynamically setting tooltip dimensions. Pls provide any idea. ~Ragesh
JavaScript evaluation in .html() fails occassionally (that too silently)
I have JavaScript which I insert in HTML (this is a simplified example): $('span#footer').html('<b>Hello</b><script type="text/javascript">alert("hi");</script>'); This normally executes perfectly. However, in about 1 out of 20 cases, the JavaScript fails to execute (and there are no errors in console as well). However, I do see the element updated with rest of DOM elements ('Hello' in this case) even when JS fails to execute. I believe JQuery evals the JavaScript found in html() but why does it
help with validate remote
Hi, I tried to use validate plugin's remote parameter to check for email duplicate, but it always output the message no matter what I do. This is my html code <input class="required email" name="email" id="email"><br/>my ajax $("#signupForm").validate ({ rules: { email: { remote: { url: "<?php echo base_url();?>index.php/register/emailchecker",
Dynamic id selector. - value is NULL
Hello i`m trying to make a function that show and hide some elements but i have problem with select ID`s from div`s. This is my code: HTML: onmouseover="change_visibility(document.getElementById(this.id));" JS: function change_visibility(idd){ var element = '#menu_'+idd.id; //alert(element); $(element).hover(function () { if ($(this).is(":hidden")) { $(this).show(); } else { $(this).hide(); } }); } Alert works fine but function says
Problems with :nth child - alter 1st column and 4th column
I have the following grid setup with 4 columns utilizing the 960 CSS Grid system. <div id="bookgrid" class="grid_8 alpha"> <h2>Title</h2> <div id="booksubnav" class="alpha"></div> <div class="grid_2">content</div> <div class="grid_2">content</div> <div class="grid_2">content</div> <div class="grid_2">content</div> <div class="grid_2">content</div> <div class="grid_2">content</div> <div class="grid_2">content</div> <div class="grid_2">content</div>
adding parameter to url before submitting
Hello, I want to add parameters to the querystring or url before submitting to server. Is this possible? For example: This is the normal url: http://143.209.100.240/MyVirtualdirectory/Default.aspx This is the url after user clicking submit: http://143.209.100.240/MyVirtualdirectory/Default.aspx?name=john&age=34 So I would like jquery to add the querystring parameter after user click submit Thanks,
Elements stay hidden irrespective of the conditions?
I am trying to make a carousel of sorts. I am kind of stuck with hiding and displaying the next and precious buttons once a div moves to the far left and right of its container. I think i have everything correct regarding calculating the widths but for some reason when you click the buttons, elements stay hidden irrespective of the conditional comments which should dictate when they should be hidden or shown. Here is a link to what i have thus far. Click the MoveLeft and MoveRight buttons. http://www.ehbeat.com/test/
DOM tag not found if select string includes a decimal point.
I am doing some maintenance work on a classic asp web page that displays product information. I am changing how the page looks up the available quantities for the various sizes. The old method used several SQL queries to determine the number of sizes and available quantities and then used those results to build a table on the fly on the page. My modification consists of a web service that consolidates product size availability from three different sources and delivers the data via an XML formatted
Error for load DropDownList
i have problem in my code for load one dropdown list. my code is down. function TrazComarcaSelec(tribunal) { //alert("Função Chamada" + tribunal); var url = "ajaxTrazComarca.asp?trn=" + tribunal; try { // alert(url); $.get(url, function(xml) { // alert("Função sendo executada"); $("#loadCom").show('show'); var xml2 = $("tribunais", xml); var com = $("#ComarcaBB"); com.empty(); xml2.find("Comarcas").each(function()
$.fn.load html page - scripts execute but won't show up in the debugger
I'm doing a single page app using $.fn.load. When loading an entire html page including scripts, the scripts execute properly, but it won't show up in the ie8 or chrome script debugger and you can't step through or set breakpoints in the externally loaded scripts. Anyone know how to do this? Test case here load.html uses $('body').load('load2.html'). load2 contains an inline script and an external script. both scripts execute but won't show up in the debugger Thanks [edit] found this info http://stackoverflow.com/questions/1705952/is-possible-to-debug-dynamic-loading-javascript-by-some-debugger-like-webkit-fir
using jquery to access server-side variable from the client-side code?
Hello, I am trying to access the article_id (which changes when clicked) inside the div called test... I have pasted in my entire code, please take a look: <%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%> <html> <head> <script type="text/javascript" src="jquery.js"></script> <script> function doSomething(article) { return article; } </script> </head> <body> <div id="home"> <% strSQL = "SELECT * FROM Article" set rsHeadline = server.CreateObject("ADODB.Recordset") rsHeadline.Open strSQL, objConn, 1 %> <table
Help Struts2jquery
Guys, Have you used Struts2jquery to work AJAX + JSP? I need some help with GridTags Thanks
Problem with collapsable menu
Hi, I've got a UL which displays some categories. I use this script to toggle subcategories on/off $('.wpsc_categories li').click( function() { var selectedItem = $(this); var submenu = $(this).find('ul'); if (submenu.is(':visible')) { selectedItem.css({"background-image":"url(http://www.jendautos.nl/wp-content/uploads/wpsc/themes/default/images/ico_open.png)"});
Selector Traversing Problem in IE
Does not work in IE6, but FF, SAF works only. any better way to solve this issue? $js('#row_1 #my_name').css({ color: '#00FF00'}); $js('#row_2 #my_name').css({ color: '#FF0000'});<div id="row_1"> <div id="my_name">Asim</div> </div> <div id="row_2"> <div id="my_name">Masood</div> </div>
Put scripts in js file and append to div tag with click function
I have php page pulling data from a mysql db and looping output until a condition isn't met. What I would like to do is append html to a single div instead of 3 div's. I was wondering if I can put the script stuff into a separate js file as well. Below is a link and the code, I'm going to post what I want to end up with further down. Example (I know it only displays for the first div) echo "<img src='http://www.thecatalystchurch.com/images/play_icon.png' width='11' height='9'> <a href='#'
more baby steps
Hello again. I'm wanting to try and build the most basic image slider using jQuery. I see all these plug-ins, but so many are layered with advanced features and functionality that I can't always tell what the basic hooks are into jQuery. Does anyone have any resources to point me toward? I've got this basic form going, and now i'd like to extend it to use a sliding panel(eventually). I just need some hints as to any primitive elements, or other tools at our disposal. http://carolannart.com/_dev/ajaxForum/index.htm
jQuery.load in Opera 10.6 not firing complete
Opera is the only browser giving trouble with this jQuery statement: $("select").load("options.html",function() { $(this).val(1); }); The SELECT does not fill with ANY options. It is blank. Worse, I can turn on DragonFly in an effort to trace it down, and the problem disappears. The options are displayed as they should. I have a .lload function that I use to work around caching problems in IE. Using this function in Opera does not fix the problem. I have no reason to believe, therefore, that this
Matching an anchor to an element.
This should be pretty simple one ,yet I can't seem to figure it out. There are posts that are similar to my question on here, but they don't really answer my questions. The a user comes to the page, they're at a URL like such: http://www.xyz.com/foo1#abc.php In the HTML, there is this code (a nav column): <div id='testdiv'> <a href='foo1.php#abc' title='Some Stuff' >Listing Address</a> <a href='foo2.php#def' title='More Stuff'>Basic House Information</a> <a href='foo3.php#ghi' title='Yet
Scrolling Thumbnails to specific image on page load
Hey: I am using .scrollable (from flowplayer.tools) to create an image gallery with thumbnails. There are 6 viewable thumbnails at a time and the 'nextPage' and 'prevPage' buttons scroll the thumbnails in groups of 6. I also have some functionality that (depending on what link you follow to get to the gallery)can load any image within the gallery upon pageload. meaning, it will display that image in the imageWrap and also scroll the thumbnails to the correct position(i am using a math equation for
How to go back to previous session on a huge long page in Jquery
Hi, Is there a jquery/javascript function I can use to let the users always go back to the previous session they visited on a long page? Basically, on all other pages, if the user click "save" or "cancel", the user can always go back to the previous's page's specific session they visited earlier. Since the users need this on every single page, I need a solution to plug in to work for every page. Note: when I click browser's "back" button, it does work as expected. However, it only happens in a form
file upload with AJAX
i'm doing a example about upload form. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> <title>Upload File Ajax</title> <!-- some javascript go here--> <script type="text/javascript"> $(document).ready(function(){
Loading gif not showing
Hey, This is a strange problem, because I have done this about 50 times, but this time it is not working. I want to show a loading gif when a user submits a form. <form id="uploadForm" enctype="multipart/form-data" action="" method="POST"> <!-- DOM omitted. The form submits just fine. <div id="loadgif"></div> </form> $(function() { $('#uploadForm').submit(function() { $('#loadgif').append('<img src="images/loading.gif" name="load" id="load" alt="Loading, please wait..." /> Uploading,
Next Page