javascript
How to make a div, an iframe and write inside the iframe with javascript
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.
- liviu's blog
- Login or register to post comments
- Read more
Php include_once equivalent for javascript
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)
{
- liviu's blog
- Login or register to post comments
- Read more
Php functions in javascript
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.
- liviu's blog
- Login or register to post comments
- Read more
Lightbox and graybox
Two ways to show something (like pictures) in a cooler way, using javascript are the lightbox and graybox.
- liviu's blog
- Login or register to post comments
How to add a page onload event
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.
- liviu's blog
- Login or register to post comments
- Read more
javascript typecasting
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
- liviu's blog
- Login or register to post comments
javascript bidimensional array working example
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:
- liviu's blog
- Login or register to post comments
- Read more
How to debug javascript
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
- liviu's blog
- Login or register to post comments
- Read more
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)");
}
- liviu's blog
- Login or register to post comments
How to disable right click with javascript
I don't remember where i found this script to disable right click using javascript.
- liviu's blog
- Login or register to post comments
- Read more