Getting status code from XMLHttpRequest object returned by ajaxSubmit
Hi, I am submitting a form using ajaxSubmit and trying to read back the status code. For a error case it is showing HTTP Status 404 in responseText but not xhr.status is undefined. If i use complete callback then xhr.status 0 So how to handle case when there is some error like 404.. var options = { success:showResponse}; function submitForm() { $("#trackingDetForm").ajaxSubmit(options); } function showResponse(responseText, statusText, xhr) { alert(xhr.status);
jquery refresh
hello, I am using the following code to refresh a div tag in my page every 5 seconds - $(document).ready(function() { $("#content_1").load("include/include.php?q=1"); var refreshId = setInterval(function() { $("#content_1").load('include/include.php?q=1'); }, 5000); });This code seems to be working as expected in firefox and chrome. However, in IE there is no update happening. I am assuming it has to do with caching, but am not sure. Can someone verify that
document.createElement('Comment')
Hey guys, I am having the following problem with jQuery 1.4.2; if I download it from my work network I got line 3476 (uncompressed ver, but it is the some with the min. one) changed from: div.appendChild( document.createComment("") ); to div.appendChild( document.createElement('Comment').data="" ); Any idea on why this appens?
Error updating JScript IntelliSense: jquery-1.4.1.min.js: Object doesn't support this property or method
I am using jQuery-1.4 and jquery-1.3.2-vsdoc2.js to have Intellicense in VS 2008 . Some times i got following error : Warning 1 Error updating JScript IntelliSense: jquery-1.4.1.min.js: Object doesn't support this property or method @ 32:399 Default.aspx Can anybody help me plz?
trim() and IE
I get an error saying the object doesn't support this property or method for the following code: $('a').click(function() { var theText = $(this).text().trim(): .... I saw posts on IE not trimming properly but in this case it does not even accept the method. What am I doing wrong? TIA John
jQuery entities.
Hi to all, Well first of all i want to say that i'm new to this so don't expect much out of me. I have the following problem: When i submit a form as the one bellow: Titulo <%out.println(k.getTitulo());%> Descripcion <% out.println(k.getDescripcion());%> Caracters such as á,ó,í,ú,ñ are saved as á,ó,Ã,ú,ñ and i dont know what to do to make it work fine. I use .ajaxSubmit() to submit the form. If there is someone who can point me in the right direction or to give me a solution thx in advance. P.S:
treeview ie8 problem - "Stop running this script?"
I have a massive treeview. It has 250 node and all nodes has child nodes. I'm using also jquery.treeview.async.js. My code like below $("#CustTree").treeview({ url: "TreeView/CustTreeView", control: "#treecontrol", unique: false, })when i try to open my page in ie9 I got an error like below. Stop running this script? A script on this page is causing your web browser to run slowly. If it continues to run, your computer might become unresponsive. Have any
JQuery selector does not see elements created on-the-fly
I have an element generator using jquery, However, elements generated were not affected by the event (click) even though they match tag and class name. Anyone can give me an idea why? Code: <html> <head> <script type="text/javascript" src="jquery.js"</script> <script type="text/javascript"> $(document).ready(function(){ var catId = 0, table = "", content = "", columnCount = 0; // Add key objective
.slideUp and .slideDown not working
So, I have this little script: <script type="text/javascript"> $(document).ready(function(){ $("#contactLink").click(function(){ if ($("#contact-container").is(":hidden")){ $("#contact-container").slideDown("slow"); } else{ $("#contact-container").slideUp("slow"); } }); }); function closeForm(){ $("#messageSent").show("slow");
How to loop through a ASP.NET Repeater Control using JQuery?
Hi. I have created a Announcement page which works as when the title is clicked, it discloses the contents and there is a close button to hide the contents then it only shows the title. but the hide function of my close button only work for the first title and does not work for the other titles below it. The list is a repeater control so I guess I have to loop thorugh this repeater list and create a different pointer so that it can hide each contents no matter how many they are opened. Any help on
Build Tree Structure with values from database
Hi all, Sorry if this is a wrong place to post. I am a new Fan of JQUERY, and now I am having an issue in building the JQTREE, I want to build something like a foldable tree using Jquery. But the problem is I am getting the values from a Database. My database structure is ID--PID----NAME---------NUMBER---------ROLE ------------------------------------------------------------- 1--0---------John----------1234-------------Manager 2--1--------Peter-----------2333------------Analyst 3--2--------Andrew--------4434------------Clerk
How to stop IE $.getJSON() memory leak
Hello, I have started using jQuery recently and I am having a problem with IE leaking memory when performing a $.getJSON() request at intervals. To test the problem I set up the code to run every second. The only code I currently have running is the ajax request as below: getDetail = function(detailID){ $.ajaxSetup({ cache: false }); $.getJSON("api/urlgoeshere", {"dID" : detailID,"d" : 0}, function(data){ //Do stuff when leak is fixed //Reset the timer
General: When to use $.ajax vs load???
Hi, I am using $.ajax and type: "POST" at the moment. But i was wondering when in general one would use load and when $.ajax??? Still a lot to learn with jQuery/ajax regards
Expanding a div in a specific direction.
I have a div, and a container div. This div is my footer. I want to beable to slide items up out of the footer. However, when I use the toggle() and use marginTop/marginBottom it slides perfectly, but only expands the div downwards thus causing scrollbars to appear. Is it possible to define which way you would like a div to expand? So just to be clear here is my code: <style> #footer-container { overflow:hidden; z-index:100; position:relative; border:1px solid #f00; width:1000px;
Plz help
hi i m new to jquery i have to call a web service http://tt.shine.com/AccountAPI/NewAccountWS.asmx/CheckExistingCompany?text=anyname $.ajax({ type: "POST", url: url, data: "{}", dataType: "html", success: function(msg) { // Replace the div's content with the page method's return. alert(msg); //$("#Result").text(msg.d); } }); this code is working fine in IE but in mozilla its giving 403 forbidden Please help me Thanx in advance
fadeIn does not work when css transparency defined
I tried the following code and it seemed like fadeIn() didn't work when the image has trasparency defined for it. i tested with IE8. Is this intended? <html> <head> <style> .style1 {display:block; opacity:0.4; filter:alpha(opacity=10); width: 200; height: 200} .style2 {display:none; width: 200; height: 200} </style> <script type="text/javascript" src="jquery-1.4.2.js"></script> <script type="text/javascript"> $(document).ready(function()
JQuery UI + Plugins and IE 7.0 Memory Consumption
img{ *width:700px; max-width:700px; } Hi, We are planning to use JQuery + UI + Plugins(accordian, autocomplete, form, jqGrid etc..) extensively in our we application. The client machines are restricted to 256 MB RAM and IE 7.0 only. We want to analyze memory consumption and also whether there are any memory leak scenerios. We are using Process Explorer to monitor IE 7.0 memory size and IEJSMemoryLeakDetector for this task and few memory leaks reported(Please see attached screenshot). Could someone
Passing parameters in ajax function call
Hi, I'm trying to pass parameters using the jquery's ajax function, but I end up with a "function undefined" error message when I try. I had trouble finding simple examples of ajax passing parameters with jquery. <!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> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript"> $(document).ready(function(){
Strange problem with jQuery 1.4 and 1.3
Whenever I load ONLY the 1.3 or 1.4 library on an html page im developing on my desktop I get an error that says "setting a property that only has a getter" I dont have any additonal code, this is coming straight from the jquery.min.js file I also get a bazillion warnings in Firebug. Can someone help me resolve this issue? I can't determine why this is happening
unable to exclude fields from serialize() using not()
I am using .serialize() to serialize my form... what I want to do is very simple yet I can not get it to work. What I want to do is exclude 2 fields from getting serialized... I tried using .not() without success... here is what I tried so far: var formdata = $("#myform").not("#field1, #field2").serialize(); var formdata = $("#myform").not(document.getElementById('field1'), document.getElementById('field2')).serialize(); In both cases I alert the formdata variable and in both cases the fields are
Context and selector syntax
Hi everyone! First post. I'm using jQuery to modify an element I'm creating, like so: rowhtml = buildARow(parameters); //returns something like "<tr class="foo hidden"><td class="firstcol" ... </tr>" jRowhtml = $(rowhtml); $(".firstcol", jRowhtml).text(" whatever"); This is a simple example but you see what I'm doing. I'm now trying to do something like $(".foo .secondcol", jRowhtml).text(" whatever "); which isn't working, I assume because tr is the top level node of the context and selectors
.click not working in IE8
Hey Guys, Im using the galleria plugin in one of my drupal sites and had to do some customizations. Everything works as intended in FF, Opera, Safari but not IE. Basically due to the customizing I need to do a .click on an image to get the results I want. What the .click does is it clicks on the thumbnail to show the correct image in the main image wrapper. I know you wouldn't need to do any customizing to Galleria to do this but Im using multiple galleries on a single page that change based on a
$.get as JSON to array?
I'm wondering how I can get a JSON format to an array or something usable for me. I've got the following; The index.php contains; {"playlist":[{"media_id":"9470","filename":"NEW_4.jpg"}]} The code: var playlist_array = new Array(); function update() { $.get('index.php', {extension:'screen'}, function(data) { playlist_array = data['playlist']; }, "json"); } function hello() { alert(playlist_array[0]['filename']); } update(); hello(); playlist_array[0]['filename'] always
Jquery, offset(), and IE
I am needing to center a fixed position header in a website and decided to go with jquery for it. I finished it and it of course looks great in FF and Safari, but not in ie7 or 8. Any ideas? http://testing.stoobs.com/firefly/index.html http://testing.stoobs.com/firefly/js/global.js
delay().css()??
I have another post, that has the same question that pertains to a larger scope. I decided to post here, as this is a specific sneario that others may find useful. Is it possible to apply the delay function to the css()? So basically the set up is to make the <div id="footer"> overflow set to hidden, but when you toggle it set it to visible, and upon the toggle animate it down, delay and set the overflow back to hidden? <script type="text/javascript" > $(document).ready(function() { var $button
Removing images from div, and inserting into another.
Seems simple enough in theory. I have multiple divs, all with the class of "post". in the middle of those i have a blank div named "photoholder". All i'm trying to do is remove the images from any "post" div, and insert them into the nearest "photoholder" div. here's what i got which doesn't work at all: $('.post').each(function() { var wrap = $(this); var hi = wrap.closest('.post').find('.photoholder'); wrap.find('img').each(function() { var img = $(this); img.remove().appendTo(hi); }); });
jquery question. need help
Hi all, I'm super new to javascript and jquery and need some help. Basically what I'm trying to do is create a slide down effect for a hidden div. The following link is my testing area: www.designfoxmediaworks.com/slidetest/ I'm using slideToggle. As you can see when you click on the link that says toolbox, it slides down the the box like i want. But if I click anywhere on the box it slides it up. I don't want this. I'm trying to get it to only retract when clicking the close link. Also, is there
Queueing up animations
Hello everyone, I'm trying to duplicate the functionality of this site's left navigation rollovers, and I think I have a good idea on how to do it, but the execution isn't working the way I want it to. Here's how I want to do it in pseudocode: onHover { mouseOver () { // move the <span> out of the <div>'s viewable area. // The <div> contains the <span> and its overflow is set to hidden // Make the text 'scroll' up this.animate ( top: -50px ) // now set its
clone dialog width
I am passing link attributes to set dialogs height and width. This works fine for height but width does not want to accept any variables, just actual value. I've tried everything I can think of, even using vsize in width which works fine for height. None of the options worked. Is this a bug? $dialog .load($link.attr('name') + ' #content') .dialog({ title: $link.attr('title'), width: $link.attr('hsize'),
line breaking with underscore
Hello! I"m using http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js for the line breaking of the link-names. It works wonderfull if the link is hyphenated like my-loooooooooooooooooooooooong-link-name, but ignores if it is with undescore. How can one add a support the line breaking by underscore? for example: my_loooooooooooooooooooooooong_link_name will be: my_loooooooooooooooo oooooooong_link_name thank you, best regards, tanja
Ability to rotate images and Flash movies in Jquery rotator
Hi all, Am using the standard Jquery innerfade plugin (http://medienfreunde.com/lab/innerfade/) and was wondering if it was possible to make it rotate not only images but also Flash movies. One problem i would see is how the script would detect when the Flash movie starts/stops. Have been doing some searching around, but have not seen any script that could manage both images and Flash movies, is this even possible? Thanks in advance!
Odd Problem? with .load function
I'm not sure if this is a problem or feature, but I need to figure a work around. So.. I have a menu that when clicked loads a 2 column page layout, with several pages or "portlets" within it. These portlets are loaded into div containers using the .load function in basically a loop, for example: The click tells the script that it needs to load page1.html, page2.html, and page3.html into the current page. So my script does a loop to basically do a $(container).load(url); Page1.html and Page2.html
Pick a javascript framework
We have an ASP.Net web site, and we do not use any javascript framework at this time. I plan migrate the site to use jquery, but I also would like to hear from others. There must be people on this forum, who have first hand experience with both prototype and jquery, and have an opinion between those two. Although there are other javascript frameworks or libraries, my main focus at this point is between jquery and prototype. Personally I lean towards jquery, well for one thing it is better integrated
$.get succeeds but no data
Hi all, I am new to the while jQuery thing but am trying to run a MySQL query based on trhe selection from a listbox. I have the listbox working and reacting to the onchange event using the following code... $("#users").change(function () { $.get('scripts/php/jquery_db.php', function(data) { $("#details").html(data); $("#details").css("visibility", "visible"); alert('Load was performed.'); }) });The event fires
How do you sequentially iterate a new property to the parents of a specified element on a page? (Includes code example)
jQuery(function($) { $(document).ready(function(){ // wrap the img with a div $('#post_content a').wrap('<div id="wrapper" style="position:relative"></div>'); //add the overlay div $("#post_content a").before('<div id="overlay"></div>'); // make the overlay equal to the height of the img var h = $("img"); $("#post_content").contents().find('#overlay').height(h.height()); // make the overlay equal to the width of the
multiple event handlers on form.submit()
Hi, I would like to add an event handler to the submit() method on the form. If the form contains an elemant recaptcha, it should show a recpatcha in a modal, and upon completing that recaptcha, assign the entered captcha to that element to be submitted long the form. Basically, I would be able to attach the code that renders the modal and the recaptcha form in the .submit event handler. I was just wondering; if we have multiple form.submit() handlers that we attach to the forms. in what order are
[jQuery] How do i get this mega dropdown with jQuery??
Hi all, I am trying to get this mega dropdown menu: see textielmuseum.nl/ So far i have: bldd.nl/prototypes/megamenu/test2.html But i can´t get the hoverIntent to work? here´s my try W.I.P bldd.nl/prototypes/megamenu/test4.html Any tips, ideas how i to get my mega dropdown to work on hover and hide it??? Regards,
set Multiple select
Hello, I'm new here and have a problem. When I've a select box I can set the selection like $('#selectbox').val(2); Now I've a multiple select. What I want to do is to select more then one option like this. $('#selectbox').val(2, 4);This example select only the first option but not the second. Thanks for your Help
period in id - how to select?
I'm using jQuery to add some extra functionality to our Request Tracker installation, and I've run into a small problem. It uses generated ids for various elements, including one I want to use in a selector. The id is 'TitleBox--_Ticket_Display.html--ticket-info-requestor-------0', which as far as I can tell is valid, but has a period in the middle of it. If I use either of: jQuery("div[id='TitleBox--_Ticket_Display.html--ticket-info-requestor-------0'] ul").addClass("req-other-tickets"); jQuery("div#TitleBox--_Ticket_Display.html--ticket-info-requestor-------0
is there any event after a cut (cutting text from textbox) is happening in textbox?
Hi all, Is there any event fire after a cut happening in textbox? while cut event against textbox i cannot have modified text from textbox. I can get the whole string even I cut some of text from textbox. how to call after finishing a cut in textbox using jquery? thanks r.eswaran
Next Page