TeddyKiller Posted May 31, 2010 Share Posted May 31, 2010 I'm not sure what place this should be in, but it's compltely driving me nuts. I'm having chinese/japanese figures showing up instead of doing anything the code states. Example here This is my code.. <html> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <head> <script> function selectMenu(VALUE) { var HTML = ''; HTML += '<table>'; for(var VAL = 1; VAL <= VALUE; VAL++) { HTML += '<tr><td>Choice ' + VAL + '</td><td><input type="text" name="field' + VAL + '" /></td></tr>'; } HTML += '</table>'; document.getElementById('selects').innerHTML = HTML; } function setCookie(VALUE) { var NAME = 'myCookie'; var DATE = new Date(); DATE.setTime(DATE.getTime()+(15*60)); // Minutes * Seconds var EXPIRE = DATE.toGMTString(); document.cookie = NAME + "=" + VALUE+"; expires=" + EXPIRE + " path=/"; } function readCookie(name) { var nameEQ = name + "="; var ca = document.cookie.split(';'); for(var i=0;i < ca.length;i++) { var c = ca[i]; while (c.charAt(0)==' ') c = c.substring(1,c.length); if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length); } return null; } function eraseCookie(name) { createCookie(name,"",-1); } </script> <style> table.td { padding:5px; } </style> </head> <body> <form action="" method="post"> <table> <tr> <td>Poll Name</td> <td><input type="text" name="pollName" onkeyup="setCookie(this.value)" value="readCookie('myCookie')"/></td> </tr> <tr> <td>Number of fields</td> <td> <select name="fields" onchange="selectMenu(this.value)"> <option value="" selected disabled> </option> <?php for($i = 1; $i < 11; $i++) { echo '<option value="' . $i . '" '; if($i == 1) { echo 'disabled'; } echo '>' . $i . '</option>'; } ?> </select> </td> </tr> </table> <div id="selects"></div> <table> <tr> <td><input type="submit" name="submit" value="create" /></td> <td></td> </tr> </table> </form> </body> </html> My host allows php, the rest of my domain uses PHp and it works fine... whats the problem? Link to comment https://forums.phpfreaks.com/topic/203426-scary-japanesechinese-figures-appear-instead-of-code/ Share on other sites More sharing options...
Mchl Posted May 31, 2010 Share Posted May 31, 2010 Check your browser encoding maybe? I can't see anything scary there... Link to comment https://forums.phpfreaks.com/topic/203426-scary-japanesechinese-figures-appear-instead-of-code/#findComment-1065720 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.