jquery

jQuery DatePick Populating Input - Multiple Clicks Issue

So, the latest dilemma I am facing: I am using jQuery DatePick (not DatePicker) to select dates and populate an input field with these dates. The problem is that the input field will get filled every time I click a date. Therefore, if I click the 23rd, then click it again to DEselect it, it automatically gets added to the input (and th...

Using JQuery AJAX to grab some data from the Database and print them out according to each DIV ID

Hi all, I was trying to grab some data from the database using JQuery AJAx, and print the data to the DIV with a unique ID. I got two DIV tags like this: <div id="1" class="myClass"> The content for texting1 is : $printing result from the Test Table which id=1 </div> <div id="2" class="myClass"> The content for texting2 is : $printin...

Making these arrows scroll? jquery & html

I am trying to create a little filmstrip with images. I want to be able to scroll horizontally to view all of the images. I have: <div class="gallery"> <div class="back" style="opacity: 0.6;"></div> <div class="thumbs"> <ul class="ad-thumb-list"> <li> <img id="thumb01" src="../jpeg/t...

Preventing a table's headers from being sortable using JQuery Sortable plug-In

I have an HTML table: <table id="HatedByCSSOnlyGoons"> <tr><td>Header 1</td><td>Header 2</td></tr> <tr><td>Data</td><td>Data</td></tr> <tr><td>Data</td><td>Data</td></tr> </table> and I'm applying the JQuery Sortable plug-In: <script language="javascript"> $(document).ready( function() { $("#HatedByC...

jquery ui tab appending content when reloaded

Hi, I have a jquery ui tab that gets loaded via ajax and remote page: <div id="tabs" style="width:1200px" class="ui-tabs"> <ul> <li><a href="/bugs/loadTab1">View</a></li> <li><a href="#tabs-2">Add Bug/Request</a></li> </ul>... <script type="text/javascript"> jQuery(function($) { $('#tabs').tabs({ ...

Moving the page

I need to move the page from top to bottom, just like it happens in the best site of the world( stackoverflow), when we change the type of sorting of our questions, it moves the page. How can I get such an effect? I even don't know how to search for information about it, because don't know the keywords, so I decided to ask here :/ Than...

Trouble with simpletips and loading dynamic content

Hi all, I'm trying to use simpletip to generate dynamic tooltips from a database. I am working from this example, which works fine. It's using an image name (the image you hover over) as the key to pass to the PHP for querying the database. $('.exampleselector').simpletip({ content:'<img src=".." alt="loading" style="margin:10px;" ...

Jquery Fancybox Error

I've been updating a site and have used the fancybox plug in to display dynamic information data. Works great in every browser apart from IE, where i get 'object doesnt support this property or method' errors. I cant figure out why, it's driving me nuts. has anyone else expereinced this with IE? Any hints/tips? I'm using this funct...

jquery ajax call fails ie7

Hi I have the following function, which works in Firefox but not IE7: function flagDocRead(currentdocid, currentuserid){ alert(currentdocid); alert(currentuserid); $.get("./blocks/rc_importantdocs/flagdocread.php",{ docid: currentdocid, userid: currentuserid }); } currentdocid and currentuserid are both integers. IE7 ...

What's the best way to attach Javascript events to a list of AJAX-loaded search results?

I have a search page that loads results. Each row has a 'Delete' button next to it which I want to fire a particular Javascript function on my page using some parameters specific to that row. Is it best to put the function call directly into the HTML being generated, e.g. onclick="deleteFunc(<params from results array>);" or should I i...

How to escape & in a POST request in jQuery?

Hi, i have an input element with & in value: <input type="checkbox" value="Biografie, životopisy, osudy, Domácí rock&amp;pop" /> When i try sending it through an ajax request: $.ajax({ type: "POST", url: "/admin/kategorie/add/link.json", data: "id="+id+"&value="+value+"&type="+type, error: function(){alert('Chyba! Rel...

Browser doesn't stop loading with jQuery $.get

I use the following jQuery (1.4) code to test whether cookies are accepted: $.get("http://localhost:8080/cookietester/cookietester", function(data) { if (data == "false") document.write("Activate cookies!"); else if(data == "true") document.write("ok"); }); But the browser signals that it doesn't stop page load...

How to enable/Disable textbox. and also make text box blank on change of value in the drop down list

Hi Users, I am using jquery to do enable/disable operation. <script type="text/javascript"> $(document).ready(function() { $("#ddlUser").change(function() { var selectedValue = $(this)[0].value; if (selectedValue == "--Select User--") { $("#txtUserName").removeAttr...

How to pass data from a jquery dialog back to a controller's action to update the dialog

Hi, I am using asp.net MVC, and we're using the jquery dialog (http://jqueryui.com/demos/dialog/) so that while a user is creating a new order, they can look up books via this overlay, and the overlay will return the ID of the book to an action which will add it to the order. We're able to display a list of books in the overlay, but ho...

How do you set or remove generated label styles from the jQuery Validation plugin?

This is probably something simple I'm just missing from the documentation and examples, but I'm trying to remove a style from the generated label that appears when a field is invalid. This is what I'm getting for a generated label: <label style="display: inline;" class="error" generated="true" for="FirstName"> What I want is: <la...

Could a CSRF attack have any direct way of accessing or manipulating its target site's javascript variables?

Does it open any attack vector if an ajax-driven site uses a unique token stored as a javascript variable and verifies it with every request to prevent CSRF -- provided that the site is free from XSS holes? ...

Inject JavaScript with jQuery at runtime into WebBrowser

I have desktop application with WebBrowser control and try to inject JavaScript into loaded page. For this I added two script elements: private static void AddJQueryElement(HtmlElement head) { HtmlElement scriptEl = head.Document.CreateElement("script"); IHTMLScriptElement jQueryElement = (IHTMLSc...

Miro like Jquery Div Switcher.

I have been searching for a Jquery div switcher like the one on http://getmiro.com. When you roll over the buttons (below the green download button) the slides change, but you can also follow your cursor over the slide. Also I want to go to a default slide when you are on none of the buttons. Any referrals? Thank you. ...

jQuery selector performance

Why is id selector faster than class selector in jQuery? ...

Is there a way to send form when element outside of form is clicked?

As title says, is there a way to send form when element outside of form is clicked? Plus, is it available without using form associated (button/input etc.) elements? As example, can form be submitted when div is clicked? ...