Jump to content

Storing data = out of memory = ?


aleksanteri

Recommended Posts

I visited the HTML DOM reference and got a code about radio buttons in an example. I modified it to pop up an alert about it when a button is pressed. However, after an hour of thinking I got the button work but it displays "Out of memory at line: 8". Now what is this?

<html><head><script type="text/javascript">function alert(){	// alert	var BrowserName;	BrowserName = document.getElementById('storage1').value;	alert(BrowserName);}function store(browser){	// store	document.getElementById('storage1').value=browser;}</script><style type="text/css"><!--body{background-color: #eeeeee; color:#0000aa; font: verdana 10px}--></style></head><body><p>What's your favorite browser:</p><form><input type="radio" name="browser" onclick="store(this.value)"value="1">Internet Explorer<br /><input type="radio" name="browser" onclick="store(this.value)"value="2">Firefox<br /><input type="radio" name="browser" onclick="store(this.value)"value="3">Netscape<br /><input type="radio" name="browser" onclick="store(this.value)"value="4">Opera<br /><input type="hidden" name="storage1" value="" /><br /><input type="button" value="Click Me to see the results" onclick="alert()"></form></body></html>

Link to comment
Share on other sites

I visited the HTML DOM reference and got a code about radio buttons in an example. I modified it to pop up an alert about it when a button is pressed. However, after an hour of thinking I got the button work but it displays "Out of memory at line: 8". Now what is this?
It is called our language as "ikuluuppi" :) (if You are Finnish, I quess You are?)You can not use alert as an function name. It's a very reserved word in JavaScript.PS"ikuluuppi" is nickname .. something like "never ending loop" :)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...