jquery

Split a string in jquery

How to split these strings in jquery? Mode1 2Level I want to get only the numbers from the above two strings in jquery... The strings may be Mode11,Mode111,22Level,222Level etc the characters Mode and Level wont change... ...

Ajax/PHP .post, and .load dont return any data

I am working on an AJAX login/logout form. The login works fine, but when someone clicks on "logout" I am having a few problems. Javascript: $("#logout").live("click", function(){ $.post("/hd/ajax.php",{ logout: "1" }, function(data) { alert(data); }); }); Ajax.php: if(isset($HTTP_POST_VARS['logout']) && $HTTP_POST_VARS['...

order of ajax post requests getting mixed up

I have a page where the user sends data (via ajax) to a php page, which inputs it to a database. However, occasionally, the requests are getting out of order when I check the database. Basically, the user inputs events as they occur and hit submit to send it off to the database. Occasionally, the user will record 2 events before sending...

how to pass these strings from php to javascript

hello i have 4 strings in my application like this that i want to pass to my js file $a1='[10,20,13,14]'; $a2='[17,15,14,16]'; $a3='[18,24,16,17]'; $a4='[15,54,18,27]'; echo $a1.",".$a2.",".$a3.",".$a4; and my javascriptcode is $.ajax({ type: "POST", dataType: "json", url: "loaddata.php", ...

In css or jquery, is there a way I can add something to my border on a div?

Is there a way I can put little squares around a div to make it look like handles, one top middle, top left, top right, middle left, middle right, bottom left, bottom right, bottom middle. I have this jquery plugin and I have a div resizeable, but I wanted to know how I could make it look like it has handles. Most likely in css, but ma...

Is this a valid jquery callback function call?

I executing a function like this, <script type="text/javascript"> $(document).ready(function() { getEntities("Clients/GetClients", 0, formatClientsResult); var maxvalues = $("#HfId").val(); $(".pager").pagination(maxvalues, { callback: getEntities("Clients/GetClients", formatClientsResult), ...

What does 'Error: uncaught exception: Syntax error, unrecognized expression: [object Object]' mean in jquery?

I keep getting this error, but it doesnt give me a line number or anything. 'Error: uncaught exception: Syntax error, unrecognized expression: [object Object]' That is the error, from this script: http://www.fissiondesigns.com/simon/ try drawing a square on the picture. Thanks in advanced! ...

Fetching the title of a website

Hi there, I browsed through SO, but what I found were examples "how to manipulate a piece of html". But in my case, I want to fetch a HTML file by a given URL and just parse the websites title not the whole file. Is there any way to do this with jQuery or any jQuery like framework? regards, ...

How to get width of <li> stretched to available space in parent <ul> in IE7?

How to get width of <li> stretched to available space in parent <ul> in IE7? In IE 8 and FF Drop-down coming like this which is OK but in IE 7 it's coming like this Edit: 5 july I added live example here see this in IE7 How to get same result like IE8 and FF in IE 7. I don't want to give fixed width to <ul> and <li> This is ...

How to disable default <a> behaviour of "href" attribute ?

I have a simple sidebar like this: <div class="sidebar"> <ul class="nav"> <li class="Page1"><a href="Page1.html">Page1</a></li> <li class="Page2"><a href="Page2.html">Page2</a></li> <li class="Page3"><a href="Page3.html">Page3</a></li> </ul> </div> This code exist on each one of the pages: page1.html, page2.htm...

too much recursion error...

I am showing images one by one.. But it displays two images at a time... Why this strange behavior? <div Id="BannerDiv"> <img src="images/CIOT flash/im_01.png" alt="image1"/> <img src="images/CIOT flash/im_02.png" alt="image2"/> <img src="images/CIOT flash/im_03.png" alt="image3"/> <img src="images/CIOT flash/im_04.png" alt="ima...

Jquery - Toggle & page refresh open div

How do you open a JQuery toggle from a url? at the moment I am using return false to prevent an href action but I would really prefer to keep the href action to refresh the page. here is my code $('#adminMenu h3').click(function() { $(this).next('ul').slideToggle("slow"); return false; }); and this is the html <h3 title=...

Uncaught ReferenceError: pageTracker is not defined

Hello folks! You'll have to forgive me on this one. I understand that the issue is probably very simple, but I'm not a JS coder and am only just starting to get to grips with jQuery. So I have a jQuery Ajax call in $(document).ready: $('#newesttab').click(function() { $('li').removeClass('selectedtab'); $('#newesttab'...

[JQuery] Clearing a jQgrid

Hi, How I can delete all value into a grid? Thanks. ...

Handling multiple views via AJAX

I am using AJAX requests (more specifically, jQuery's load method) to load different views within the same HTML DIV. This works fine, but, some of these dynamically loaded pages have events hooked to them, for e.g. setTimeout, setInterval events, etc. My question is: How do I handle the loading & unloading of these events across the ...

jQuery post() JSP return collection

My HTML looks like this: <script type="text/javascript" src="jquery-1.4.2.js"></script> <script type="text/javascript"> $(document).ready(function(){ $("#btn").click(function(){ $.post("test.jsp", { "txt": $("#txt").val() }, function(data){ alert(data); ...

Dynamically positioning elements using jQuery

I am working om a menu bar, each menu bar item is an image, when user places mouse over menu item a div with submenu will appear. I want to place div directly under the appropriate image item (no space, and div will hover above all elements), with right side alignment, meaning the right top corner of div should be under bottom right...

Add Next/previous buttons pagenation

How would I add next/previous buttons to this snippet. I actually don't want the numbers. var itemsPerPage = 4; var $entries = $("#entries"); var $list = $entries.children("ul:first"); $list.children().eq(itemsPerPage).nextAll().andSelf().hide(); var $pagination = $("<ul class='pagination'></ul>").each(function () { var itemsTota...

Select Box Problems with Jquery Validation

I have 9 select boxes on my page containing lots of subcategories for businesses. I require the user to select an option from only 1 of the 9 selects. To make the user experience better I hide all of the select boxes with CSS and generate a dynamic select box of categories. When a category is selected from the generated dropdown, the sub...

jquery/ajax set charset header

Hi, I am trying to set the charSet in a jquery call the site I am making is for a Lithuanian friend thus has some letters with accents etc. As far as my research so far (2 days worth!!!) has shown, I need to place it in the beforeSend section which I have done as follows: $(document).ready(function(){ $('.content').load('home...