javascript

What's the best way to debug Javascript on IE ?

What's the best way to debug Javascript on IE ? ...

JavaScript simulate right click through code

Hi All, I am writing some UI tests using Selenium and i have a JavaScript Tree control, using the Dojo toolkit. I have implemented a context menu for each node of the tree using the examples that Dojo provide, but I need the Selenium test to "invoke" the right click on the tree node, but I cannot get this to work. The tests simply do n...

Javascript Debugging in Visual Studio 2008

I'm trying to debug javascript code just by adding a breakpoint in VS2008, but the debugger's not stopping. Do I have to do some special setup in order to enable javascript debugging? Or does the code have to be in a separate js file? ...

CSS stripped from content embeded via Javascript into Div

I have the following file file: <html> <head> <title></title> <script type="text/javascript" src="/Prototype.js"></script> <script type="text/javascript"> function load_content() { new Ajax.PeriodicalUpdater('content', '/UpdatedContent/, { method: 'post', frequency: 5 }); //var fileref = document.createElement("link");...

What is the best way to make a side-scrolling website load quickly?

Hey everyone, I'm new to stack-overflow and programming so forgive me for any awkward phrasing! I am building a side-scrolling website which is graphic-rich, and 680x9400px in size. I will be using some javascript and/or mootools to create a cool side-scrolling effect, similar to http://sursly.com. I am web optimizing all the images ...

Language with similar object use to Javascript/JSON

I've been doing a project at work recently focused on an almost entirely client-driven web site. Obviously Javascript is used heavily, and I've been using jQuery on top of it which has turned out to be an absolute pleasure to work with. One of the things that has surprised me in this is how much I like the JSON object syntax and it's u...

Flex with javascript only?

Have you tried using straight javascript (rather straight ECMAscript 3 standard) in Flex applications, with none of the ECMAScript 4 enhancements? If one were to do so, would it be better to let the AS3 compiler build from the javascript, or use the javascript bridge liberally? ...

File Upload in Javascript ?

Hey all Can any one know how to make file upload control in javascript, for example using a texbox and a button :) Thanks in advance Kishh Dupe of http://stackoverflow.com/questions/408735/javascript-file-uploads ...

How to hide new elements in jQuery?

I have this code: var $msg = jQuery('<div></div>') .hide() .appendTo(document.body) ; if ($msg.is(":hidden")) { console.log("hidden"); } else { console.log("visible"); } When run, it logs "hidden" on Firefox, but "visible" on Google Chrome. Is this a bug, or am I doing something wrong? ...

Organizing files of a website powered by PHP, Smarty, JavaScript, MySQL

I am writing an web application powered by PHP, Smarty, JavaScript, CSS, MySQL. There will be some classes, which will be used through out the application. There will be some scripts which will use those classes. Any good article, tutorial, architecture on how to organize files for a web site? P.S. It should contain how to organize a...

JavaScript function parameter

I am trying to pass a number to my JavaScript function, but actually a wrong value is getting passed. I am giving the entire code here: <html> <head> <script type="text/javascript"> function test(num) { /*It should alert as 01004 or 1004 but to my surprise it's alerting as 516!*/ alert(num); } </script> </head> <body> <a href="javascrip...

xslt, javascript and unescaped html entities

i have a tiny little problem with xslt, js and html entities, eg. within a template: <script type="text/javascript"> <xsl:value-of select="/some/node"/> for (var i = 0; i &lt; 5; i++) { // ^^^ js error } </script> <script type="text/javascript"> <xsl:value-of select="/some/node"/> for (var i = 0; ...

Howto activate javascript-tag fetched from iframe?

I have a Rich Text Editor in Javascript in which I want to be able to enter an embedded widget in a Javascript tag. I.e: <script src="http://www.mydomain.com/script.aspx?id=123" type="text/javascript"></script> Still using JS I move the html-content from the iframe into a DIV in the page: <script> function copyRtfToDiv() { ...

What are good resources for getting started with jQuery?

jQuery and JavaScript in general are new ground for me. What are some good resources to get me up and running. I am particularly interested in page manipulation - eg moving elements about programmatically. ...

Refresh a Div that has a Google ad inside it

Hello all, I have a div that holds a google ad. My website is mostly AJAX and there is no need for a browser refresh. That means my ads will not refresh either, which isnt ideal, a user staring at one ad all day. So I wanted a way to refresh a particular div on a page. I found many solutions but they didnt work. For example, using JQu...

How can I send a JSON response from a Perl CGI program?

Hi, I am writing a JSON response from a perl/cgi program. The header's content type needs to be "application/json". But it doesn't seems to be recognized as response is thrown as a text file. I would be capturing response using JSON library of jQuery. Where am I missing in sending the JSON response. ...

Jquery Draggable with more than one handle

Is it possible to have a Draggable element with more than one handle? I am initializing it twice, each time with a different handle param, but it doesn't work - only the first one works. ...

How do I pass information between Flash's ExternalInterface and JavaScript?

How do i pass three arguments using external interface in flash to a java script function and get back output and display it in flash? ...

Dynamically changing stylesheet path not working in IE and Firefox

I have the following file: <html> <head> <title></title> <link rel="css" type="text/css" href="/empty.css" title="css" /> <script type="text/javascript" src="/Prototype"></script> <script type="text/javascript"> function load_content() { var d = new Date(); new Ajax.PeriodicalUpdater('content', '/DOC?'+d.getTime(), { method: '...

Dynamically updating an RSS feed URL

Is it possible to dynamically the URL of a feed that has been instantiated in the header of a page via JavaScript? For example, is it possible to update the URL of the rss feed in the following snippet: <html> <head> <link rel="alternate" title="Feed" href="/rss.feed" type="application/rss+xml"> </head> <body> ... </bod...