javascript

How to run javascript code in any part of the html file?

I am using a jQuery notification system who runs when the user click on a link: <a href="javascript:void(0);" onclick="$.n('This is a sample notification message, there are 3 more notification types which is all customizable through CSS.');">here</a> But the thing is that i want to run $.n('This is a sample notification') not by press...

How to disable firefox's form auto completion without change events?

So firefox has a nifty mechanism which will try to autocomplete values in fields when a page is reloaded or the back button is used. Which is great and all except when you have something like a drop-down which when set to a value modifies the page using ajax. What winds up happening is that the browser reloads the page, the drop down is...

When iterating over values, why does typeof(value) return "string" when value is a number? Javascript

I'm using Google Chrome for this test: Contrary to intuition, the first loop alerts "string" 3 times, while the second loop alerts "number" 3 times. numarray = [1, 2, 3]; //for-each loop for(num in numarray) alert(typeof(num)); //standard loop for(i=0; i<numarray.length; i++) alert(typeof(numarray[i])); I was expecting bot...

facebook javascript sdk question

Hi, I'm trying to use the facebook js sdk to develop an app, but I found the there is 2 version of the sdk, my question, is what is support with the new and what w=not? and if the xdreceive.htm is still needed for the new version, I have read the docs and still can't understand this, can someone with experience in FB can me kind and asnw...

Extjs - Getting more from the server

Hi, Is it possible to get every data from the server? for example, i want to get the columns items from the server Via Ajax/Proxy by sending json string? thanks var grid = new Ext.grid.GridPanel({ store: store, columns: [ {id:'company',header: 'Company', width: 160, sortable: true, dataIndex: 'company'}, {header: 'Price', width: 75, so...

How to distinguish between blank areas and non-blank areas in a webpage with JavaScript?

How to distinguish between blank areas and non-blank areas in a webpage with JavaScript? Blank areas including: areas that are not occupied by DOM elements. margins, borders and paddings of DOM elements. EDIT: As response to the first comment: I am working on a web-based ebook reader. Cursor is set to {cursor:move} for blank areas so...

How to get a asp:radiobutton text in javascript?

How to get a asp:radiobutton text in javascript? I use this RbDriver1.Text = dt.Rows[0].ItemArray[5].ToString(); RbDriver2.Text = dt.Rows[0].ItemArray[6].ToString() ; and my javascript function is function getDriverwireless() { alert(document.getElementById("ctl00_ContentPlaceHolder1_RbDriver1")); alert(document.getElementById("c...

jquery specific show buttons on hover

I have an application creating a bunch of divs through a loop. Each div has the class "product" so it looks like <div class="product"> !.....stuff here ....! <div class="show_on_hover">...buttons here... </div> </div> so there are about 12 of these same divs per page. I would like to hover over a specific one and sho...

Create web application to scan document

work on asp.net 08 C#.I would like to develop a web application that scan documents into the following format(pdf,tiff,jpg,gif.etc) .My scanned images/file will be at client computer. ...

How to insert an element between the two elements dynamically?

I am using a table, in which there are buttons, on button click i want the new TR element to be inserted between the two TR or at the end of the TR... my code goes here <table> <tbody> <tr> <td> <input type="submit" value="Add" onclick="addFunction()" /> </td> </tr> <tr> <td> <input type="submit...

Open source javascript GUI component toolkit

Is there any open source javascript GUI component toolkit ? ...

making links with out anchor tag using dojo

I have a image with link <div id="img"><a href="src/blah.html"><img src="/src/img.png"/></a></div> but i don't wanna use tag for linking.the page has multiple entries like this in a page as it is being populated for a search result.Some 10 or more entries will be there in a page.its all inside a <div id="result"></div> have an idea f...

How to retain focus on an editable html after deleting an element.

Hello, I have a website with design mode on (aka. content editable = true) with some basic text on it. To that site I hooked up a shortcut so that at any point in the text I can insert an input box that serves me as an autocomplete. For that input however I want it to disappear right after I hit ENTER so that I can continue typing. It i...

How to prevent from misclose browsers

I have a Web Application and I want to get a confirmation from users when they are closing the application no matter what. I mean I'm looking for a way to display a message touser whenever user try to close the application. Update : I want to use my dialog box not browsers dialogbox. r at least a dialogbox which only shows my messa...

What web framework uses "javascript:__doPostBack()"

I've seen this all over the web javascript:__doPostBack('ctl00$ContentPlaceHolder1$lnk2','') Checking headers of the last place I saw it didn't reveal a server side language. What server side language and/or framework encourages this style of link? ...

Changing background image to a button

I am trying to change the backgound-image of a button but it doesn't work as I thought !! the CSS is OK and it is as follows : #ITA { float: right; margin: 5px 85px; width: 40px; height: 40px; background: #FFFFFF url("../ITA_off.png") center center no-repeat; border: 0; } my javascript function in the "HEAD" is...

jquery selector

hello, i have the below sample code for a navigation list: <div id="menu"> <ul> <li><a href="#sect1">link 1</a></li> <li><a href="#sect2">link 2</a></li> <li><a href="#sect3">link 3</a></li> </ul> </div> and some jquery code: $("#menu li").click(function () { var mylicontent=$(this).html(); }); i want to get both html conte...

Having encoded a unicode string in javascript, how can I decode it in Python?

Platform: App Engine Framework: webapp / CGI / WSGI On my client side (JS), I construct a URL by concatenating a URL with an unicode string: http://www.foo.com/地震 then I call encodeURI to get http://www.foo.com/%E5%9C%B0%E9%9C%87 and I put this in a HTML form value. The form gets submitted to PayPal, where I've set the encoding t...

Change of a background image of a button on onclick event

Why does this not work ? In Firebug, when I click on the button, it always says to me that cambiaBandiera is not defined ... HELP Alex CSS #ITA{ float:right; margin : 5px 85px; width:40px; height:40px; background : #FFFFFF url("../ITA_off.png") center center no-repeat; border:0; } JAVASCRIPT (in HEAD) <style type="text/javascrip...

How do I show datetime in the same time zone as user using PHP or javascript?

Suppose now I've got the datetime to show like this: 2010-05-29 15:32:35 The the corresponding time zone can be get by date_default_timezone_get, how do I output the result in the same time zone as user's browser so that users don't get confused? ...