Load Pages
Hello, I have three pages: reg1.htm, reg2.htm, reg3.htm On page reg1.htm, I have a form that uses jQuery to validate and send via email the user data. My problem is that once this process ends, I want to automatically load the pagereg2.htm . How I can do this, please?
Trouble with dialogs
Hello! For three days I trying to fix my problem and I can't do it. I think live example was good idea. I have problem with dialogs on my site. You can check it on http://www.knights.pl. When you click "Tawerna" (this is forum) and when subpage was loaded first time everythink works fine, but when you click "Tawera" one more time page loaded successful, if you click "Zarządzaj moim kontem" dialog open, but buttons don't work. If you close and reopen dialog everythink works fine... It is my
Removing script tag on ajax load
Hello all, I'm using ajax call like below - $.ajax({ url: "/page/test.html", success: function(data){ $("#something").html(data); } }); The first line of this file is: <script type="text/javascript" language="JavaScript" src="/js/jquery.js"></script>I currently don't have control over this file and want to remove this script tag. I've tried lots methods and still I can't seem to remove the script and the file each time gets downloaded
get/set textbox created dynamically
Hello, I dynamically create a textbox as follows, but I cannot retrieve the value entered by the user: bp_boards = ' \ <tr id="hwNumberBoards"> \ <td>No. of modules:</td> \ <td><input id="hwNumberBoards" name="hwNumberBoards" type="text" size="3"></td> \ </tr> \ '; $('#hwStructureDetails').append(bp_boards);
jQuery 1.5 .load() - possible bug with imported Javascript?
Forgive me if I'm mistaken with this I haven't been using jQuery for long. On my site I wanted to use the .load function to "import" some Javascript into the page and have it execute, I followed the documentation which says : $('#result').load('ajax/test.html #container'); Using Firebug I checked the response and everything seemed to have worked fine but the Javascript didn't execute as expected. If I changed the code to $('#result').load('ajax/test.html#container'); Basically just removing the
fadeIn + append/appendto
Hi Guys, am I not able to fade in some content, which will be append to an div?? Here is my test case: http://jsfiddle.net/n3ZFt/1/ THX
Getting $_FILES from input.
Hello, i have a form with a file upload. When i click on the submit button i will send the file with $.post to my php script. In the PHP Script i must use the variable $_FILES[]. How can i realize this? I try $('form').find("id").get(0).files[0] but it return an object and not $_FILES[]. Can anyone help me? Source: $("#cl-entry form").submit(function(event) { // Stops submit action event.preventDefault(); var $form = $( this ), image = $form.find( 'input[name="image"]' ).get(0).files[0], url
trying to understand callbacks
Im new to js and jquery. I have created some nice animations and stuff but I am stuck in one point. Ive searched everywhere, checked every document and tutorial but I cant find where I am making the mistake. why isnt this working? $(document).ready(function(){ $('#startButton').click(function() { alert("wtf1"), (function() { alert("wtf2"); }); }); });the first function gets called but the wtf2 is never called.
Retrieving margin-left in Firefox & Opera
Stumbled onto this one: retrieving the margin doesn't seem to work in Firefox or Opera. This is code I'm using, which works fine in Chrome, Safari and IE: var contentmarginl = parseInt($('#wrapper').css('marginLeft')); // fails var contentwidth = $('#wrapper').width(); // works alert(contentmarginl); The alert returns (in my case) 350 in the complying browsers and 0 in FF and Opera. Is this a bug or my error? Is there a known workaround? EDIT: Just tested in XP sp3 IE7 &
list don't get shown a second time
if i click on a <li>-Element, it's children should be displayed This works fine but if i click on the back button and let me display the same Elements again, the code fails (try 1 > back > 1 in the jsfiddle) here's a jsfiddle with code i created http://jsfiddle.net/m3A8g/2/ (i hope you see what i mean) i don't have a cule what i'm doing wrong here (perhaps there is even a more elegant way to deal with it than parent() and children()) thanks in advance, Fiisch0r
How to get the XML document part after using $.get()
Hi folks, Given the following standard jQuery code to .get() a (valid) .xml file: $.get(file) .success(function(data, textStatus, jqXHR) { oUIxml = $(data); }); Later on, I need the XML document part from the oUIxml jQuery object. Is there any way to achieve this without using something like .each() ? If I do: alert( oUIxml.text() );It'll get me all the text values from all nodes as one big chunk of text. But what I need is only the XML document, in fact just like: alert(
Most efficient way to search only some children of div?
Given this sample HTML: <div> <span class="searchme">some text</span> <span class="ignoreme">some more text</span> <span class="searchme">yet more text</span> <span class="ignoreme">finally some last text</span> </div> What is the most efficient way to determine if some search text is found within the div and ONLY in any one of the spans inside with a class of searchme? I can think of some convoluted ways but am hoping I've missed something fairly elegant and simple :) Right
SUBMIT buttons, value not passed to PHP by Firefox etc
I've inherited a website which uses jQuery to do AJAX submits. (The website owner and the original designer fell out). A piece of code which used to work under IE and FF (Chr, Opera, SAfari) now only works under IE. The failing code is given below. Looking at the PHP the code uses AJAX to submit a query. It looks as if this uses a jQuery hook to add a variable "requestType", although frankly the code is somewhat hard to follow. What happens is that under IE all variables are available to the
fadeIn & fadeOut not working in IE8 or lower
Hi all, I have a problem with my jquery. The next code works fine in IE9, FF and Chrome, but not in IE8 or lower. The problem is that my fade out and fade in on a block element are not working. The problem in action can be found here: http://www.paarsekever.nl/Showroommodellen.html and soem snippets of the code: HTML: <div id="linkgoleft">goleft</div> <div class="infoBlock block0" >data</div> <div class="infoBlock block1" >data</div> <div class="infoBlock block2" >data</div> <div id="linkgoright">goright</div>
Jquery level problem
I have a problem with my jQuery accordion plugin. the control is always above everything in my page. i try to change z-index but it not solve it. this is the page: http://www.hfx.com/en-US/General FAQs If you try to press the top menu on: "Trading Tools -> World Interest Rates" you will find you can't do it, because the jQuery is above it. I can't find anything about it in the web. Someone? Adi
click event fires twice
I ran inro a problem recently which i haven't found any solution to. i generated a subnode for all unordered lists which are Childs of List-Elements like this: <ul> <li>1</li> <li>2 <ul> <li>2.1</li> <li>2.2</li> </ul> </li> <li>3</li> </ul> The generated list works fine and looks like this: 1 2 2.2 2.2 back <-Generated Element <li class="back">back</li> 3 but if I click the Back button the Event fires twice
Pause a function midway
Hi can anyone help me to create a simple slideshow? Is there any way to pause a function that has more then one function inside of it (using callbacks).
Magic Line menu error
Hi guys I used a piece of code from a tutorial and edited it to get it working on my site, it works but for some reason it shows up differently on different browsers. On my home machine using IE8 it has the line below the text and the text at the top of the page, on my work machine also on IE8 it has the line above the text and the text in the middle of the menu bar. This is also how it displays in Firefox and Safari on my home machine as well. Very strange. I don't know enough about jQuery
is .queue() empty?
To what should .queue() be tested to ascertain if the queue is empty? null? empty string?
Starting jquery-1.4, in IE8, html() returns null for a non-HTML element (e.g. <xml)
In IE8, for the following HTML, $('#myXML').html() returns null starting jquery-1.4. This used to return the contents of the <xml> tag in jquery-1.3. Any ideas, how do I get the contents of <xml> tag? Thanks. <html> <head> <title>Title</title> <script type="text/javascript" src="http://code.jquery.com/jquery-1.4.js"></script> </head> <body> <xml id='myXML'> <node><value>some.value</value></node> </xml> <body> </html>
Understanding jQuery.get()
Hello. I am pretty new to jQuery and AJAX in general, and I am trying to figure out how exactly the jQuery.get() function works. I am writing a web application that pulls some html data from a php script, updates a div with that data, and updates that div's scrollbar (using the tinyscrollbar plugin) to "fit" the new contents. Here is my code: $(".menu").click(function(){ var oldContent = $("#dyn").html(); $.get("populate.php", {name: cleanMeUp($(this).html())}, function(data, statusMsg){ //gets page
How duplicate textbox value to another with button in asp.net
I have a registration form and I woud like to make a button what after pressed some textboxe's value copied into some others. I can program it in C# but I would like to use jQuery to I dont have to postback it to the server. <body> <form id="form1" runat="server"> <div> <asp:Label ID="Label1" runat="server" Text="Name 1"></asp:Label> <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox><br/> <asp:Label ID="Label2" runat="server" Text="Address 1"></asp:Label>
Newbie to javascript, trying to learn..
I have been reading a lot about javascript and jquery and I have, in the past, successfully implimented plugins by copying, pasting, and then edited the prebuilt examples.. I am trying to learn a little more. I know the effect that I want, and have an idea of the logic behind it but I dont know enough of the syntax and the language to really get it. I have a little box of divs contained in "navBlock" div and the goal is to the change the color of all of the text inside of the "navBlock" div except
Remove object attribute
Hi guys/girls, I have an object created by: var obj = {}; obj.item1 = {}; obj.item2 = {}; obj.item3 = {}; obj.item4 = {}; I am wanting to remove one of the attributes. So I call $(obj).removeAttr('item1') This empties the attribute but the attribute still exists. Any pointers would be great! Here's the print out from chrome's js console obj Object item1: Object item2: Object item3: Object item4: Object __proto__: Object $(obj).removeAttr('item1') [ Object item1: "" item2: Object item3: Object item4: Object
Multiple var addition not updating properly
Hello. Sorry the code example might be a little long but it's repetitive and should be easy to understand. http://jsbin.com/eyeke4/13/edit My real code has 12 examples and not 3 but for the sake of this I had to shorten it as much as possible. When you go on there and preview it, you Select a level, then select a hero, then select 3 items and hit click me. This will give you a result of statistics. Now my problem is all the way on the right you will see all 3 values of AP are added together. In the
Does using delegate automatically unbind listeners when they are removed from the DOM?
I'm working on a photo gallery with pagination. As you go through pages, I'm removing and adding DOM elements. Using delegate would be great, but I don't know if the event listeners will be automatically removed when I destroy the dom nodes with listeners. I don't see anything in the documentation that says either way, and using undelegate everytime I change the dom kind of defeats the purpose of delegate. The reason for this question is this could be a huge memory leak if a user spent any amount
ajax
Hi, i have a simple question, i have started to use jquery in my website, and now i have a problem that i dont know how to resolve. from time to time i have to update the database where i have to insert in the database records about +-200 users where i create about 200k in total without db verifications, this operation takes 2hours, where i have to view what is the status for each user. Now im using popup's and when the script in the popup finish i use javascript to recall it with the next user,
Fancybox (Lightbox) - Last image not working.
Hi all I have this simple gallery that loads images from an xml file and uses Fancybox to display the images. Demo Everything is working but the last image is not working with fancybox. The last image just displays in it's own window. Can anyone see why the last image is not displaying with fancybox. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta
AJAX-Loading multiple elements by index
Hello I'm trying to load elements into a div via AJAX using the load() function. I have a bunch of div's with the same class in a remote file, and want to load the divs with the index of 3-6, (3,4,5,6). I am looking for a selector to get those elements, but can't find one suitable. At the moment my code looks as following: $('#main_wrap').load('portfolio.html .item:gt(2)');Are there a way to add a second selector lt(6) or in some other way get the result i seek?
Focus and Blur event on DIV element
Hi, I want to handle focus and blur events on any DIV element but don't know how? Any ideas? I tried this one: $('.myDIV').bind('focus',function(event){ // something }); but it doesn't work!
load function not working in IE 9
I use the load js function to load the navigation menu on most html websites I build. I use it on my website http://syntrixsolution.com. However with the release of IE 9 just recently, according to adobe browser labs the load function is not working. Is anyone else experiencing this problem? Don't tell me IE 9 is not going to allow this to work. It works fine in IE 6, 7 and 8. Any help appreciated. I use a mac so can't test properly as my VMware is running vista which doesn't allow IE9 to be installed.
Autocomplete: remote source + categorized items
Hello, I need to combine a remote source (database) with the categorized items. I have tried different ways but I'm a newbie in this matter and I'm confused with the code. Could anybody help with a line of code or a suggestion to understand this?, please: <script> $.widget( "custom.catcomplete", $.ui.autocomplete, { _renderMenu: function( ul, items ) { var self = this, currentCategory = ""; $.each( items, function( index, item ) { if ( item.category != currentCategory ) { ul.append( "<li class='ui-autocomplete-category'>"
AJAX get id
Hi, I would like to use ajax to load a html page and get the content of a specific div. Is it possible to do this? Thank you, Jerodev.
concerning table row selector
well , this code works for me , but there is something wrong , every time the function loads (every 2.5 seconds ) the html is loaded in row [0] cell[0] , and they are stacked above each other . what may be wrong there ? code : var searchtable=document.getElementById("searchtable") var resultscount=0 function resultfound() { searchtable.insertRow(resultscount) searchtable.rows[resultscount].insertCell(0) searchtable.rows[resultscount].cells[0].style.height=295+'px' searchtable.rows[resultscount].cells[0].style.width=625+'px'
.hover() wrong div fires!
Hey, I don't know if anyone can solve this problem or if there are any solution in jquery. Look at this fiddle: http://jsfiddle.net/CW7uF/9/ 1. Hover Main1 --> div2 expands 2. After that hover Main2 ---> then it jumps to Main 3 ---> kinda bad :( I know the problem. If I hover the second Main the first "subdiv" collaps....and then I'm over Main 3 and not over Main 2 anymore. That's why "Main 3" fires.....but is there a solution for this? Or a little trick I can use? Maybe there is a jquery pro who
Is it my jquery code or Internet Explorer that is wrong?
Hi, I have the following code to load an external page into a "holder" div on my main site. It works fine in Firefox but when a user views it in Internet Explorer 7 it seems to hang for a minute or two and then starts to work normally. Also when someone resizes the browser window the site seems to hang again. Is there something wrong with the code below or is it just the limitations of jquery/javascript in Internet Explorer? The basket.cfm loads content from a database and the loadMyBasket function
Unexpected Behaviour
var imgSize = $("#imagescroll ul li").size(); var divSize = $("#imagescroll").width(); var imgTotal = divSize * imgSize $("#imagescroll div b").html(imgSize); $("#imagescroll").width(imgTotal); $(".scroll").click( function() { $(this).removeClass("scroll"); $(this).animate({ marginLeft: '-='+divSize }, "slow" ); } ); My problem is, when the click function removes the class .scroll, it still scrolls even though it shouldn't able to locate the class that it should be applying the animation to? Anyone
Call Web Service with Ajax
I wrote the following code with Dreamweaver: // JavaScript Document function createSoapRequest(value1, value2){ var soapRequest = '<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:sap-com:document:sap:soap:functions:mc-style"> \ <soapenv:Header/> \ <soapenv:Body> \ <urn:ZSumWs> \ <Input1>' + value1 + '</Input1> \ <Input2>' + value2 + '</Input2> \ </urn:ZSumWs> \ </soapenv:Body> \ </soapenv:Envelope>'; return soapRequest;
Invalid Arument using Google Docs
I am using Tabs and have run into an issue only in IE and only with tab 2 and 3. It runs perfect in all other browsers but IE 8 causes an error. Webpage error details User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; WOW64; Trident/4.0; SU 3.27; GTB6.6; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; InfoPath.2; .NET CLR 1.1.4322; .NET CLR 3.5.30729; .NET4.0C; .NET CLR 3.0.30729) Timestamp: Sun, 20 Mar 2011 10:32:44 UTC Message: Invalid argument. Line: 23 Char: 286 Code: 0 URI: https://spreadsheets0.google.com/client/js/3221817329-trix_widgets.js
bug on animation during slide down useing slideDown, or .animate, theres no margins and it works on other pages
bug It works fine on my home page however on the page above the animation will jerk to finish after slide about halfway down. slide up works fine. also if i use animate the same results happen. if i use another effect with it in animate such as opacity in addition to slideToggle than it doesn't jump but the color will for a split second. any ideas why this is happening?
Next Page