javascript

Adding a link to image breaks jquery slider, help please!

Hi All, I am working on a site for a friend and trying to add a link to each image in a slide show. The slide show uses jquery and a script called easySlider1.7.js. Everything works just fine if the images are left alone, but when I try and wrap the images with a link, the slides no longer progress as they should. Here is the live we...

YUI: ensuring DOM elements and scripts are ready

If I put my inline script after the DOM elements it interacts with, should I still use YUI 3's domready event? I haven't noticed any problems, and it seems like I can count on the browser loading the page sequentially. (I already use YUI().use('node', ... to make sure the YUI functions I need have been loaded since the YUI script is a ...

jQuery/Javascript: Click event on a checkbox and the 'checked' attribute.

The code: $('input.media-checkbox').live('click', function(e){ e.preventDefault(); var that = $(this); if (that.attr('checked') == 'checked'){ var m = that.attr('media'); var mid = 'verify_' + m; that.parents('div.state-container').find('ul.' + mid).remove(); that.attr('checked', false); ...

give code to validate textbox if the textbox not contains the value except "mm-dd-yyyy" fromate it shoud display error message.

give code to validate textbox if the textbox not contains the value except "mm-dd-yyyy" fromate it shoud display error message. ...

Soften a colour border, maybe with a gradient, programmatically.

I have a narrow header in corporate colour, bright red, with the content below on a just-off-white background. Ive tried softening the long line where these colours meet using border type divs with intermediate backgrounds, but I think I need the original type curved gradient 'area transitions'. I want to reduce the contrast between re...

Javascript Object Database

Hi, is there any javascript object database?? Something like http://www.db4o.com/ but for javascript? thanks ...

AutoSave of web control values

Hi, What are the option available to autosave the value of control when enter the control value in to the web page.Thanks inadvance ...

overriding previously-bound click events

When I use this code with an element whose id is "foobar": $("#foobar").click(function () { alert("first"); }); $("#foobar").click(function () { alert("second"); }); I get two alerts: "first" and "second" second. How do I specify a click event that also clears out any previous click events attached to the element? I want the last $("...

Hiding Group Column Names

You once replied to a post about hiding list group header names. http://edinkapic.blogspot.com/2008/06/hiding-list-view-group-headers.html I do not write code or jQuery at that. But you mentioned that it would be better to write a solution in jQuery. Would you have code that would hide the group header and colon in a 2003 list (...

Need to escape a special character in a jQuery selector string

According to the selectors docs, you must escape [ with double backslash, etc \\[. I have a selector that is created like so (assume val attribute is something[4][2] in this example). var val = $(this).attr('val'); $select.find('option[value=' + val + ']').show(); Can I write a regex to escape the brackets for me? ...

Where to find Javascript Tree Creator?

Hi, Do you know any Javascript Tree Creator that lets you add or remove nodes up to 3 levels deep? I'm currently using the jQuery treeview but is currently coding the add and remove of node items which is hard. Cheers, Mark ...

Autosave the textbox control value in the web page without using webservice and settimeout

Hi, Autosave the textbox control value in the web page without using webservice and settimeout function.Please Help me.Thanks inadvance. ...

Retrieve value from form

My form is like <form action="javascript:;" method="post" id="reportForm"> <input type="text" name="as" maxlength="3" /> --CODE-- <html:hidden property="reportid" value="${Scope.reportId}" /> --code-- </form> I can retrieve values from the form in javascript like this.form = dojo.byId('reportForm'); this.as...

Calling javascript function on the Mousehoever and mouseout using jQuery

I want to call the javascript function using mousehover jQuery event. Here is the one function. // On mouse hover function function ShowHighlighter(d, highlight_elid) { //alert ("ShowHighlighter\n"+d); if (d == "addHighlight") { var txt = getSelText(); if (txt.length < 1) ...

How to resolve "Could not convert JavaScript argument arg 0 [nsIDOMHTMLDivElement.appendChild]" error..

i have a json object returned from ajax and when i alert it, it is displayed correctly and i try to add those into a unordered list and add that to a place holder div, but throws the above error.. function handleResponse() { if(httpa.readyState == 4){ var response = httpa.responseText; //alert(response); if(response!='empty'...

How to change the number of columns in a table dynamically but still keep the table layout intact?

I have a 'n' column table , the first column is a drop down box , on selecting the options from the drop down, the other columns change. For eg: first drop down might need to display a text box and a button , the second drop down 3 text boxes and a button and so on. There is only one row in the table. What is the best solution to achieve...

Confirm function in codebehind

Hi All, I my application i am using ajax(Updatepanel).I am using the following code to show confirmation dialog box after finishing some update process in database. but it is not working for me. Problem: Confirmation box is not displaying. code: protected void imbtnUpdate_Click(object sender, ImageClickEventArgs e) { // Databa...

list boxes(A,B) with some duplicate values

I have two list boxes(A,B) with some duplicate values and i can send values from A to B or B to A using send button and i have one save button. For the first time without sending any list box if i click on save button i am showing message like "NO changes or Done" But once i send one item from A to B and again sending that same item fr...

How do I find what text/HTML is on screen in a UIWebview?

I would like to know what the first piece of text/html that is currently showing on screen, or more generally where in pixel location a particular tag or piece of text is in the UIWebview. I know that I can use window.pageYOffset to get the scroll position of the UIwebview, but how do I find out what text or HTML item is there? ...

Associative Array / Object can't be read in functions

At the very beginning of the javascript file, I have: var lbp = {}; lbp.defaults = { minLength: 40 }; I can successfully alert it afterwards, with: alert(lbp.defaults.minLength); But as soon as I put it inside a function, when I alert, I get "Undefined". What gives, and how do I avoid this? Is it absolutely necessary to pass ...