aleksanteri Posted April 6, 2006 Share Posted April 6, 2006 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 More sharing options...
raimo Posted April 6, 2006 Share Posted April 6, 2006 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now