Saved Bookmarks
| 1. |
Solve : HTML programming? |
|
Answer» I wrote this to make a button do two THINGS. One is to set a cookie and the other is to send the USER to a webpage. What am I doing wrong? function func2(){ {onclick="window.location.href='http://www.csdvds.com'"} } Javascript code doesn't GO directly "with" the HTML element the script is manipulating. The Javascript NEEDS to go in the of the page. Apart from that, you're missing the code for the functions "setCookie()" and "getFormString()".The syntax is completely wrong here. Javascript does not however need to be in the head of an HTML page - there are sometimes REASONS (execution sequence) for placing in the body. |
|