jquery

how to POST radio button values through jquery

i have this example code: while ($row = mysql_fetch_object($result1)) { echo '<input type="radio" name="vote" value='.$row->avalue.'/>&nbsp;'; echo '<label >'.$row->atitle.'</label><br>'; } this displays 4 radio buttons alongwith their labels. now I am using th...

call jquery function with parameters

I have a btn <a href="#" id="submitBtn" class="btnGray">Upload Docs</a> and a jquery code to submit the form. $("#docSaveBtn").click(function(){ $("#docForm").submit(); }); I have multiple forms on the same page and I want to send the form id to submit which will submit the desired form when click of b...

Escaping html in Jquery

I have a simple jquery snippet here: $("#someid").html("Text Here"); The only problem I am having is that I am putting Database data inside the html(). $("#someid").html("<?php echo $row['tablecolumn']; ?>"); It works great! Except for one thing. It does not show when I have 'breaks' in the text from the database. I'm sure I need...

Draggable <td> content using jQuery

Hi, I would like to use jQuery and its drag-and-drop function, such as: http://jqueryui.com/demos/draggable/ In my case, I would like to enable drag-and-droping on content of an HTML table. For instance with a table of 20x20, in order to move a tag from a cell to an other cell. Is that hard to do? I don't see any example after sear...

Nested JSON objects - do I have to use arrays for everything?

Is there any way to have nested objects in JSON so I don't have to make arrays out of everything? For my object to be parsed without error I seem to need a structure like this: {"data":[{"stuff":[ {"onetype":[ {"id":1,"name":"John Doe"}, {"id":2,"name":"Don Joeh"} ]}, {"othertype":[ {"id":2,"company":...

Replacing the contents of an entire webpage through ajax

Hi, I'm aware that this is kinda a hack but for reasons of simplicity I would like to replace the contents of an entire webpage with an answer received through Ajax. This includes possible HTTP headers. Is it possible to do so? To clarify further, right now I added for debugging purposes: alert(response); and this produces: For rea...

jquery ui draggable elements not 'draggable' outside of scrolling div

hello all, i am super stumped. i have many elements (floating href tags) in a div with a set height/width, with scroll set to "overflow: auto" in the css. this is the structure of the divs: <div id="tagFun_div_main"> <div id="tf_div_tagsReturn"> <!-- all the draggable elements go in here, the parent div scolls --> </div> <div id="...

how to get href value using jquery

I'm trying to get href value using jquery <html> <head> <title>Jquery Test</title> <script type="text/javascript" src="http://code.jquery.com/jquery-latest.js"&gt;&lt;/script&gt; <script type="text/javascript"> $(document).ready(function() { $("a").click(function(event) { ...

how to change these lines of javascript from scriptaculous to jQuery syntax

I am rewriting a helper class which was originally built on top of Scriptaculous. I am moving to jQuery - however, I am stuck on a couple of lines, that I need help with (see below): Note: the javascript code is interpersed with php variables (the sigils being a dead give away) Statement 1 'new Insertion.Before(\'' . $updateContainer ....

jquery plugin issues with counting chars when returns are used

I have a problem with jquery.charcounter.js its not counting returns as /r/n its counting them as 1 char instead of 3 or 4 here is the code is there a way around it if (el.val().length > max) { el.val(el.val().substring(0, max)); if (settings.pulse && !p) { pulse(container, true); ...

jQuery: using .getJSON to return images and then wrap them in anchors

This is driving me nuts! What the easiest way to wrap an anchor with the img src as the href in this code?: $(function(){ $.getJSON("http://api.flickr.com/services/feeds/photos_public.gne?tags=tree&amp;tagmode=any&amp;format=json&amp;jsoncallback=?", function(data){ $.each(data.items, function(i, item){ $("<img...

jQuery datepicker changing input value automatically

So I'm building an application where data is coming back from a database where the date could be in many different formats, ie '2008', '05/22/99', '8/20/2004'. And lets say, for example, a user wants to edit a date (2009) by clicking the "Edit" button. Well in the edit window it SHOULD show an input box with the year '2009' already prese...

Making .NET Ajax request using jQuery

Hi, I am just wondering that, is there anyway to make an Ajax request using jquery ("$.ajax") and making partial rendering without using the .NET Ajax framework (without script manager). I have tried this before, but it's executing the page_load every time and not reaching to the pagemethod. function doAsync() { jQuery.ajax({ ...

Jquery backgroundPosition Animation Question

I am using Jquery to animate an object while the user presses a key. Upon Keyup the object stops moving, but I need to know what the background position of the object is when it stops. Using .stop(true); Without getting to much into it, I need to be able to get the position of the background. Is there anyway with Javascript or jquery ...

Trying to validate an array of textfields using jQuery

I am trying to validate the following form using jQuery plugin but not successful yet. Please help me with the issue. <ol> <li> <label for="address1" class="biz">Address 1<span class="required">*</span></label> <input id="address1" name="address[address1]" class="text" type="text" > </li> ...

jQuery Array of all selected checkboxes (by class)

In HTML I have a set of checkboxes grouped together by a class. I want to get an array in jQuery containing all the checkboxes that are selected/checked for that class (so other checkboxes on the page are ignored). So HTML code like this: <input type="checkbox" class="group1" value="18" checked="checked" /> <input type="checkbox" clas...

Invoking a Javascript from Lotus Notes on click of a button

I am building a Proof Of Concept for a component that was earlier built in vb6. Since the component has complex UI elements, I am not really sure how far i can reproduce the same thing with Lotus Notes UI elements. What I am now currently looking to do is the following. Create a Button in an exist LN form. When the button is clicked it...

Multiple Select type for Jeditable - In Place Editor plugin

Hi everyone, I use jeditable in my project where I dynamically update lots of different types of content: text, textarea and select. I would need a new type to meet one of my needs : a multi-select type that could be called "selectmulti". When editing the field typed "selectmulti", a select list appears and would allow users to select...

in jQuery, how to get the quantity of an element based on id?

I have a bunch of elements with <div id='id1'></div> and would like to return the quantity/count of them. I am using the following code, but it always returns the value of 1: alert( $('#id1').size() ); What am I doing wrong? ...

jquery - stop page reload

hi, I have Textbox and Button(Next and Previous) displayed in Lightbox. currently my page is reloading on clicking Enter button. I dont want this to happen. What i want is, when i click Enter button the "Next" button should be clicked without page reload which resides back of lightbox. I used following code, but both reload and click...