jquery

JS to update the window Location with a URL not a HASH

Hello, I'm building a web app for Sign In / Registration etc, and do not want the page to have to refresh. www.mysite.com I know how to set a hash on the URL without refreshing the page: location.hash to give: www.mysite.com/#signin But what I want: www.mysite.com/signin Without the hash so it's SEO friendly. Also, once I set tha...

jQuery .contentWindow.document.getElementById('email_box').value help

Hey all, i'm just wondering if there was any way to condense this line of code to pure jQuery without having the need to have ".contentWindow.document.getElementById('email_box').value" in there? $('#OIPHPFrame')[0].contentWindow.document.getElementById('email_box').value = $("#txtEmail").val(); and also the "click" event: $('#OIPH...

jQuery datatables - fnGetHiddenNodes() example

Hello, I'm using jQuery datatables plug-in on my HTML Table. I wanted to know how do I go about using the fnGetHiddenNodes() function to extract a particular row from my table. More specifically, I've this as one of the columns tr td align="center" input type="checkbox" id="caseConsent(index)" name="caseConsent" input type="hidde...

[jQuery] AJAX requests and THIS

I'm having a little problem when trying to target an A tag inside a $('div').fadeOut() callback. I got this $('.anchor').click(function() { $('#div').fadeOut(null, showDiv); $('#div').fadeIn(); return false; }); showDiv is an AJAX request which I use $(this) inside it trying to refer to the A tag clicked but I noticed tha...

IE8 not animating jQuery menu properly

Hi all I am having a real headache. I have written a small and simple menu which employs simple animation (fade in/fade out) powered by jQuery. My issue is that the animation, when bviewed in ie8 looks awful - while the animation is running big ugly black borders are visible around the text (take a look at the link below you will see w...

Getting extra data from server along with POST request

So I've got some pagination working, but there's a variable I need access to (total pages). When I get the data to display in the table from changing the page (or otherwise updating the table), what's a good way to get the variable in the same request? ...

Displaying tooltips on HTML <option> tags

Either using plain HTML or jQuery assisted JavaScript, how do you display tooltips on individual <option> elements to aid the decision process (there is not enough room for a different kind of control and some help will be needed). Can this be done though a plugin or similar? I have tried a few tooltip plugins for jQuery with no succes...

jQuery Best Practises for HTML Element creation in a specific example

Is there a better way to write the following so that: a) fewer variables are used that may causes name collisions? b) the code is smaller and more maintainable, especially on the line beginning "var $safesurf = $( ' ')" onwards? var $ratings = [ { group: 'SS~~001', name: 'Profanity', levels: { 'S...

Client-side javascript to support promises, futures, etc.

I'm really interested in implementing Promises and related features in client-side Javascript. From what I've seen, the focus in implementing these technologies in Javascript seems to be on server-side javascript (SSJS) with Promises in CommonJS. Ideally for me, I would find a solution that works well with jQuery or Google Closure Librar...

Show "Please wait" modal while function runs

Hi. I'm trying to add a jQuery UI modal dialog to show when a function starts, which says "Please wait". Then have it close when the function is done. I've tried the following: function flashFallback(){ $('#dialog').dialog({ modal:true, autoOpen:false }); $("#dialog").dialog("open"); /* Other code goes here... */ ...

Trouble with 2 session_id()'s on my site - PHP/Jquery.

I'm trying to build a site that runs without refreshes, using Jquery and PHP to populate divs that slide in/out. basics work OK, but I am having trouble passing session values around. I have a login panel first that captures "$user" in PHP and then stores is as a session variable $_SESSION['user']. I can then use it on the first page...

Loop through json object and catch variables on the fly (jquery)

Using jQuery I get JSON object that extracts one row from database. That row has about 30 columns so along with row data, success message (success = true) JSON result returns array with table columns (ex: id, name, address, etc) called table_columns. The purpose is to place all the returned data into the relevant html form fields (for e...

jquery select element based on background image name

I'm trying to select a div with a certain background image this is what I have so far. Not working. Any ideas of what I'm doing wrong? I'm trying to follow the jQuery documentation. var markerShadow0 = $("div[background-image='url(\"http://www.axtsweapons.com/gmarkers/markershadowA.png\")]"); ...

Is it possible to close prettyphoto modal inside iframe?

I'm using prettyphoto jquery plugin for lightbox. When somebody clicks on a link it opens a lightbox iframe. Inside the iframe there is button that should close the lightbox. in documentation there is a code: $.prettyPhoto.close(); But don't how to use it properly. So I ask how to close a lightbox inside iframe. ...

Remove LI from UL on click using jQuery

So I have a INPUT TEXT that upon keypress=enter prepends an LI to an UL The LI contains a LINK that gives the user the option to remove it from the UL HTML (on page load) <ul id="conditionList"></ul> after ther user inputs some conditions, the UL gets populated with LI <li>condition<a href="#" class="clearitem">x</a></li> However...

dynamically resize images w/ jquery

I'm using a script that uses DD's Ultimate Fade-in Slideshow: http://www.dynamicdrive.com/dynamicindex14/fadeinslideshow.htm It uses jquery, and I would like to resize the images to the slideshow size. Thanks! ...

INVALID_CHARACTER_ERR: with autocomplete jquery plugin

INVALID_CHARACTER_ERR: DOM Exception 5: An invalid or illegal character was specified, such as in an XML name. I am getting this above error in my web inspector when I type anything in autocomplete text box. This error is specific to Safari ( with IE 7 as user agent ) and also on IE 7 / 8 $( '#fieldName' ).autocomplete( url, { wid...

Why does Jquery ajax add slashes to String?

Possible Duplicate: jQuery: How to stop AJAX function escaping JSON string used to POST data I make a jQUERY ajax call to send and save to data.When I send Google's Dog string, I receive Google\'s Dog . What is the reason of this . And what is the best way yo avoid this. I do not want to use stripslashes function because this ...

Classic ASP - How to pass a variable instead querystring (refresh) via Jquery(no refresh)

Hello , i'm working on this application that has a calendar on a page that has a lot of request.form("var") inside. This is a monthly calendar and it has on the top previous month and next month . When i click now on next month i get an URL like: ?date=8/14/2010 My question is how to pass this value to the calendar via jquery with no pa...

Can I apply shorthand css to elements using jQuery's .css() method?

I'm trying to apply unknown styles to unknown selectors and it would seem that shorthand css cannot be applied using jQuery's .css() method. Is this correct? Is there a work-around? Note that I am building the object dynamically to be passed in to the .css() and do not want to use .css('background','#000') syntax. $('#example').css({ba...