document.ready not working the 1st time in IE
Hi, I use the document.ready function by jquery to trigger some action in an asp page. the problem is that IE has problems the first time the page is loaded. I register the window.resize event for example to do the same actions i do once after first load to keep some alignments correct. these will work in ie but not the initial alignings. I played around with the position of the javascript already and tried everything from having it in the header as well as putting as last element right before </body>.
Browsers handle default select options differently
How do you folks handle <select> lists with no default option selected? I have mocked up a simple sample but in reality I may have a dozen different categories. (Link: http://jsbin.com/oriju)http://jsbin.com/oriju Do you disable all other hidden <select> elements so that their values are not sent in a POST request? http://jsbin.com/oriju
JQuery Ajax manager problem in IE
Hello Guys, I was trying out Jquery's Ajax manager. All seams well in FF but there is some problem on IE. Here is my JS code $.manageAjax.create('clearQueue', {queue: 'clear', maxRequests: 2}); $.manageAjax.add('clearQueue', { success: function(html) { alert("hi"); }, url: 'ietest.php' }); This on IE gives error that says: "$.manageajax is null or not an object error". Can any body help me out on this. Thanks in Advance,
simple rollover Question
I am workiing on a page to practice with jquery The X56 Project . I just cannot get it to work. I did not write the script I copied it. I am missing something that I have to plugin.? Like I said this is practice so I can get profricent to use JQuery WITHOUT copyig scripts. Need more info let me know. Any help appreciated, MikeE
Help!!!Set Focus() on the input field......
Hi All I wish to set focus on the same input field after the input is invalid....I used focus() method, but it only works in IE, not in FF or Chrome. Any helps would be appreciate...Thanks My Html <div> <label>Product Quantity</label> <input name="productQty" id="productQty" type="text" /> (1-999) </div> My Jquery //check the product quantity $("#productQty").blur(function(){ if(isNaN($("#productQty").val()) || $("#productQty").val().length > 3){ $("#productQty").focus(); $("#productQty").val('');
hover question, checking "active" status
I think this is just a dumb question, I'm missing some basic logic here about jquery "grammar". I'm trying to do an image swap on hover that checks to be sure the thumbnail is not the active thumbnail. So mouseover, it swaps. Mouseout, swaps back, unless the thumb has been clicked. here's a snippet of the code that doesn't work: thumb.hover( function() { this.src = this.src.replace('b.','.'); }, function() { _li.not('.active').children('src').replace('.','b.'); } //
Issue with (this).val and select box (combo)
I've been over my head this last few days triying to create a combo select (the option "chile" makes the next select display). Im using this script to handle the request. $(document).ready(function(){$("#selectionpais").change(function(){ if ($(this).attr("value") != "chile"){$("#ciudad").hide();} else {$("#ciudad").show()} ; }); });And this is the select option; <select name="pais" id="selectionpais"> <option value="..." selected="selected">....</option> <option value="chile" >Chile</option>
Selecting groups of options in selectbox
I'm trying to create a selectbox where when you select certain options in the selectbox, it automatically selects a group of options in the same selectbox. So lets say we had a selectbox with these options: fruit apple banana pear animals monkey elephant kangaroo I would like to make it to where if the user selected "fruit" as an option, apple, banana and pear would automatically get selected also and if htey chose "animals", all the animals would also get selected. Any ideas?
IE with SSL can not work
I use jquery.ajax() on IE8 with ssl session, but the cgi program can not receive my post data. Who does it work? But the test on Firefox is no problem.
Form With Multiple Submit Buttons Using Jquery
I have a form that has 3 submit buttons with 2 input fields. The first input field is a search field that allows the users to search against the database for certain names that are found and not found. <form id="name_form" action="" method="POST"> <input type="text" name="q" /> <input type="button" id="search" name="Submit" value="Search"/> *(multiple search seperate with a comma)<br /> <input type="radio" name="type" value="found" checked>Show Found <input type="radio" name="type" value="notfound"/>Not
IE8 executes HTTP GET request on form submission even though we are stopping default behaviour on the submit...
For some reason, IE8 insists on submitting an HTTP GET request when the user presses "enter" when inside of an <input> element. It's a rather curious thing because I have an <input type="submit" /> that has an event for "click" that contains the following code: event.preventDefault(); event.stopImmediatePropagation();This works on Firefox - if the user presses "Enter" inside of an input element on the form, the submit button will not execute. But on IE, it does. However, if the IE user
Is it possible to pass a selector into a function?
I am attempting to hack a jQuery extension that does an ajax style form submit. The final result is an image uploader that can run inline. The script is fairly simple - it creates an iframe with a new form, and copies over a form element (the file name), and submits the form. Plus error handling and the like. The problem is that I need to use from within MVC, and so I need more form values, like the ID of the item I am working on. It would be easy to add another configuration setting for an additional
$.ajax not working on a Mac
Ok, here's the deal. I am working on a website that makes use of the $.ajax function. Everything works great in Windows. I've tested it in Firefox, Safari, IE, Opera, and Chrome with no problems. I pulled up the site in Firefox on my Mac and nothing that $.ajax loads appeared. I clicked around on some other items that would trigger event-based loads. The animation triggered, telling me that $.ajax reported a success. However, the box that loaded was blank, as if the external PHP was a blank file.
Making horizontal accordion close on click
Example: http://vincent-massaro.com/map/ Currently, the script allows you to click on a piece of the accordion to open it, but it is set to close on mouseleave. When I set the mouseleave to .click, it gets confused and doesn't know what state it is in. The code controlling this is below, and the full script is in haccordion.js linked in the page source. If someone could help me modify this script, I would be very grateful! Thanks in advance. $target.click(function(){ haccordion.expandli(config.accordionid,
Triggering a click event issues via (event.button != 0)
I have an object that has a click event I'm trying to trigger. However in the click event I have the following if statement: if(event.button != 0){return true;} This if statement allows right clicks to go through and activate but it also prevents me from triggering the event. Any ideas on how to prevent this? If I remove the if statement from the first click function everything works as intended. Here's my example code based off of the trigger event examples: <!DOCTYPE html> <html> <head> <style>
How to make Submit Without Page Refresh using jQuery ?
if i make search then, the result of search apear in the same page without refrash
Mulitple jquery plugins at once not working
Hi, i am trying to use both the lightbox plugin ( http://www.huddletogether.com/projects/lightbox2/ ) and a fade in/out effect ( http://hv-designs.co.uk/2010/01/13/learn-how-to-add-a-jquery-fade-in-and-out-effect/ ) at once on a set of thumbnail pictures in a website. [you can see the site as it is so far here www.revelrythieves.com/aphotic/photos] For some reason, only one or the other will work. My <head> currently looks like this: <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"
Terrible selector performance in IE 8
Hi all, I have a php search page with can potentially display several hundred records. For each record, there is an icon which, when clicked, makes an ajax call. When the reply comes back, the text returned from the server script is added to a specific div and the source of the icon that the user clicked is changed (as a visual cue that that particular item was selected). This works 100% perfect in FireFox (3.5.9), Chrome, and IE 7. However when I test it in IE 8 there is a HUGE lag between when
Using .serialize() on a dynamically loaded form?
I'm creating an inventory management back-end for an intranet application. The user has to indicate whether the item is "Non-Inventory" or "Inventory". Each item type has it's own set of fields so this distinction loads the proper data entry form via: $("input[name^='ProdType']").click(function(){ $('#EntryForm').hide('slow').html(''); var ItemType =$(this).attr('value'); var pageLoad; if(ItemType=='noninventory'){ pageLoad = 'noninventory_form.html'; }else{ pageLoad =
bind() exception in IE8 for popped out window
I recently upgraded from JQuery 1.3.2 to 1.4.2. I have a page which opens a new window. There is a javascript object in the parent window which, as one of it's properties, contains a function. As part of the popout process, the child window is given a reference the object's function. In version 1.3.2 everything worked as expected. In version 1.4.2 under IE8, a call to 'typeof' on the function reference reports that the function is an object. As a result, an error is thrown on line 1572 (uncompressed).
Is it possible to load data from a different domain?
I posted this already but the post seems to have disappeared, so sorry if it's a duplicate. I've looked through the form and can't find an answer to my question - can I make a call from one server to another to recieve some data? I want to do something like this: var callAddress = "";//remote url added here var STUID = "";//user id param added here var tutID = "";//content identifier ID added here function getupdate(){ callAddress = remoteaddress+"/admin/functions/getUsersData.asp?userid="+STUID+"&tutID="+tutid;
Odd Quirk in IE: Function Expected
Hello, I've got the following code in my site's js file: /** jQuery No Conflict **/ var j = jQuery.noConflict(); /********* Product Details **********/ // IPR Panel Postback j(document).ready(function() { // All Radio Buttons in the IPR Selector //j(".ipr_options input").each(function() { InitPanelPostback(this); }); var InputItems = j(".ipr_options input"); }); As you can see I have a pretty simple jQuery script, I'm initializing the global variable j to replace $ because something else
background image change
I m creating a page with full size image in background, and have some thumbnail on page, if i click on thumbnail background image will change with fadein effect, have anyone to help it out please?
Chaining event handlers and how to stop in the middle?
Hi All, Suppose that I chain 2 event handlers to the click event of an element like this: $('#id').click(function1).click(function2);So, if I click on the element, the function1 will be executed and then will the function2 be. Is there anyway to make the function2 not be called in function1? I try to return a false value in function1 but that doesn't help. Thank you.
Simple thing driving me out of my mind, please help.
jQuery('li.make_and_model_era a').click(function() { // grab text from selection var era = this.text; var make = jQuery(this).parentsUntil('li.family a').text; // ??? console.info( era ); // == '1974-1977' console.info( make ); // == 'function()' I need '911/912' Please help I am exhausted :( }); <ul> <li class='make'><a href="#" style="position: relative;">356</a> <ul> <li class='make_and_model_era'><a href="#">1950-1959</a></li> </ul>
Help with for loop and ajax call
Hi I want to add 5 to the variable 'paramdatastart' each time the #btn is clicked. So when I click it first time the 'paramdatastart' will be 5 and next time it will be 10 and so on How do I do that? This is the code <script type="text/javascript"> $(document).ready(function(){ var ajax_load = "<img src='http://image.gif' alt='loading...' />"; var loadUrl = "/ajaxtest.jsp"; $("#btn").click(function() { for(var paramdatastart = 0;paramdatastart <= 5; paramdatastart++) alert(paramdatastart
Jquery menu states/addClass, not working with Iframe.
I've got a problem. I've built a navigation page to be used in an iframe across a site. I've made menus like this in PHP and using arrays but I cannot use PHP here so I thought I could reproduce it in JQuery. I am able to addClass "on" to selected menu items using the following: <script type="text/javascript"> $(function(){ $page = jQuery.url.attr("file"); if(!$page) { $page = 'index.html'; } $('ul.navigation li a').each(function(){ var $href = $(this).attr('href'); if ( ($href == $page) || ($href
jQuery .ajax() POST without appending data to URL
Hey there, I'm new to jQuery, but used to working with PHP and how it sends POST data. In the following snippet, why is it that although .ajax() data is sent to "post", it still appends all the data to the URL? Isn't that how GET works, and not POST? The reason I specify POST is so that the data won't be sent through the URL. if(checkLen(50,2,'ne','input') == false && checkLen(100,0,'nst','textarea') == false && checkLen(10000,5,'nd','textarea') == false) { var ne = $('#add_entry input[name=ne]').val();
jQuery slideToggle a table div
Ref my included html, how do I using jQuery slideToggle the div tag according to the row button clicked? My code just show/hides all divs, I need to do this only for the selected one. Thanks. <!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> <title></title> <style type="text/css"> .btnTog { cursor: hand; } .divAdd { font-weight:bold;
form field clearing script
I have the following code that I'm using to cycle through each element in a form field, and clear whatever text is in it. If the user clicks out of the field without typing anything then the script is supposed to return to whatever value it started with (e.g. "Enter your name..."). If the user does type something, then it stays in the field even when they click out of it: $(document).ready(function() { count = 0; fieldVal = []; fieldFocus = 0; $('#frm-quick input[type="text"], #frm-quick
Positioning problems in Opera
Hi All, I'm very new to jQuery so please bear with me. At the moment, I'm in the midst of developing an application in Ruby on Rails (also a newb in this) which will include a 'search as you type' interface. The prototype code works pretty well but, when testing it with various browsers, I've found that Opera does not correctly position the div containing the returned search results. The results are supposed to position directly below the input field -- which it does in Safari and Firefox
Ticker scroll now appearing "choppy"
Please excuse my lack of script knowledge. Last year we outsourced a site build. The company used the jquery.marquee.js | jquery-1.3.2.min.js | ticker.js for the scrolling ticker on our homepage. It worked fine. This year, in order to save money, rather than have them create an entire site, I am rebranding it. I kept all of the same code, however, for some reason, the ticker/marquee doesn't scroll smoothly and looks kind of jumpy. The only things I changed were the size (from 20 to 24) and text and
.css not changing background image on mouseover!
Here's my code (it is fired, and does find the object, but won't change the background image): But it's not the image that's the problme, because even trying to change the background-color doesn't work either. [code] <div id="myDiv"> <div class="mySubDiv"><img class="icon" /></div> </div> <script type="text/javascript"> $( "#myDiv" ).mouseover( function(mouseEvent) { $( "#myDiv" ).children( ".icon" ).css( "background-image", "url('../images/icon_pressed.png')"
Issue with Malsup cycle plugin showing 'flash of unstyled content'
Hi guys, I am using the popular jQuery Cycle to perform a simple rotating image banner on the following site (see the banner near the top approx) http://tinyurl.com/ycy45t3 If you reload the page you will notice a 'flash of unstyled content' - approx 8 banners all display then disapper again) I've used the following fix here and it works fine when I take off the links from each of the banners, can anyone suggest how I fix this but keep the a href's intact (probably simple but I'm not too certain
How to take a search string and display the results in the same page (Dynamical)y ?
need to search for keywords in my database and display the results in the same page with a friendly interface all without refreshing the page
Poor performance of XML parsing
I pull XML from server using .load() and then iterate with .each() over some 3000 nodes. I use .find() to get 7 sub-nodes and store them internally (into arrays). It works, but it is disappointingly slow. On my obsolete P4 it can take 8-10 seconds during which the whole browser (FF) is completely frozen. On faster computers the processing time is shorter, but still way too long. What can I do to cut this time? I certainly need speed up of an order, two orders would be nice. Would JSON be any faster?
preventDefault() fails in IE8?
jquery-1.4.2.min.js I'm trying to use the Alt+keyCode in my web-app and want to prevent the event from bubbling up to the browser. The following works fine in FF & Chrome, no event propagation, but fails in IE8: $().ready(function() { $('html').keydown(function(event) { if (event.altKey) { if (event.altKey && event.keyCode == 83) { // 'S' save(); } event.preventDefault(); } });
$('#foo').click but NOT $('#foo a').click
HTML:<div id ='foo'..> <a></a> <a></a> <a></a> ...etc.. </div> JS: $('#foo').click( do this stuff) [BUT NOT if the click is on contained <a>] I am looking for a conditional click or something. I tried doing switches on $('#foo a').click( throw a switch function) but it just doesn't work. Anybody got any working code that can help me differentiate a contained anchor click from the div that contains the anchor click? Any help much appreciated because I am steaming a little on this one... thanks in
Slider steps respecting select values
Supposing we have a drop down with the follow values: 1, 2, 5, 15, 50, 150 I want the steps to be spaced relative to their values, so 1 to 2 will be smaller than 2 to 5, etc. Is there a way to do it already? Thanks
Is there a way I can wait for my ajax call?
even polling approach is acceptable. but I don't know how to do it with $.ajax(); I need to wait for the result of that ajax call so that to determine the size of a panel for the return content. may I check the status of the XmlHttpRequest object just like plain old ajax? I can't do everything in the callback because I need some other parameter to invoke the panel to be shown.
Next Page