Cod-nes Posted December 29, 2009 Share Posted December 29, 2009 The problem is that the on and off buttons to the javascript function send do not work. here is my code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"><html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>Domestic Aid/Pomoc Domowa</title><META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW"><style type="text/css">body {font-family:"Times New Roman";font-size: 14pt;background-color: #CCCCFF;}.big {background-color: #33CCCC;font-size: 26pt;border-bottom: 5px solid #000000;border-top: 1px solid #000000;border-right: 1px solid #000000;border-left: 1px solid #000000;padding: 10px;}.small {padding:5px;border: 1px solid #000000;border-top-style: none;}</style><script type="text/javascript">function reload() {window.location.replace('index.php');return;}function load(pomoc) {var text = "<form action='index.php'><input type='button' value='Send Help/Wyslij Pomoc' onclick='load(\"send\")'> <input type='button' value='Receive Cry of Help/Otrzymuja Wolanie o Pomoc' onclick='load(\"receive\")'><br><a href='index.php?pomoc=delete'>Remove Cookie/Usunac cookie</a></form>";if(pomoc == 'send') {var text2 = "<br>Send Help/Wyslij Pomoc<br><form action='index.php'><input type='button' value='On' onlick='send()'> <input type='button' value='Off' onlick='send()'></form>";document.getElementById("s").innerHTML=text;document.getElementById("s").innerHTML+=text2;}else if(pomoc == 'receive') {var text2 = "<br>Receive";document.getElementById("s").innerHTML=text;document.getElementById("s").innerHTML+=text2;}else {document.getElementById("s").innerHTML=text;}}function send() {document.getElementById("s").innerHTML='text';}</script></head><body><div class='big' id='b'>Domestic Aid/Pomoc Domowa</div><div class='small' id="s"><form action='index.php'><input type='button' value='Send Help/Wyslij Pomoc' onclick='load("send")'> <input type='button' value='Receive Cry of Help/Otrzymuja Wolanie o Pomoc' onclick='load("receive")'><br><a href='index.php?pomoc=delete'>Remove Cookie/Usunac cookie</a></form></div></body></html> Link to comment Share on other sites More sharing options...
justsomeguy Posted December 29, 2009 Share Posted December 29, 2009 Check your spelling on the buttons. Link to comment Share on other sites More sharing options...
Cod-nes Posted December 30, 2009 Author Share Posted December 30, 2009 Thank you! ^^ It works now. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.