jquery

Ajax call to a method that prints javascript

Ok, I have a some javascript code in the database Table: jsSnippets Field: snippet Type: Text <SCRIPT SRC="https://svc.com/somestuff.js"&gt;&lt;/SCRIPT&gt; <script> var fubar = 'stuf' send_some_stuf_to_svc(fubar) // sends some data to a service :) </script> So i have N number of this JS snippets will that code work if a server ...

Javascript - Why does this function loop twice?

Hello, Trying to solve that problem, but no luck for hours... I have var screen1 = $('#screen'); var screen2 = $('#screen_teams'); var screen3 = $('#field_position'); . . . screenFade(screen1,1000,1); function screenFade(screen,delay,next) { if (next == 1) { screen.delay(delay).fadeOut(1000, function() {animation(2);cons...

Why doesn't this jQuery code work in IE?

This works in all browsers except IE. I have no idea why. Its just an ajax clock that ticks through the seconds. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt; <html xmlns="http://www.w3.org/1999/xhtml"&gt; <head> <meta http-equiv="Content-Type" content="text/...

jQuery not working in IE6 at all

Hey all, I'm at a complete loss here. A client of mine uses IE6 internally and for some reason even the simplest jQuery does not work. Here is the code that will not work. <html xmlns="http://www.w3.org/1999/xhtml" > <head> <title></title> <script type="text/javascript" src="js/jquery-1.4.2.js" /> <script type="text/javascr...

Problems with jquery validation against spaces

I'm having a problem validating entries on a form using jQuery and the Validation plugin. The entries must be either zero or a positive number. I've had no trouble with a method to detect negative numbers (or NaNs), but I've had any method work to detect empty entries or ones with nothing but spaces. The relevant code: //WORKS //requ...

JQueryUI accordion with a custom anchor in IE8

hi all. I have a very simple accordion in my webpage that I initialise with : $(document).ready(function() { $('#accordion').accordion({ 'autoheight':true, 'header': 'img' }); }); And later I: <div id="accordion"> ...

jQuery - Does jQuery Form Plugin work for IE/Opera/Safari?

Hello all, I have developed my web application that is based on jQuery Form Plugin http://jquery.malsup.com/form/ + Firefox. I use ajaxSubmit to submit the form with all kinds of components including FILE. Is there any issue that those application may break with IE/Opera/Safari? This question is specific to the adoption of jQuery Form...

toString() not working

Good Day, I am working with jQuery tabs and I've got some code that fires off when I change tabs. $('#container-1').tabs({ onClick: function(clickedTab, divElement, hiddenTab) { var selectedTab = clickedTab.toString(); // var pos = selectedTab.IndexOf("#") + 1; var results = selectedTab.substring(5); // selectedTab.IndexOf("#") +...

jQuery - Can I mix mulitple JS code that processes different forms into on JS

Hello all, I have designed several web forms each of which links to a single form_operation.js. This JS file handles all kinds different interaction on different forms. It works so far for me. My question is: Are there some potential problems I will have in the future? For example, Assuem I have two forms a) login.php b) register.php....

Make specific link open in a new window with jquery

I'm looking for the ability when a link contains, for example /schedule/ in the address, only this link will open in a new window when clicked. I have a series of 5,000+ links that need to open in a new window, which I would need to update manually (no find/replace available), which contains /schedule/ in the address field and I need the...

php file loaded with jquery not displaying php variables.

I have a PHP file that contains a button. When the button is clicked an external PHP file is loaded into a div on the same page. The external PHP file contains a form with a hidden variable, the values is set to a PHP variable that was defined in the page with button. Since the PHP file is loaded into the page's div shouldn't it have ...

When is document.ready fired when the script is loaded through the RederAction method?

I have an action that summarizes an entity's information. The view for the action contains a script to handle the summary's UI. I also have another action that loads this view multiple times (to summarize multiple entity instances). It seems that the jQuery document.ready function fires each time the action's view is loaded on the page. ...

Jquery making real-time input checking

I am trying to write a script that validates user input. Like: letter length more than 5 or password and reentered-password match. But how can I get which input box in the form was clicked? I used $(function() { $('#register input').keyup(function() { if ($('#username').val().length < 5) { $('a.username').text("...

How do I replace an event handler with jQuery?

I have a site that uses AJAX to navigate. I have two pages that I use a click and drag feature using $(".myDragArea").mousedown(function(){ do stuff... mouseDrag = true; // mouseDrag is global. }); $("body").mousemove(function(){ if (mouseDrag) { do stuff... } }); $("body").mouseup(function(){ if (mouseDrag) { do st...

Hover on specific post should show the title of only that post

I'm using Wordpress for my website. What I'm trying to achieve is that if I hover on a specific post, it should show the title of that very post. But what it does right now, is that if I hover on one post, it displays the title of all the posts. The code: <?php if (have_posts()) : ?> <?php while (have_posts()) : the_post(); ?...

jQuery, find li class name (inside ul)

I have ul with a number of li inside. All li have an id "#category" but different classes (like ".tools", ".milk", ".apple"). Using jQuery. I do : $("li#category").click(function(){ some_other_thing ( .... )}); now i have to put a li's class "name" — (a string indeed) inside the some_other_thing() function instead of .... How it ca...

Interrupt jQuery delay function

I am working on a way to autocomplete function to navigate through steps of a form. Here is the code that when 5 characters are entered into an input, it then moves to the next element. My delay is working great, but I don't have a way to stop it from completing if characters get deleted after 5 characters are entered. It just fires off ...

how to get the metadata of jstree .

this is my code: $("#demo1").jstree({ "themes": { "theme": "default", "dots": true, "icons": true, "url": "static/themes/default/style.css" }, "ui" : { // this makes the node with ID node_4 selected onload "initially_select" : [ locat...

Read XML, or JSON file instead of SQL Server

I have asp.net 3.5 C# and a SQL Server 2008 back end. There is a table that I use the most, this table has around 100 rows and doesn't change often. My code (web service with a cache) is called from JQuery to search a record by ID and return a JSON response to client side. Recently the server that hosts my site had a big problem and h...

how do we change onclick function via .attr() in jquery ?

i got this url <a class="remove_item' rel="4" onclick="javascript:jQuery(#blablabla)" href="javascript:;' >remove</a> i'm using this simple find and replace item.find('a.remove_class').attr({ title:'hello', click:'hello();' } ); but it seem it's not working. i still not able to replace javascript:jQuery(#blablabla) with another f...