javascript

Horizontal Scrolling

I am working on a site that displays pictures accross the Y axis of the browser and spans about 12500px wide. I am using the Hortizontal way as a base but I have just realized that the horizontal scrolling with both the arrows and the mouse's wheel does not work in both safari and chrome. http://www.thehorizontalway.com/ Is there any...

XMLHttpRequest question

Hi, i have a php file on the server, it just prints random numbers. And i want to get this numbers by using XMLHttpRequest from another domain. how can i do this? thanks ...

Why is Firebug's console.trace reporting 'anonymous' as the function name during the trace?

Say I have the following code: var f1 = function (a) { return f2(a + 1); }; var f2 = function (a) { return f3(a + 1); } var f3 = function (a) { console.trace(); }; f1(5); I am doing a console.trace in f3 and this is what the Console is displaying: My question is, why is Firebug displaying anonymous instead of the fun...

Resize and drag Image

Can anyone suggest the script for Image Resize with drag? But I want the script with the handles associated with Image so we can resize and drag Image. (Like Div Resizing). Thanks... ...

How to add a dynamically created node(tag) at the desired location?

Suppose I have two DIVs on my page. <body> <div id="d1"></div> <div id="d2"></div> </body> I want to create a new DIV dynamically using JavaScript and place it between d1 and d2. If I use the appendChild method the new DIV is placed at the end. Right now I can only think of paring the innerHTML of the BODY and appending the new DIV a...

php array usage in javascript, jquery

Using JsonEncode i got the php array in javascript. How i can get the modified array back to php.? ...

Server push: comet vs ape?

I've read a little about comet and also APE. Which one is better? I want the users to see other users updated content. Like Google Wave. And in comet, there are 2 versions: iframe vs traditional ajax. what is the difference and which is better. I dont quite understand it. Thanks. ...

Find base name in URL in Javascript

I want to extract the base name from a image URL in Javascript. Would somebody care to give me a a hand on the Regex? The rule would be: return everything right of the last / left of the last . www.domain.com/images/image.hires.jpg if no . is found, return the full base name www.domain.com/images/image_hi_res I have a clumsy /\/[^...

Finding the tab that fired an http-on-examine-response event

I'm using the nsIObserverService to monitor the responses, but it fires events for all tabs (browser in Mozilla terminology). I'd like to know which browser is getting the response in my observe method. ...

Is there a Server Side Javascript engine for IIS?

I am looking for a solution similar to Aptana's Jaxer where I can execute javascript server side. ...

using android application framework classes in client-side javascript

Hello, How do I consume Android Application Framework objects in my client-side JavaScript? In the Google I/O 2009 Presentation "How Do I Code Thee" http://developer.android.com/videos/index.html#v=GARMe7Km_gk The speaker discusses this pattern (which he calls augmented JavaScript). On the Android developer site, I can't seem to find ...

Trying to display text content of <a> in <canvas> without any visual difference

Hi all, Let's say that I got the following code in a page: elit ac <a href="http://www.ducksanddos/bh.php" id='link'>Hello world!</a> nunc And that I want to make the <a> contain a <canvas> element which will display the exact same text and will look exactly like the <a> looked before the change, resulting code: elit ac <a href="htt...

CSS and javascript files not resolving after migrating app to Win 7 dev machine.

Hi - I have a ASP.Net 3.5 web site I developed on my old XP sp3 machine. The app uses Master Pages and App_Themes that include style sheet and images - and also an image folder off the main root for most of the images. There are also some javascript files in a /scripts folder for jQuery and one other. I now have a brand new Win 7 64-bit...

Javascript/Jquery Refresh timer

I have a simple system that refreshes a div every few seconds: $(document).ready(function() { $("#nownext").load("response.php"); var refreshId = setInterval(function() { $("#nownext").load('response.php?randval='+ Math.random()); }, 20000); }); Now, because of what the content is, it is more likel...

AJAX not working with jQuery

I want to load in <div class="test"> some content from another URL ex: http://someurl.com/default.aspx. I tried this code: $(".test").load( 'http://someurl.com/default.aspx'); But it doesn't work. With local file it works, but not with http://... Can somebody help me? Thanks ...

Display Dialog from Chrome Extension

I am trying to display a modal Javascript dialog box in Chrome when a user creates a bookmark. However, after trying Closure and SimpleModal+JQuery, I can't seem to get a dialog box to appear. Is this a restriction of extensions in Chrome, or am I doing something very wrong? (I'm still learning Javascript, so my lack of understanding ...

Why is setTimeout so fickle and semi-functional?

function load_result() { $.getJSON( "http://somesite.com/loadresult.php", function(data) { if( data == undefined || data == null ) { console.log( "no data" ); clearTimeout( lr_timeout ); lr_timeout = setTimeout( "load_result()", 2000 ); return; } insert_r...

How to make the browser display image with same name and not the cached one ?

I have solved this with PHP by adding the 'time()' to the img src tag. But how is it done with Javascript, same way? Here is my code: th_div_html+= "<img src='"+path_th_img+"' class='shadow2' style='margin:7px;' onclick='imageShow("+z+");'>"; I'm better with PHP than javascript so I need your help on this one. How can I add somet...

Best server-side javascript servers.

Hey, I've been wondering to try out server-side javascript for a while. And I'm finding a good amount of servers, like: Node.js Rhino SpiderMonkey among others. Could anyone with experience on server-side javascript, tell me which are the best engines? and why? I like the Node.js because it's based on Google's V8 engine. And seems ea...

Cannot retrieve CKEditorFuncNum in CKeditor 3

Hi, I am using the upload feature in the latest CKeditor, it displays the upload button fine and send to the correct upload file. The problem I have is that the CKEditorFuncNum is empty. This is the code I am using in the upload script. <script type="text/javascript"> var CKEditorFuncNum = <?php echo $_GET['CKEditorFuncNum'];...