javascript

javascript onclick event over flash object

Hi Guys, I have one embed flash movie inside one div, I put one javascript onclick event handler in the main div, but isn't catching the click, what is wrong? Code: <div id="top-box-player" onclick="alert('Hi Bananas!');"> <object width="400" height="300"> <param name="movie" value="general.swf"> <embed src="./...

How does one access the Node Type Constants in IE

Hi, I have a node that I'm note sure is an element (from calling node.previousSibling). However I am having trouble finding out the cross browser javascript way to access the Node constants shown on the MDC. In all browsers but IE Node.ELEMENT_NODE is defined. I tried using a specific instance of node, e.g.: e=$("#element_id")[0]; ale...

Javascript: window.open not working in IE8?

This is the Javascript I'm currently using: window.open('/modules/mod_oneononechat/chatwindow.php?key='+key+'&color=blue','x'+winName+'x','location=0,status=0,toolbar=0,menubar=0,resizable=0,scrollbars=0,height=375,width=420'); This doesn't seem to be working in IE8. It's a chat window that works fine on all other browsers (including ...

Does anyone know where I can find the "Orto" Javascript JVM?

I've read about "Orto", a Java virtual machine that runs on Javascript, but I can't find the actual code, only a few articles about it - like this one: http://ejohn.org/blog/running-java-in-javascript/ Does anyone know where I can find Orto itself, or something else that can run Java bytecode on Javascript? Note that the GWT doesn't me...

How to debug javascript in asp .net MVC?

I am using Visual Web Developer 2008.I have debug my javascript at localhost by adding a breakpoint/debugger in js file.It works perfectly in IE8 before. This nice debug function is broken, after I try a developer tools(Press F12 in IE8). ...

How to display information at the status bar of browser?

How can I change the text displayed in the status bar of a web browser using javascript? jQuery can be used as well. ...

How can Javascript cause IE 8 to reload a page in compatibility view?

I'm testing a fairly complex Javascript-based web application in Internet Explorer 8 on Windows Vista. After loading the application, IE is in "standards" browser mode and "IE 8 standards" document mode. While the application is running, IE will sometimes reload the page and display a message saying something like "A display problem with...

Using jQuery for alternating png transition

Very basic question. I have a very simple web design utilizing a png with transparency, overlaying another base image. The idea here is that it cycles visibility continously, fading in quickly, displaying for a longer interval, fading out quickly, and remaining invisible for an equal longer interval, basically replicating the behavior of...

Powerfull WYSIWYG editor with upload image capability

Can any one please recommend a powerful WYSIWYG (commercial/open source) editor which has a image upload capability.Which iam planning to use for my publishing platform. I have been looking for it since morning but could not able to find it. I found CKeditor+CKFinder , but CKFinder is not available in django/ python language. I tri...

TinyMCE is changing my inline CSS

I input this in the HTML editor: <p style="border:1px solid #edede4;border-top:none"></p> I click update, and click the html editor again. The HTML (in Firefox) has changed to: <p style="border-style: none solid solid; border-color: -moz-use-text-color rgb(237, 237, 228) rgb(237, 237, 228); border-width: medium 1px 1px;" mce_style=...

Pulling alt's value

I am looking to use Javascript or jQuery to pull the alt tag from the specific image that had been clicked in the HTML and copy its value into a caption field. function change_image(diff){ var newAlt = $(this).attr('alt'); position = (position + diff + hrefs.length) % hrefs.length; revealImage(hrefs[position]); $nav.find('.count...

Why does this javascript/jQuery JSON parsing code not work?

Here is my jQuery code. It should parse the json returned by this php script. The php is known to work. It should also convert the date literals to a javascript date object. However, an error occurs at dates.length. Can anyone see what is wrong with the code? if($("#calendar").length) { var dates; $.post("/dates/jsondates.php",f...

Possible to send growl message with javascript?

Is it possible to post a growl notification to the user's computer with javascript? This will be only on an intranet application so security is not a major concern. Additionally it will be limited to only Mac users with Safari or Firefox. Thanks. ...

JavaScript method chaining challenge

(This question is not really restricted to the language so please feel free to submit solution in other languages too.) I was just wondering if it would be possible to write something like this in JavaScript: // Wait 3 seconds and then say our message in an alert box wait(3).then(function(){alert("Hello World!");}); Where the traditi...

Showing Loading indicator while loading content in the inframe

Code for Showing Loading indicator while loading content in the inframe 1)When a postback/submit take place in the form inside iframe ...

Passing Python Data to JavaScript via Django

I'm using Django and Apache to serve webpages. My JavaScript code currently includes a data object with values to be displayed in various HTML widgets based on the user's selection from a menu of choices. I want to derive these data from a Python dictionary. I think I know how to embed the JavaScript code in the HTML, but how do I emb...

Why will this jQuery code only work in Firefox?

I have some code that allows you to scroll back and forth between images that are brought to full-size in a lightbox. It just replaces the source of the image when a key is pressed. It works perfectly in Firefox, but doesn't seem to do anything in IE, Chrome, and Safari (the only other browsers I tested). Any help would be greatly app...

How can I search inside javascript text with firebug?

The "search" (magnifying glass) on the top-right hand corner of firebug does not search inside javascript blocks, so if I have, for example, this: <script type="text/javascript"> var fooBar = "baz" </script> somewhere in a page, I can't find where "fooBar" is located. Is there any way to do it? ...

Central Management of Javascript

How do you manage Javascript content on a larger website? I'm especially struggling with various $(document).ready()'s and the fact that I need to juggle all those id ($('#id')) strings. I thought of combining the necessary $(document).ready() with each "module" that uses them but this results in visible speed degradation as I don't have...

How do you refactor JavaScript, HTML, CSS, etc?

I'm using Eclipse and the current solution (which I dislike) is to use "Search/Replace". This is an error prone solution. Do you know any better approach to refactor JavaScript, HTML, CSS resources safely in big applications? Or do you use any other cool refactoring tool(s)? ...