I am currently investigating options for working with the canvas in a new HTML 5 application, and was wondering what is the current state of the art in HTML canvas JavaScript libraries and frameworks?
In particular, are there frameworks that support the kind of things needed for game development - complex animation, managing scene graphs, handling events and user interactions?
Also willing to consider both commercial and open source products.
I am trying to extract data from a website using PERL. Below is the description of the site:
site displays data dependent on a date
a calendar is displayed that is used to change the date
upon clicking the dates in the calendar, it calls a javascript function that passes in the date and refreshes the part of the page that displays the data
My question is, how do I execute that JS function so that I could loop through the dates that I need data from?
Thanks in Advance
Why do I never see the prototype property in JavaScript code I edit, from books and documentation I've read, it seems to be a cornerstone of the language.
I want to make an "Open File" button to import txt files contents into a textarea.
How can I read the file contents without uploading it to the server?
I want to use javascript (with jquery lib) and I want to do it without refreshing the page.
<?php
$data = array('foo'=>'bar',
'baz'=>'boom',
'cow'=>'milk',
'php'=>'hypertext processor');
echo http_build_query($data);
/* Output:
foo=bar&baz=boom&cow=milk&php=hypertext+processor
*/
How to do similar thing in javascript,say, get the query string from the array ,and convert the array to query string?
How can I loop through all members in a JavaScript object including values that are objects.
For example, how could I loop through this (accessing the "your_name" and "your_message" for each)?
var validation_messages = {
"key_1": {
"your_name": "jimmy",
"your_msg": "hello world"
},
"key_2": {
"your_name": "billy",
"your_msg": "foo equals bar"
}
}
I'm compiling a list of audio + video players (flash / javascript / other) that I can embed into a website.
flowplayer: http://flowplayer.org/
jw player:
http://www.longtailvideo.com/players/
premium beat:
http://www.premiumbeat.com/flash_resources/free_flash_music_player/
xspf web player:
http://musicplayer.sourceforge.net/
yahoo media player:
http://mediaplayer.yahoo.com/
any popular ones I'm missing? (anyone know if I can skin / customize any of them to operate similar to the Windows vista volume control?)
How to capture key press, e.g., Ctrl+Z, without placing an input element on the page in JavaScript? Seems that in IE, keypress and keyup events can only be bound to input elements (input boxes, textareas, etc)
They are very different kind of languages and the way they handle exception might be pretty different.. How is exception handling implemented and what are the implementation difference within these languages?
I am asking this question also because I noticed that C++ exception handling seems to be very slow compared to the JavaScript version.
I'm considering creating a simple remote debugging application for Javascript. Actually, I want to provide an object to Firebug Lite and let it do all the job.
So, can I get an object from one page, serialize it, send it to server and then to another browser and finally see the same results in Firebug Lite (on that other client) as I would see on the first browser (with doing "console.dir(obj)")? Is it possible to do?
How do I set up a listener in jQuery/javascript to monitor a if a value in the textbox has changed? The value is fed into the textbox by a scanner,so each time an item is scanned the value in the textbox changes.I need to display some information based on the value in the textbox.
We need to clear the authentication cache in IE with Javascript. On IE6 we use: document.execCommand('ClearAuthenticationCache'); and it works. On IE7 it doesnt work.
what can i do? thanks...
I've recently read the Yahoo manifesto Best Practices for Speeding Up Your Web Site. They recommend to put the javascript inclusion at the bottom of the HTML code when we can.
But where exactly and when ?
Should we put it before closing </html> or after ? And above all, when should we still put it in the <head> section ?
Do .htc style behaviours still work if javascript is disabled?
I'd like to use whatever:hover to create some css only drodpowns and would like to know if IE will still pay attention to the htc file if js is disabled.
Many thanks
Possible Duplicates:
Do you recommend using semicolons after every statement in JavaScript?
Why use semicolon?
What are the ups and downs of using semicolons to end commands in JavaSript? What are the arguments for and against doing so?
Do anyone know how do use javascript to redirect user login using Google Accounts?
I know there is "users.create_login_url(self.request.path)" but how do that integrated to "`window.location"
Or there is alternative??
In javascript, how would you check if an object is actually visible. I don't just mean checking the visibility and display attributes. I mean, checking that the element is not
visibility:hidden or display:none
underneath another element
scrolled off the edge of the screen.
EDIT: For technical reasons, I can't include any scripts. I can however use prototype as it is on the page already.
EDIT 2: This is no longer neccesary, but I'd still find an answer interesting)
When initializing a new Date object in JavaScript using the below call, I found out that the month argument counts starting from zero.
new Date(2010, 3, 1); // that's the 1st April 2010!
Why does the month argument start from 0? On the other hand, the day of the month argument (last one) is a number from 1 to 31. Are there good reasons for this?
I've noticed that the brightness of computer monitors drastically varies between computers.
As such, this changes the look of web pages greatly.
Is there a way to use JavaScript to automatically detect how bright (or dark) a users monitor is so that I can adjust my web page colors accordingly?
UPDATE
Please note that I do not want manual user involvement. I want this detection to be automatic so that users don't realize I dynamically change the color palette automatically based on the brightness/darkness of their monitor.
Hi guys,
Is there any javascript to disable "export to microsoft excel option" on right click in browser. though it can be done using web.config, but there is this need to do it using js.
TIA
Bibhu
What is the recommended way to zerofill a value in JavaScript? I imagine I could build a custom function to pad zeros on to a typecasted value, but I'm wondering if there is a more direct way to do this?
Note: By "zerofilled" I mean it in the database sense of the word (where a 6-digit zerofilled representation of the number 5 would be "000005").
I have a window I'm opening with a Javascript function:
function newwindow()
{
window.open('link.html','','width=,height=,resizable=no');
}
I need it that once the new window opens that the focus returns to the original window.
How can I do that?
And where do I put the code - in the new window, or the old one?
Thanks!