javascript

jQuery Async Plugin loop sequence

Hi, I am using http://mess.genezys.net/jquery/jquery.async.php for loop and need to reverse the order of the array(1,2,3) instead it goes from 3 to 1 Anyway to change that from the code? Thanks ...

zoom css/javascript.

Hi, I would like to know how zoom property can be controlled through javascript, like div.style.top , how to specify for zoom ? ...

How to add extra info to copied web text

Some websites now use a javascript service from Tynt that appends text to copied content. If you copy text from a site using this and then paste you get a link to the original content at the bottom of the text. Tynt also tracks this as it happens. It's a neat trick well done. Their script for doing this is impressive - rather than try...

temporarily removing and later reinserting a DOM element?

Hello, Is there some jquery magic that will let me do the following: [0- define some element in HTML (eg, a unchecked checkbox)] 1- update its DOM element by setting one of its attributes using .attr() (eg, by setting its "checked" attribute using .attr('checked', true) ) 2- temporarily remove that element from the DOM 3- reinsert t...

Javacript in html - Using single quote inside another single quote

document.getElementById("img").innerHTML="< img src='/sitepath/"+imgg+".jpg' width='72' height='44' onclick='alert('hello');' />"; The above code is my javascript. Problem is printing hello or any other string. If I just type 123 in place of hello, it does give alert. But am not able to use a string like hello there. Normally a string ...

Display Form Depending on the value of a field in another form

I have two forms on the same page, but I want the second form to be displayed only if a certain field in the first form is greater that four. How can I achieve this using JavaScript? I'm using Django. ...

html input Hidden Control Event, when value set

HI, In javascript when value set to input hidden control,which event is occurPlz Help for me ...

Mobile minibrowser: how to reload image while maintaing page offset position?

In mobile web minibrowsers, it seems that the window object makes no sense since there's only one window to show. Therefore, things like window.pageYOffset=320 make no sense (as far as I can tell). Given a simple example such as a map zoomin/zoomout such as <html> <head> <title>zoom.html</title> <script language="javascript"> var zoom...

innerHTML side effects?

I'm having some issues with a DOM element reference and I think I've tracked it down to having something to do with updating innerHTML. In this example, at the first alert, the two variables refer to the same element, as expected. What's strange though is that after updating the innerHTML of the parent element (body), the two variables ...

JSON numeric key

I have a JSON object like: var myObject = { '0' : 'blue' }; Now, in JavaScript, when I try to access the value of the key '0' like: myObject.0 ...I am getting an error. (Maybe this is not the proper way?) How can I access the value of a key that is a number (like the above)? ...

Javascript code causes ActiveX warning

I have the following JavaScript code on my page: window.onload = function() { var best_photos = new Array ( "photo_1.jpg", "photo_2.jpg", //array of filenames goes here ) var k = Math.floor (Math.random() * best_photos.length); var image = document.createElement("img"); image.setAttribute("src", best_photos...

Javascript functions execute without waiting for functions in the lines above to return?

I've bound a function to a form submit button. I want the function to pop up an iframe dialog box and wait for user interaction, and THEN submit the form (via an ajax post). But the behavior I'm seeing is that the dialog pops but the function continues executing and does the ajax post, even though the dialog box call hasn't returned yet...

Could we call web behaviour programming to javascript code?

Hi, I recently develop a web application that uses a lot of javascript code and I face how to design and code it. So, I realized that javascript is focused on how some html items behave on the web page and not simple functions or methods that makes easy changes to UI. Talking about web design, javascript could be considered as a web be...

GWT's CssResource in IE

With GWT 2.0, I can't get CssResource to work properly in IE. I'm using NotStrict css resource, with some top level selectors like "html, body". It works well in webkit & gecko browsers, in IE, only a few CSS rules are injected, like 5% of my stylesheet. It's very hard do debug. ...

Inheritance in Javascript

I am working on a simple problem to represent a few types that have a hierarchical structure. There is a data row that contains some data, and the data could vary from type type of row to another. A simple row might only have a title and date, while an extended row may contain a title, description, date and an image. I am not new to Java...

Get current URL, and strip it down

I have a URL like: http://url.test.com/account/name/pages/Stuff.html I want to take 'Stuff' and apply that as a class to body. <body class="Stuff"> ... </body> How can I get the current URL? How can I extract the text 'Stuff' after the final '/' Then add the class 'Stuff' to body? ...

Facebox adding commas to input

I'm using a facebox to display a form inside a lightbox, nothing too exciting (just a couple of datepickers, some textboxes and a checkbox). However, I'm having issues with the postbacks, whenever I post back from the facebox it adds a ',' to the start of the input (so "rabbit" becomes ",rabbit") Now, I saw that there was the same issue ...

adding minus icon at the end of sortable

Hi Everyone, I am trying to add minus icon at the end of sortable item, but i am not able to do this, kindly help me in that concern. I am using jqueryui for that. Thanks, <ul id="sortable"> <li class="ui-state-default"><span class="ui-icon ui-icon-arrowthick-2-n-s"></span>Item 1<span class="ui-icon ui-icon-circle-minus"></span></...

How to get the Id of Checkbox which is inside a Repeater.

I have a repeater inside which i put a Checkbox and above rapeater there is a HTML checkbox which is used to Check/Uncheck a Checkbox which is inside repeater using client side javascript. Here is my Code: JavaScript for Check/Uncheck: <script type="text/javascript"> function selectAll() { for (i = 0; i < document.all.lengt...

What are some excellent HTML 5, CSS 3 and JavaScript blogs?

Hello, I'm following Ajaxian, but I'm wondering if there are other awesome blogs about HTML 5, CSS 3, JavaScript and such? ...