I am writing an application that renders a list of "Job" objects from an AJAX JSON response.
What is the best way to Render the markup from the returned data. Now I'm pretty convinced that its a bad idea to generate HTML markup on the server side and return that from the AJAX call. From experience it makes the HTML hard to maintain an...
Hi,
I've been developing an app which pulls in an XML file using Jquery. Everything is working well in all browsers but I noticed that the Safari is not picking up my CDATA value. When I alert the value its empty.
I am using this code :
$('flight',xml).each(function(i) {
deeplink = $(this).find("deeplink").text();
alert(deeplink);
...
Hi,
<input type="checkbox" name="checkGroup" id="all" value="0" >All
<input type="checkbox" name="checkGroup" id="one" value="1">One
<input type="checkbox" name="checkGroup" id="two" value="2">Two
<input type="checkbox" name="checkGroup" id="three" value="3">three
My requirement is
when check All it should check One , Two, Three al...
My problem is that I am trying to reset some form cookies so when someone has completed their form, they are reset so it is possible for someone else to complete the form. Simple and obvious.
But
However many different lines of code I put in, the cookies just do not seem to be disappearing. I am using the remember function from the sit...
Hi All,
I was looking into post
http://stackoverflow.com/questions/2046307/find-the-position-of-an-element-within-a-list,
and Mr cletus mentioned that to get index we have to use
var index = $(this).parent().children().index(this);
HTML:
<ul>
<li>Element 1</li>
<li>Element 2</li>
...
Hi
I want to put all attributes in a Html element into an array:
like i have a jQuery Object, whichs html looks like this:
<span name="test" message="test2"></span>
now one way is to use the xml parser described here, but then i need to know how to get the html code of my object.
the other way is to make it with jquery, but how?
the...
I have the following code to sort the items in a dropdown list:
function sortDropDownListByText(selectId) {
$(selectId).html($(selectId + " option").sort(function(a, b) {
return a.text == b.text ? 0 : a.text < b.text ? -1 : 1
}))
}
this works fine except in cases where, in my first item, i have a *"Please select and ...
I am using a Jquery plugin named Jquery gzoom. It's very nice script but when I test it in IE. The script show the Invalid Argument Error. The error only shows in IE.
I am wondering if anyone can figure about where in the script cause the error.
Plugin page: http://lab.gianiaz.com/jquery/gzoom/index_it.html
Thanks in advance.
...
Working with JSON is quite new to me, yet I already like it. But i'm facing an annoying issue.
Here's how things work:
jquery makes an Ajax request for a specific url,
this url is a STRUTS action, and, on success, returns a specific jsp
this jsp includes JSON taglib (http://www.atg.com/taglibs/json) in order to render proper JSON formatt...
I want to select the first option in a select list which matches a certain value, currently the last match is selected, like so:
jQuery('.edit-item').click(function(){
var id = jQuery(this).attr('id');
var assignee = jQuery('#assignee-'+id).text();
jQuery('#edit-form-'+id+' select[name=item[responsible]]').val(assignee);
re...
hello, I have a button that depending on a class value should send different values to the POST however what ever happens it is only running one condition, whatever I do I can only get it to send the POST the method=add data.
This is my code
$("a.navlink").click(function (ev) {
$(this).removeClass("active");
var url = $(this).a...
I have a simple python CGI script where I query a MySQL database and then prints the result to the screen/webpage.
My problem is that the "cursor.execute()" function returns a list of tuples. I use a simple for loop to iterate through this list and extract each tuple. This was working great until.....I got the bright idea to use jquery t...
I have two dropdowns. When a user selects a value from the first one i want in the second(which has the multiple select option), with jQuery, to select some values automatically. How can i do that?
First select box:
<select id="update_carte_s" name="update_carte_s">
<option value="5!**8,9**!6!44.9">Ghid complet Internet</option>
...
I need to address the following problem:
In IE the dropdown body is what dictates the width of the dropdown. If i set dropdown width to 100px then the body will get cut off if its wider.
Last time (4 months ago) i looked for a suitable widget i found the following problems
Not all dropdown keyboard shortcuts supported: up/down ar...
I am having some trouble with silverlight's z-index. I have a thickbox dialog that pops up but my silverlight gallery is still pulling up on top, hidden most of the modal dialog. Has anyone experience this problem? I have tried bumping up the z-index on the thickbox control but no luck.
...
Hey folks,
I have a simple thing going here: two divs and two calls to load partials (controller actions with PartialView as results).
I am dealing with two controller actions: Index and ItemDetail. The jQuery load works in the view returned by the Index action, but not on ItemDetail.
These items are in the same controller and you ca...
Hi,
I'm binding the jquery datepicker to an input field. This works fine with static context. But if I reload parts of the page with ajax, call again the bind method, then the newly loaded content is not found, and thus I can not bind my datepicker to the newly loaded fields.
<script type="text/javascript">
function ajax_get_hour_r...
As jQuery thickbox is not maintained anymore (as of ThickBox 3.1), what is the best alternative for jQuery thickbox currently available under GPL or similar license. Looks nyromodal is best available so far, but is there anything better. (nyromodal has some problems in IE 6)
I am looking for a plugin which can handle ajax forms, inline ...
Hi all,
So there seems to be quiet a few ways to handle broken images on a html page. I would like to know what ways are in popular use and what ways are viewed to be best practice?
To start I've looked at some myself like:
function imgErr(source) {
source.src = /images/missing.jpg";
source.onerror = "";
return true;
...
Hi There, I have a blog where each post doesn't have a detail page. Therefore each blog post has a footer link that loads comments and the comment form via jQuery ajax .load(); The code below doesn't work in IE6/7/8 but it does work in FF/Safari/Chrome.
Also, I'm pretty new to jQuery and javascript, and the code just looks so bloated. Ca...