Difference between revisions of "Javascript"

From Wikicliki
Jump to: navigation, search
Line 1: Line 1:
[[Category:Programming|Javascript]]
 
 
 
What is going on.
 
What is going on.
  
Line 54: Line 52:
 
*[[Javascript Sandbox]]
 
*[[Javascript Sandbox]]
 
*[[Actionscript-Javascript Interaction]]
 
*[[Actionscript-Javascript Interaction]]
 +
 +
 +
[[Category:Programming|Javascript]]

Revision as of 03:38, 1 June 2009

What is going on.

Fullscreen

i found that the [NHS flu site http://www.immunisation.nhs.uk/Vaccines/Flu] resized itself to the fullest biggest width of the browser window. irregardless of how big it was. very accessible naturally.

/js/size.js :

var pixelsPerEm;
window.onresize = rze;

function lde() {
 	pixelsPerEm = document.getElementById('sizer').offsetWidth;
	var date = new Date();
	date.setTime(date.getTime()+(60*60*1000));
	document.cookie = 'pixelsperem='+pixelsPerEm+'; path=/';
	rze();

}

function rze() {
	document.body.style.fontSize = (100/((48.5*pixelsPerEm)/document.body.offsetWidth))+"%";
	var date = new Date();
	date.setTime(date.getTime()+(60*60*1000));
	document.cookie = 'textsize='+document.body.style.fontSize+'; path=/';
}


document.write

document.write("Hello") // - prints Hello
var text="Hello"
document.write(''+text+'') // - prints Hello
var text="Hello"
document.write(''+text+'') // - prints Hello

Array

ARGHAGHGHHGHHHHHHHHHHHHHHHHHHHHHH

Blur/Focus

Focus: puts the cursor in that box to begin with.

See Also