javascript

JavaScript OnBlur event prevents HTML form from being submitted

Consider the following form: <form action="/a" method="post"> <input name="x" type="text" onblur="myonblur(e)" /> <input name="y" type="text" /> <input name="submit" type="submit" value="Submit" /> </form> When focus is on element with name "x" and user presses submit button, onblur event fires but form is NOT submitted. ...

JQuery Modal Popup after window.location

Below is the information required for this problem. default.aspx /test/default.aspx When default.aspx loads the user clicks a button which should then redirect to /test/default.aspx. I have the modal popup working just not with the redirect and ideas? I have tried doing window.location = "/test/default.aspx"; and using a custom settim...

Why DIV shifts when focus() is invoked in onBeforeDeactivate event handler?

I met a wired problem for a web page in IE7/8. The page configured to be dir="rtl". And divRow is made very large width so as its containing div doesn't wrap. Click the editor area, type some words, then click the "Hello world" text. The layout will turns to be messy, because the offset and width of div with divRow class changed. I su...

Input still existing when removed

i append a text input into form by using javascript, after i removed it by removeNode, it disappear, document.forms["form"].length = 0, but i can still get it's obj by using document.forms["form"]["inputname"] (not return null) why? ...

Javascript mouse tracking speed

I was working on a tablet PC using zoho notebook (http://notebook.zoho.com) earlier today and noticed that stylus input is not as accurate or smooth as something like say, OneNote. It seems like the functionality is done in javascript, so my question then becomes: Is it possible to increase the accuracy (for pen tool functionality that i...

Mobile detection using Javascript

Is there a way to detect mobile devices using Javascript? Also, I researched that there are such an XML which contains user-agents that could help to identify the mobile handsets. Many thanks. -V2 ...

Calling a vb linkbutton’s(within a user control) click event from javascript

how can i call a VB function - deleteevent() in usercontrol.ascx.vb from a javascript function in clickhandler(e) in usercontrol.ascx. The call should cause a postback because i need the usercontrol to display the changes. i am currently trying to do it by using a linkbutton with style display:none, and calling its click event from the ...

How do I resize a Google Map with JavaScript after it has loaded?

I have a 'mapwrap' div set to 400px x 400px and inside that I have a Google 'map' set to 100% x 100%. So the map loads at 400 x 400px, then with JavaScript I resize the 'mapwrap' to 100% x 100% of the screen - the google map resizes to the whole screen as I expected but tiles start disappearing before the right hand edge of the page. Is...

How do you reset the 'recenter' button on a Google map after changing the coordinates?

I have a Google map that starts off at a particular location then you can click a button to change the location. How do I then reset the 'recenter' button so if you click it you go to the second location? ...

window.history.go not working

Hi All I have a button on click of which I want to go one step back using javascript. for this I am using window.history.go although this works fine in IE7 and firefox it is not working in IE6 and there is no change as the user stays on the same page. I m attaching the event to LinkButton ...

Google geomap with jquery fails in IE

Hi all. I faced with problem that geomap by google fails with JQuery together in Internet explorer. Otherwise in Firefox it looks like this: Here comes js references <script type="text/javascript" src="http://maps.google.com/maps?file=api&amp;amp;v=2&amp;amp;key=ABCDEFG"&gt; </script> <script type="text/javascript" src="http://ww...

How do I freeze the first and last columns of an html table in a scrollable div?

I have a table which has a header row, but also a header column and a total column with several columns in between. Something like this: Name Score 1 Score 2 ... Total -------------------------------------- John 5 6 86 Will 3 7 82 Nick 7 1 74 The en...

How to read all child elements with tag names and their value from a xml file?

I've a xml file in which I'm storing some HTML content in an element tag called <body>. Now I'm trying to read all the HTML content of body tag using XML DOM in JavaScript. I tried this code: var xmlDoc=loadXMLDoc('QID_627.xml'); var bodytag = xmlDoc.getElementsByTagName("body"); document.write(bodytag); but it is showing [object HTM...

List all javascript events wired up on a page using jquery

Using jqeury, is it possible to get a list of all the events and to which element the event is bound to? ...

How to get elements which have no children, but may have text?

the empty selector says that: Matches all elements that have no children (including text nodes).Finds all elements that are empty - they don't have child elements or text. What i want is to get elements which has no children but may have text inside., how? UPDATE: Example: I want select these elements which has no children but may hav...

Javascript BigDecimal library?

Is there a good javascript BigDecimal library out there? I saw this one: http://www.navioo.com/javascript/BigDecimal_for_JavaScript_959.html# (also known as http://stz-ida.de/html/oss/js_bigdecimal.html.en) But that looks like it was autogenerated from java to javascript. It's 180K and declares global variables all over the place. I d...

JavaScript: Inheritance and Constant declaration

Help, I have this class var jMath = { pi2: Math.PI, foo: function() { return this.pi2; } } I want to make the pi2 constant and i want jMath to inherit from Math object. How do I do that? ...

Need to discover if A dotnet framework is installed on the client computer.

I need to device a way to learn if the user who surfs to my site has dotnet framework installed on his computer, and which version (less important). I need this to work at least with Firefox and IE 7 and up. Any ideas? (Is there any web service the Framework on the "localhost" exposes?) ...

What's the best way of stopping users from copying and pasting text from a web app?

The site I'm working on displays some proprietary 3rd party data that's quite valuable. As such they want to stop people copying and pasting their information. They understand that, of course, there's nothing we can do to stop users just writing down info or printing it off, but they want to make it as difficult as possible for their dat...

Using offset and jQuery slider

I am using offset() with the jquery slider and I am so close to achieving my goal, but it is off slighty. I have it animating using animate to the top CSS coordinates but if you check out: http://www.ryancoughlin.com/demos/interactive-slider/index.html - you will see what it is doing. My goal is to have it fadeIn() and display the value ...