Autocomplete problem with a large database
I am new to jQuery and I am trying to create an autocomplete textbox. When I use a small test database, it works fine but when I use my production database with over 3000 records, it slows to a crawl. It take >20 seconds to load the page and with each letter I type (even though I set minChars to 3), the browser times out asking if I want to continue running the script. My feeling is I need to use AJAX but I have never done that and don't know how to. I code in classic ASP with an Access database.
jQuery and .contentEditable
Hello, I'm trying to make my own small CMS system, but I'm facing the problem that I can't seem to set a div's contentEditable to "true"in jQuery. When I write this it works: document.getElementById("contentDiv").contentEditable = "true"; But I would like to write it all in jQuery, so I tried this: $("#contentDiv").contentEditable = "true"; That didn't work. I tried a few more possible functions but none of them worked. Is there a specific jQuery function for this? Regards, Bart
jquery after php include
Hi, First off all, JQuery is great! :D I use jquery to navigate through menus and load the related pages into a target div. So, onclick of the menu, is calling a php to do an include of the html page that I want. Inside that included html, it has some more jquery functions related to images and so on... Everything is good with IE7/8 and Chrome but with Firefox, the jquery functions are not working... I've made a test page for you to help (pleeeeaaase): http://www.altersorte.com/test
Internet explorer 7 behavior - add option to the select onclick of the same select.
hello, I am trying to append an option dynamically to select onclick of itself as in following code. On Firefox it works fine. When clicked on select, it momentarily shows 2 options and it appends the new option. But in Internet explorer 7, onclick of select, the list is collapsed. When clicked again, it shows the 3rd option appended. The firefox doesnt do the select collapse. I want to have the same behavior in IE7. Is something missing? TIA, Vipul Code: <head> <script> var done = false; $(document).ready(function(){
jQuery :: How to get Ajax readyStates?
Hi all, I have some problems with getting jquery $.ajax(); readyStates value. I used this: var xhr, jqXHR; xhr = $.ajax({ url: ajaxurl, cache: false, beforeSend: function(jqXHR){ jqXHR.onreadystatechange=stateChanged(); }, success: function(html){ //some codes.. } }); function stateChanged() { alert(xhr); alert(xhr.ReadyState); alert( jqXHR.ReadyState); }stateChanged function always return undefined. Can Anybody help me? Thank you Bahram0110
Code design
Hi, I wonder if it is necessary to first check if an element exists before manipulate it? For example: if ( $('#item_123').length === 1 ) { $('#item_123').remove(); } Or can you simple use whether the item actually exist or not? $('#item_123').remove(); I know it both works, but what is the proper way to go? Christophe http://www.opera.com/
Problem with Clone()
Hey JPeople, I am trying to clone an <img> when i hover a mouse over it..code goes like this.. function onHover(sender) { var targetObj = $("#"+sender.id).clone(); $("#"+targetObj.id).width = "550"; // targetObj.id is undefined. } Now the problem is that i am getting the above message when i debug the application...Can anyone help me out.....It seems that JQuery cannot get the id somehow....
2 Newbie questions
Hey there, first of all i want to thank anyone that answers my question. The first one is JQuery related. I am wondering,can someone explain me what this does, and whats the syntax of it? $("a").click(function () { $("div").fadeIn(3000, function () { $("div").fadeIn(100); }); }); I dont understand what that second function does :/ I this case i would use mouseover().fadeIn(3000) and then onother one mouseout(fadeOut(100). Thats why i am not getting and how to use it. Second one,do you know any site
find and replace an email...
Hi all, I was wondering if its possible to use jQuery to find and remove/replace an email address from a textarea input either before the form is submitted or after? Examples or suggestions? Thanks in advance Dimitris
Refresh mouse graph
I am changing css cursor of a div, but the change is only visible when mouse moves, ¿How can I force refresh mouse graph?
problem with jquery window/iframe !!
hello...I have problem with jquery window..... I wanto include inputform into footer content and make it post using jquery or ajax but I always failed.... here is link of my site my site link here is jquery to post $(document).ready(function() { $('#myForm').submit(function() { $.ajax({ type: 'POST', url: $(this).attr('action'), data: $(this).serialize(), success: function(data) { $('#result').html(data);setInterval(this,2000);document.myForm.reset();
[jQuery] Filter list, not table
I have found many nice filter plugins, that let you filter a table, and hide the rest of the items, and only show the item that matches what was entered into an input dialog. What I would like to do, is use an unordered list instead. Is there any plugins that support this? I have not been able to find any..
how to stop regular form POST if jquery is working.
<form id="mybasketform-add" method="post" action="<?= site_url('mybasket/add') ?>"> <input type="text" name="productID" id="productID"> <input type="text" name="quantity" id="quantity"> <input type="submit" value="Add to basket" id="add"> </form> I'm trying to write an app that degrades if jquery is not supported. For example I've got the snippet above. Which works fine via regular post (when I have no jquery) but the problem is that when
post() to variable URL
I am a newbie to JQuery. I have managed to get a lot of what I want working but this one has me stumped so any help would be appreciated. In my Symfony project I have a form that loads a new data table into a div based on a url (actually the route to a symfony partial/action) with the parameters for the query serialized() with the post. Now I want to be able to change the same area to display graphs so I need to post the same information but to a different url. My script looks like; $(document).ready(function(){
How to reset first position before using animate left
Hi, i'm really new for jquery, i search over the internet about jquery, and start to learn. My problem maybe seems silly, I want to make 3 panel that functionally like we browse files in mac. I already suceed made 2 panel, the problem is, at the first load, the second panel already shown. I want it keep hide, until people clicked the button. This what i have, (please click the home text) http://gemvisual.com/exp/ This the complete script <html> <head> <style type="text/css" media="screen"> html,
Before unload for Elements
Hi all, Any body know for beforeunload for event (div-unload).Not for window or document. Thanks by M.Maheshrajkumar.
Setting a jQuery event on a specific hyperlink for onClick.
I have a specific hyperlink defined like this: <a id="shesaid" href="">Click to read more...</a> What I want to do is set up an event so that when a user clicks the hyperlink I can do some jQuery work on the page. How can this be done in jQuery? Thank you!
strange problem.. remove()append options to listbox is not visible on screen until I mouse over the listbox.. .?
Internet explorer 8 windows 7 classic asp page problem does not exist in firefox. when i do a remove().append to add options.. I cannot see my changes until i run mouse over the listbox?? thanks
How to open an entry in an Accordion Menu using a Link?
Hello, i have a website where i have on the left side a button menu and on the right side an accordion menu. how can i get it to work, that when a user clicks on a button in the left menu, the associated entry in the accordion menu will open? thanks in advance.
$.get and rebinding
Hi, so I have the same problem that gazillions of other users seem to have: I cannot figure out how to rebind an event after an AJAX-call. I have a page (let's call it "name.php") with an ordinary HTML <select name="lastname" onChange="nameChanged(this);"> dropdown. The function nameChanged() itself does an AJAX call (simplified like this): function nameChanged(currentElement) { // alert ('test'); $.get('doSomething.php', { 'last_name': currentElement.value }, function(data){
JS functions help required
Hi, Can someone tell me if the last 4 lines of the script below need anything more added to them? Related to these functions, the superfish module page in Joomla has identical baloon messages while hovering over functions that all say " callback function fires when Superfish is initialized : 'this' is the containing UL. ??? and there is a form window to add in something but I don;t have a clue as to what I should put in there. My question is what if anything should be added and where does it go?
error in $.cookies
$.cookie is not a function error has arrive when i run such code including cookies file. $(document).ready(function () { /*-------------Language Control Star-------------------*/ var lang = $.cookie('language'); if (lang == null) { var date = new Date(); date.setTime(date.getTime() + (60 * 60 * 1000)); $.cookie('language', $("#<%=ddlLanguage.ClientID%>").val(), { expires: date }); } else {
Question
Hello everyone, Maybe it's a dumb question, but I've stumbled at this and can't seem to find the answer. I have the following code: var pager = { $btnNext: false, // here "this" points to the "pager" object init: function(id){ this.$btnNext=$('.next',$('#'+id);); // find a button this.$btnNext.click(this.next); // register the object's "next()" method as a handler to the "click" event }, // here "this" points to the button next: function(){ // I need
Calendar Position
Hello everyone, I am using JQuery V. 1.3.1 If a date field is on the top of the page, the calendar shows up correctly right near the date field. But if the date field is set to the bottom of the page, the calendar appears somewhere in the middle of the page, which I have to scroll the page up to see the calendar. Please direct me how to solve this problem. Thank you very much!
Cascading toggles
I figured out the toggle thing, starting with two pictures showing, clicking on one to hide the next. Code below. However, I want to start with one picture and click that to show the second. And then I want to be able to click the second to show a third and so on, ending with a link after clicking the last picture. How do I do this? <html> <head> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript"> $(document).ready(function(){ $("button").click(function(){
.ajax fires both the error and success events
I'm very confused by an odd behaviour on my staging server. I have this code: $('#pdf-link-exists').hide(); $('#pdf-link-missing').hide(); $.ajax({ url: 'http://www.domain.com/theme/company-one/files/procedure_standard_1234567.pdf', type: 'HEAD', error: function(jqXHR, textStatus, errorThrown){ $('#pdf-link-missing').show(); }, success: function(data, textStatus, jqXHR){ $('#pdf-link-exists').show(); } }); It should be checking to see if a files was created
[jQuery] $.post array
Hi there I'm trying to send some data to a server side function via $.post My code looks like this: $.post("ajax.php", {page:"mypage.php", action:"functionName", params:["param1", "param2"]}); Basically ajax.php does an include of mypage.php and calls the functionName(), passing the array of params. The problem I'm having is that when I have more than one value in the params array, the data is not sent correctly. In FireBug the XMLHttpRequest being generated from the above code is <pre selected="true"
[jQuery] $(document).ready with ajax
I am loading a page with severl jquery events on one of the divs. Depending on interaction with the user, the div triggering the jquery events could be reloaded from an ajax call. But as it stands now, new content that is added to the dom is not triggering the code in the original $(document).ready() supplied in the head. If I want the page to set up those events again, I have to reimport the js file containing my jquery events (this causes to copies to exist in the dom. Is there a way to force the
Submiting form after animation
Hello I have a small problem with a form. After i click on a submit button a small animation starts, i would like to submit form after animation but nothing is working. I tried different methods and i also checked html for errors. Code of function: $(document).ready(function(){ $("#button").click(function() { var productX = $("#first").offset().left; var productY = $("#first").offset().top; var basketX = $("#basket").offset().left+15; var
Scrolling Content ?
Scrolling Page Hi all I have this Demo where the nav on the side scrolls the div containing the content It works ok but the the first yellow div flashs up when the scrolling is upwards From One to Two and One to Three the scrolling is fine. From Three to One there is a flash of the first yellow div. Can anyone help with this it's driving me mad. Any help would be greatly appreciated. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html
Help: .bind function
<html xmlns="http://www.w3.org/1999/xhtml"> <head> <title></title> <script src="jQuery/jquery.js" type="text/javascript"></script> <script type="text/javascript"> $('#test').bind('load',function () { alert('Hello'); }); </script> </head> <body> <div id="test"></div> </body> </html> Why message Hello don't display? How can bind an event after loading <div id="test"> element? Thanks a lot.
How to add an attribute like mouseover="hm(this,'la1',5)" to an element using .live()?
Hi, I quite like the fact that you may add through JQuery an attribute like alt or title to an element. And I can see that you may also add mouseover using $('#aa').mouseover(function(){//does something in here}); HOWEVER, I want to be able to pass some very specific values too and that's where I'm stuck for an answer. Suppose I want to attach the following mouseover="hm(this,'la1',5)" attribute to an <a> tag. How do I do this by using exactly those values inside the "hm(this,'la1',5)" ? Thanks for
Groupon Clone
How can do seo? for our website? by Mr. Groupon Clone
Problem using jQuery in Internet Explorer 7
Well, while you position jquery as a cross-browser framework, I experience severe problems using this framework in Internet Explorer. To be more specific, let's say I have this function: function clear_block_contents() { $('#pTitle').empty(); $('#pageText').empty(); } It works perfectly in all browsers, even in IE8. Except for IE7 which reports that there is no such element, although I do have an element with the ID 'pTitle' and 'pageText'. The other problem. Look at this function: function
siblings question
$('img').each(function() { // define var $imgHover = $(this).attr('imgHover'), // swap image name, already gave by php $imgOut = $(this).attr('imgOut'); // origin image source $(this).data('isClicked', false); // click function $(this).click(function() { $(this) .data('isClicked', true) .siblings() .data('isClicked', false); // here is the question I want to ask // I need to get each attribute to change each image // can I catch each attribute when using siblings? // and then I can do this function
Selecting only within a generated DIV?
I've got a hidden template div that contains an <LI> that is cloned and added to an <UL> on the fly. The cloned <LI> items have placeholder IDs. What I want to do is find all the IDs *within the cloned <LI>* that has a defined string in it (and then replace that string with the proper index, etc.) So, for example, here's the HTML of the template: <DIV id='thisLineRowTemplate' style="display:none"> <LI class='arrow' id='thisLineTemplateLI'> <a href='#ex_EXNUMBER'> <DIV class='LABELCLASS
How can i call common events method first
if we does the click event on any of the Entity it should call userdefined method or event then the general event example this code calls $(window).click(function(){ alert("I am supposed to be called first"); }); $("#div1").click(fucntion(){ alert("I am suppose to be called next"); }); $("#div2").click(fucntion(){ alert("I am suppose to be called next"); }); $("#div3").click(fucntion(){ alert("I am suppose to be called next"); }); recieving out put as I am suppose
$(".classname").click(); not working on IE nor Chrome
Hello, I need a webpage with a lot of input:text and select:option. each modification on an element must be immediately validated through ajax. for this reason, the best choice i've found is to add a form element around each box. and use the classname of the input:submit button to identify the form instead of the ID of the form. the submit button is hidden so the default choice to validate the form is to press enter after modification in the cell. however, as it works perfectly in FF and Opera, nothing
stuttering when using load() and change() happens after next setInterval()
hello, i have 2 problems. this is the code: setInterval(function(){ $('#responsecontainer').load('response.php').change(); }, 30000);After the load the change() triggers a live event! The loaded content are some div's with id's and content. Within the change() trigger i grab the data from those div's and put them into another div when a certain criteria is accomplished. The problem is that when the change() trigger grabs the content they are empty untill the next load(). Here the change() trigger:
How do I select an <a> tag by it's src?
How do I select an <a> tag by it's href?
Next Page