jquery

Make <tr> to act like <a>

I have a table and I want every row to be clickable. Right now, I'm doing the simple: $('tr').click(...) This works for the most part but how can I make it act like a link in these ways: Shift-click opens the target in a new window Middle clicking opens the target in a new tab Hovering shows the link address in the status bar ...

Showing a loading image on page refresh

I have a javascript snippet that forces a page reload using .reload(true) once someone clicks on a particular link. How can I show a simple "loading" image while the page refresh is taking place? (Already using jquery on the page if that helps) ...

Jquery UI - Getting one element out of a display:hidden element when dragging

I have a group of elements sitting on a 'conveyor' element within another element that is set overflow:hidden using css. How do I, when dragging, get the element 'out' of the holder element that has overflow set to hidden? When I drag the "item" classed image, it only drags within the holder, when I try to move it "outside" the holder, i...

How to send and recieve an ajax request with jQuery?

I am new to jquery and am having trouble following the documentation. I have a variable in javascript (that I already obtained from an html form) that I would like to send using AJAX to the server. I want to the server to do whatever it needs to do with that value and then reply with either "success" or "failure" (I know how to do the b...

Get attribute values as array from selection of elements using jQuery

I have the following using jQuery: var x = $('.boxes > input:checked'); From x I am trying to retrieve an array of id values and have been unable to work out how to do this. Something like: var y = x[id]; // y becomes an array like ['1', '2', '3'] assuming // that x had 3 checkboxes with id's of 1, 2, 3 etc. ...

how to check for current date and time in Jquery

Just wondering if there was a way to check the current date and time in Jquery. ...

jquery ajax image

Hi all, I am sending an ajax request on dblick for creating the image of the screen where it is double clicked.I am ising imagegrabscreen() function of PHP to create image but instead of creating its image it is creates a black image. dblclick(function (ev,ui) { var response = $.ajax({ ty...

Post SELECT element value

Hi! I use jquery to post data to mysql. **In settings.php i have this short JS code:** $("form#submit").submit(function() { var fname = $('#fname').attr('value'); var lname = $('#lname').attr('value'); $.ajax({ type: "POST", url: "settings.php", data: "fname="+ fname +"& lname="+ lname, success: function(){...

jQuery / Dynatree: How to use Json or ul/li together with IFrame sample

Hi I'm a newbie with dynatree, but happy that i've found this supercool plugin. On the dynatree site, I've found an example how to use it with IFrames http://wwwendt.de/tech/dynatree/doc/sample-iframe.html I was able to adapt the IFrame example successfully. But i'm a bit stuck here, because I'd like to load the tree either via UL/LI o...

Replace value inside brackets using RegEx only where does not match

How can I replace the number inside the brackets for any strings not matching the word "Field". So the number inside 'SomethingElse' and 'SomethingMore' could be replaced to a new value, but any bracketed value to the right side of the term 'Field' would not be touched. Note, the word "Field" will always stay the same, so it can be ref...

Jquery Load function issue in IE6

i am using IE6 as a browser and when i call upon a local HTML file as an overlay by using Load function it loads the page but, following things happens 1: shows a loading status bar all the time 2: All the javascript in the called page(overlay) stopped working. this is the call code $("#mainoverlay").load("card1.html"); ...

In what ways is dhtmlxtabbar different from jQuery UI tabs?

Has anybody here tried using dhtmlxtabbar? I was wondering whether someone has already compared those two libraries and can give a good comparison on the ease of use, using it in combo with other JavaScript libraries, browser quirks, etc. One obvious difference is the licenses being used because dhtmlx has commercial and enterprise lice...

POST and Get in the same Ajax request

I am using a ajax post in my application like $.ajax({ type: "POST", url: "http://localhost/FormBuilder/index.php/forms/saveForm/"+user_id, data: "formname="+formname+"&status="+status, success: function(msg){ // alert( "Data Saved: " + msg); }//success });//ajax In the above ajax post i am saving the Form with the user...

how to get the value of a checked checkbox

I have a form like below: <form id="toppings_div" name="form1" method="post" action=""> <table width="355"> <tr> <td> <input type="checkbox" value="Cheese" /> <label>Extra chees...

How to blur the div element?

I have a dropdown menu inside a DIV. I want the dropdown to be hide when user click anywhere else. $('div').blur(function() { $(this).hide(); } is not working. I know .blur works only with <a> but in this case what is the simplest solution? ...

Html file upload preview by Javascript

I want to show a PREVIEW kind of thing for an post , so took details by JS but problem comes when it comes to <input type="file" , it's not giving full path to the file Ex: if I do $("#image").val(); it only give "Sunset.jpg" not C:\Documents and Settings\All Users....\Sunset.jpg any idea how to get that detail value? ...

Jquery custom carousel throwing error (only in IE) after certain amount of loops

Got these functions which are just part of simple slideshow. After some 100 repeats it throws an Stack overflow (IE6) or out of memory (IE 7-8)... Don't see anything wrong here really...Any ideas? function show($itemNumber) { $("#mainImage").stop(); $("#mainImage").fadeOut(fadingSpeed, function() { ...

addClass every nth

I have a list of elements that I want to style in 3 different ways. I want every 3rd list item to have the same class throughout the whole list. For example: <li class="A">Some Content</li> <li class="B">Some Content</li> <li class="C">Some Content</li> <li class="A">Some Content</li> <li class="B">Some Content</li> <li class="C">Some...

Can jquery ajax post return more then 1 variable?

I am trying to do a comment system with jquery and ajax, sometimes I require a user to enter a captcha image when they are posting too often. I am using the facebox plugin for jquery with is a popup type dialog box, I am triggering this box to open, when the backend script tells it that the user needs to enter a captcha, it then pops ...

jquery java script

how to write the following code $(function() { $('#datetime').datepicker({duration: '',showTime: true,constrainInput: false}); }); in javascript onclick() help me please Thanks ...