jquery

Append numeric value to input name attribute with jQuery

I'm trying to add _1, _2 etc to the end of my input elements in a dynamic form. The user can add as many as they want I wrote this method but it seems to throw errors saying the "dName is undefined" $j("#addBranch").click( function() { //see withDataAndEvents, copie...

jQuery: substr method on link text?

hey guys, why is this not working? $("a.newslinks").each(function(){ if ($(this).text().length > 38) { $(this).text().substr(35); //does not work $(this).append('...'); //works $(this).css({ "color" : "#ff00cc" }); //works } }); if a link has its text longer than 38 characters i ...

Hilight table data when CheckBox is checked and unhilight when unchecked

I have the following check box list inside table. I want to hilight the <td> when a checkbox is checked and unhilight when checkbox is unchecked. I know that I need to add class to <td> when checkbox is checked and remove class when unchecked. <table id="cbDepartment"> <tbody><tr> <td><input type="checkbox" name="cbDepartme...

Can I change the upload filename in jquploader?

I'm using jquploader and need to change the filename from whatever the user submits to a value in my PHP session array. Can someone show me a way to pass in a session value to the jquploader function and then use that value to rename the filename? ...

AJAX modal shows white square corners over JQUERY rounded corners in IE7???

Using jquery rounded corners to make a white rounded area in which the content of my page is displayed. I also have an AJAX UpdateProgress control tied to an Update Panel on my page. When the update progress control is invoked, the background of the bottom two corners of the div rounded by JQUERY are showing up as white on top of the mo...

Using jQuery to unhide a div by clicking on a link

Hello, for this I am using colorbox jQuery plugin http://colorpowered.com/colorbox/ and a form. I am trying to use jQuery colorbox to unhide a div containing a form and show it in the colorbox when I click on the relevant links below. This is the javascript in the header I use: $(document).ready(function() { $('#password_reset').a...

dynamically added form field didn't post when form submitted

Hi All, I have a problem with dynamically appended form elements. I have used this code to append form elements $('#wrap_range_'+id).append("<div style='clear:both; margin:0;'></div> <select name='range_"+id+"[]'> <option value=''>-- Select range --</option> <?php for($cnt=10; $cnt<500; $cnt+=10) { echo '<option val...

DotNetNuke - jQuery - Why is this jQuery Watermark plugin not working?

I'm using DNN 5.4 with the default google api jquery reference: I have confirmed that jquery.min.js is loading. I don't know if there's other jQuery (other than the plugin) that needs to be loaded. I'm utilizing the Google Code jQuery Textbox Watermark Plugin (Link) Web Dev Toolbar & Firebug suggest that both jQuery and the Watermar...

JQuery App only works in IE when debugging

I have a website that's using a slightly modified version of Superfish that works fine in FF and Safari. When I try it in IE 8, it doesn't work. However, when I use an IE plugin called "Developer Tools", enable stop on error, start debugging and refresh the page, the app works. There are a couple of errors that come up when I load the...

why is my jQuery not binding my event?

I thought I understood JQuery, evidently not. Why, in this example, does the first textbox register clicks but not the second? <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4 /strict.dtd"> <html> <head> <script type="text/javascript" src="jquery-1.4.2.min"/> <script type="text/javascript"> captureKeys...

$_SESSION not available when using jqUploader

I am using PHP and jQuery for an uploader. I am having a huge problem though and would like some input as to how best handle these two together. I am using a PHP session variable that I am using to change the filename after the jquery uploader has finished. The jquery "url" is pointing to a PHP function that handles the actual upload. W...

Session Timeout AJAX Error in Tapestry Application

I'm building a webapp using Tapestry in combination with Spring Security and the jQuery-library besides Prototype. When a user clicks on a link after his session timed out, he is automatically redirected to the login page. This, of course, does not work for links, that trigger an AJAX-request. I know, this is a common problem with any k...

What can I use to show/hide a clickable button?

I'd like to use a "hidden" div that will contain a click-able image link based on a PHP return value. Can someone please point me to an example? I know there is a name for this but I don't know what it's called. ...

For some reason, the jquery code is not working on my site under IE 8, but is giving off no errors.

It's working fine under chrome, anyone have an idea on what tool I could use to check what is wrong? Or where to look? This is the whole code if anyone is interested, but I doubt it would be of use. $(document).ready(function(){ $('a').click(function(){ $(this).blur(); }); $('.opcion').hover(function() { $(...

jQuery Delegate fails to run ajax

Here is my jQuery using delegate and ajax: $(".tweets").delegate("#fav #submit", "click", function(){ var favid = $("#fav input#favid").val(); var favsave = 'favid=' + favid; alert(favsave); $.ajax({ type: "POST", url: "fav.php", data: favsave, success: function() { $('#fav').fadeOut(100);...

Jquery - More than 1 "$(document).ready" = dirty code?

Hi, is it OK to use the $(document).ready(function () { // some code }); more than 1 time in the javascript code? Thanks in advance! Peter ...

uploadify response with coldfsuion

hi, I am trying to use uploadify with coldfusion, the problem i am having is with my response. My upload2.cfm file is simply hello. So I should in theory just get 'hello' in my #newsImageHolder div. What I do get is the whole html of the current page. Thanks for any help. R. <script> $(document).ready(function() { $('#newsIma...

the value parameter is not being passed using jquery?

<textarea name="inputField" id="inputField" tabindex="1" rows="2" cols="40"onblur="DoBlur(this);" onfocus="DoFocus(this);" ></textarea> <input class="submitButton inact" name="submit" type="submit" value="update" disabled="disabled" /> <input name="status_id" type="hidden"> the javascript(jquery): function insertParamIntoField(anchor,...

Get url with javascript

Hi, I want to get the url with javascript. But I just need http://www.mysite.com, without any parameters behind it. any idea how to get that? ...

.hide() function works in Chrome & Safari but not in Firefox

Hey all; I have a bit of code which is hiding one element of this website as soon as it loads. It seems to work okay in Chrome & Safari but it doesn't work in Firefox… <script type='text/javascript' src='<%baseurl%><%basename%>/site/js/jquery.js'></script> <script type='text/javascript' src='<%baseurl%><%basename%>/site/js/jquery-1.4.2....