javascript

Javascript: onClick event requiring two clicks b/c of onMouseOver handler

I have a Netflix/Amazon style star-rating system. Thus, the stars temporarily light up onMouseOver and a click is supposed to trigger a PHP call and a permanent change in star color. Everything works, although the onClick event isn't triggered until the second click. It appears that this is because the onMouseOver event is still activ...

Javascript Browser Recognition

I was doing the browser recognition tutorial on w3schools,and I found that when using firefox and google chrome I received Netscape 5 as my result. I was just curious as to why this is. Anyone care to explain it to me? ...

Best way to generate unique ids client-side (with Javascript)

I need to generate unique ids in the browser. Currently, I'm using this: Math.floor(Math.random() * 10000000000000001) I'd like to use the current UNIX time ((new Date).getTime()), but I'm worried that if two clients generate ids at the exact same time, they wouldn't be unique. Can I use the current UNIX time (I'd like to because tha...

monitoring iframe content/status from the parent page

What methods are available to monitor the status of IFRAME page, I know there are security limits but I hope some small notification system is still possible. My situation is that I have created a parent page that is located on customer's server, and this page has has iframe page located on my server (my domain). I need to somehow comm...

Programmatically add 3-D shapes to Bing Maps (Virtual Earth)

How can I programmatically add 3-D shapes to Bing Maps (Virtual Earth)? ...

Let the end user draw shapes on bing maps (Virtual Earth)

How to let the end user draw shapes at runtime on bing maps (Virtual Earth)? ...

How to change adsense ads location with javascript?

What i am trying to accomplish is what the guy says in an adsense optimisation video at 8:04 . I want to change the ad code position on the page, not the ad display. Hope you understand what I mean. Thanks. ...

Background color percentage?

Is their any way I can use a background color to show in 50% of my division using either css or javascript???The box in which I want to do this has a background Image[png] which I want to fill 50% with a color for showing ratings...... I can use an Image of the half filled background Image but I believe that would slow down my Rating sys...

Javascript to extract value of each checkbox in checkboxlist

I have 5 check box lists, which all are selectives, which are criterias which need to be chosen in order to create filters. What I need is to have something like this, after selecting items from the check box lists, just for the user to have an idea what he or she has chosen "You have chosen countries - United Kingdom, Africa" "You hav...

Need to insert a 'dot' in textbox where the textbox is validated by using javascript to enter only numerical values.

Here is the code which woks perfectly and validate to enter only digits in a TEXT BOX. Now i have a problem there. My problem is i need to enter decimal values there. So i need to enter 'DOT' in the TEXT BOX. This validation has been done by using ASCII values. I even use the ASCII value of 'DOT -> 249, 250'. But it doesn't work. Any hel...

prevent kill frame

instead of asking how to kill frame. i interested to know what technique can be used to prevent an iframe inside a page from been killed by "frame killer" ...

Javascript Window.Open Dimensions

I'm opening a new window from javascript using this code window.open('index.htm', 'myWindow', 'width=1020,height=400'); However the window seems to be opening 10px too wide when measuring from outter border to outer border, I've only tested this on IE7 and IE8 so far. Does anyone know what could be causing this? ...

read-only property

Is it possible to make a javascript object property read-only? I want to set a property that cannot be modified... ...

Sending html email having JQuery scripts

Hello , I'm using PHP to send html emails. I've tried to import css files inside the email, and it works fine. <link href="http://www.mywebsite.com/css/mail_styles.css" type="text/css" rel="stylesheet" /> But i want the email to look stylish with some JQuery tricks, so i tried to import the JQuery library inside the email to a...

How can I set Html object height same as window height?

I have flash object embedded to my page and it should act as background animation. I have trouble setting height of object element, because firefox doesn't understand height="100%" value. <object classid="my_class_id" width="100%" height="100%" id="my_id"> <blaa blaa /> </object> ...

How to perform a rectangular hit test in PHP

Hi, I have WYSIWYG style javascript interface that allows a designer to create rectangular regions to generate a document server side. It is important that these regions do not overlap. I was wondering what is the single most efficent way to perform a hit test on 2 rectangular regions, there could potentially be hundreds, so efficenc...

XCode, iPhone, WebKit Framework - What am I missing?

Hi all, I'm very new to XCode so please excuse my ignorance. I've spent a day now trying to figure out what I'm doing wrong, following several tutorials. I've got a iPhone/Window project setup in XCode. I've got a UITabBar and a UIWebView, when a tab is selected the UIWebView navigates to a particular URL and everything is working great...

JavaScript file to byte[]

Is it possible to read a file in from a path in JavaScript and create a byte[] of that file? ...

Smooth javascript animation

Here is some code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"&gt; <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>Untitled Document</title> <style> body { margin:0; padding:0; } #a { position:absolute; background:#0FF; left:0; height:...

do included javascript files have access to global variables in the parent document?

Imagine some code something like this: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"&gt; <HTML> <HEAD> <TITLE>BLAH</TITLE> <script language='Javascript' type='text/javascript'> var ScriptVersionReqd='1.0'; </script> <script language='JavaScript' type='text/jav...