jquery

Using jQuery's $.post to log in?

Is it possible to use jQuery's $.post function and have the cookies set in the browser? I'm trying to set it up so that it is possible for my users to be automatically logged in to a certain site by sending POST variables. ...

A nonce for each function or one for all AJAX calls?

I'm using nonces as WordPress uses them. It's an extra security measure, a hash that is being sent to the server that changes within ever few hours. If that hash is not there, the request is invalidated. The page I am working on has many AJAX calls (about 20 or so). Right now, I have a difference unique nonce for each one. Is that nece...

'length' is null or not an object? IE 8

Hey guys quick question I get the following error 'length is null or not an object' in IE 8, anyone have any ideas? Feedback greatly appreciated... function refresh() { $.getJSON(files+"handler.php?action=view&load=update&time="+lastTimeInterval+"&username="+username+"&topic_id="+topic_id+"&t=" + (new Date()), function(json) { if(j...

Best way to parse this XML with jQuery

<?xml version="1.0" encoding="UTF-8" ?> <BMC_Impact_Manager version="1.0"> <IMPACT_EVENT> <EVENT> <date_reception>1279568162</date_reception> </EVENT> <EVENT> <date_reception>1279568162</date_reception> </EVENT> <EVENT> <date_reception>1279568102</date_reception> </EVENT> <EVENT> <date_reception>12795...

how to pass array value from model to jquery datepicker?

Hi Jon, I am trying to highlight days on the calendar. The highlighted days are from the view model(IEnumerable type). My code is as follows: <script type="text/javascript"> var datesArray = new Array(); for (var item in Model) { datesArray[datesArray.length] = "<%= item.PerformanceDate.Day %>"; } $(document).ready(funct...

Handle two events on button click

Hello, I am a bit new to the asp.net/jQuery game, and I seem to be having difficulty. I am using colorbox to make a modal window popup, and I want an upload picture form on that modal window. I have a button to open up the add photo form: <a href="#" class="addpicture">Add/Edit picture(s)</a><br /> <script> $(document).ready(...

Create a 'send to Delicious' bookmarklet with custom tag

Hi, I've created a javascript bookmarklet that gets the current page's title and URL, using the following code: //Check to see if jQuery is already loaded if (typeof jQuery == 'undefined') { var jQ = document.createElement('script'); jQ.type = 'text/javascript'; jQ.onload=runthis; jQ.src = 'http://ajax.googleapis.com/aja...

Make disappear after X seconds, if no movement? Jquery/Ipad

I know what code to use to make something wait X seconds before fading out... $('div#extras').delay(800).fadeOut(3000); But this is for the ipad, & I would like it to only fade out if the user has not moved or touched anything for about 2 seconds or so. I can't exactly use onmousemove with this.. Any ideas? For anyone interested.. ...

How to display/sort specific divs based on user choice.

Sorry if the title doesn't accurately describe what I'm trying to do. I'm a novice at all this to say the least! To help you understand what I'm trying to accomplish please read the example below. I have a list of divs, each of which may have a series of "tags" as I'll call them. For this example I'll use Red, Blue, and Green as the pos...

event on tab deselect in jquery ui tabs

Hi I m using jquery ui tabs 1.8.1 I want to bind an event or a script to run when a tab gets deselected and any other tab is selected for eg. if i have four tabs and tab four is selected when i select tab 1 or tab 2 then a event should run such that i can stop any timers running in tab 4 Another question related is if i m running an...

My jquery code for the hijacked iframe image upload is working in FF, not Safari. Any ideas?

Can anyone see why this would work in FF but not Safari? When I alert the return from my CF script that processes the image and returns the image name it works in FF. No go in Safari... $( "#uploadform" ).submit(function( objEvent ){ //alert("Submit"); var jThis = $( this ); var strName = ("u...

JQTouch won't play linked mp3 files

I'm trying to use JQTouch to make a basic mobile site to play a list of audio files. I'm trying to make a simple playlist of tracks to be used in an art exhibit here at school. Sort of like those walking tours you may have seen. When I link to an mp3 file in an unordered list the browser doesn't open the file and start playing it. It sim...

Using Jcrop with Colorbox

Ok, now I really feel like a moron, but for some reason I can't get jcrop on a picture that is in a colorbox modal window. Here's the code: <head runat="server"> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.0/jquery.min.js"&gt;&lt;/script&gt; <script src="Scripts/jquery.colorbox.js" typ...

jquery easing graphs

Just found the illustration (graphical) of jQuery Easing plugin http://james.padolsey.com/demos/jquery/easing/ What does these graphs exactly represent. I tried to work/analyze the Easing Plugin several times, but I never understand how it really functions Can someone explain me how to figure it out ...

How to return 2 values from a text link using shadowbox to parent page form

I have a form where i need to put 2 values that will be selected from a shadowbox modal window. the problem im having is it will be a list of probably HUNDREDS of values listed and paginated. how can i return 2 values with a single click without using forms? parent page: <input name="id" type="hidden" value="" /> <input name="data" t...

preload="true" hyperlinks

Is there a method, javascript script or anything that could allow to preload hyperlinks in the page? For instance, I want that when user comes to http://ahostel.lt/ and the page fully loads, the script would start preloading other pages in the navigation (Booking, Map, Facilities, Look around, [...]). So when user clicks on any of those ...

Only Perform Action Once in jQuery

I am using jQuery UI and trying to disable all text boxes in a data group, but only do so once per loading of the tabs. Here is what I have so far: $(function () { $("#tabs").tabs({ cache: true, load: function (event, ui) { $(".data-group").one('load', function () { $(...

What is the jquery equivalent to: document.forms[0].elements[i].value;

What is the jquery equivalent to: document.forms[0].elements[i].value; I don't know how to travel through a form and its elements in JQUERY and would like to know how to do it. ...

Jquery and Cakephp, where to put the file / how to call it?

I'm confused by this as I can't find good documentation on how to do this, I have a jquery file called "index" located in my cakephp site folder at: /app/webroot/js/index.js I am trying to include it in my view with: <?php echo $javascript->link('index', false); ?> but I get: Fatal error: Call to a member function link() on a ...

Need your help with creating an invoicing application using php

Hello, I am working on a php and mysql based client and invoice management web application. In my apps Invoice section, I want to allow users to add any number of invoice items (qty, description, price) dynamically (by default only one will be displayed), and autogenerate total, grandtotal amount. I want to do this using jquery. And wh...