javascript

How to make a div, an iframe and write inside the iframe with javascript

Tagged:  

What this script does is it makes a div, it attaches it to the dom, in puts an iframe inside the div, and then it writes things inside the iframe.

Php include_once equivalent for javascript

Tagged:  

This one time, in band camp, when i was working on a javascript... script i needed an equivlent for the include_once in php. It was very likely that the code where i was including something got to run multiple times, and this caused problems.
So i found the solution on phpied.com.
So here it is, the php include_once equivalent for javascript:

var included_files = new Array();

function include_once(script_filename)
{

Php functions in javascript

Tagged:  

A bunch of nice people started a project where they port php functions (eg: addslashes) to javascript. So if you have experience in php and you think at some point "I wish i would have this php function in javascript" you might be lucky enough to find it on their site. When i wrote this they ported 399 functions.

Lightbox and graybox

Tagged:  

Two ways to show something (like pictures) in a cooler way, using javascript are the lightbox and graybox.

How to add a page onload event

Tagged:  

How to make a function execute when the page is loaded without putting it in the body tag with onload, but somewhere else in the page.

javascript typecasting

Tagged:  

In case you want to make sure javascript wants to add two values instead of concaternating them when you use "+" you can make them act as an int for example with parseInt:

a+1 might concaternate
parseInt(a) + parseInt(1) will add

javascript bidimensional array working example

Tagged:  

It was kind of hard to make a bi dimensional array in javascript; i struggled a bit when i needed to do so; so tgis is what worked for me eventually:

How to debug javascript

Tagged:  

I found a way to debug javascript, in case something more powerfull is needed:

The how to is described here: http://www.jonathanboutelle.com/mt/archives/2006/01/howto_debug_jav.html

How to call a javascript function from actionscript

This is how you call a javascript function from actionscript (2 I think):
on (press){
getURL("JavaScript:function(argument)");
}

How to disable right click with javascript

Tagged:  

I don't remember where i found this script to disable right click using javascript.

Syndicate content