Jump to content


  • Posts

  • Joined

  • Last visited

Previous Fields

  • Languages

Contact Methods

  • Website URL
  • ICQ

Cod-nes's Achievements


Member (2/7)



  1. I keep getting a Internal Server Error message when I try to password protect a folder using .htaccess. Here is my codes. What am I doing wrong? C:/Documents and Settings/XXXXXXX/My Documents/Mowes Server/www/.htaccessAuthUserFile C:/Documents and Settings/XXXXXXX/My Documents/Mowes Server/.htpasswdAuthType BasicAuthName "My Secret Folder"Require valid-user C:/Documents and Settings/XXXXXXX/My Documents/Mowes Server/.htpasswdtest:cOYEWO52hnJoc OS: Windows XpServer: MoWeS 2.0.3Apache/2.2.11 (Win32) PHP/5.3.5 Server
  2. I don't know what's wrong with my RSS. Can anyone help me?http://thelostwaters.com/rss.php
  3. The popup creates itself when it isn't opened and act='close'. Is there a way to make that so it won't open?
  4. I'm trying to get the value for radios using JavaScript but I keep getting undefined values. >.< What am I doing wrong? function checka() { var a = document.seaform.searadx; alert(a);} <form name="seaform" action="java script: msgsea()" method="get"> <div style="margin-bottom:4px;">Search for username: <input type="text" id="search" maxlength="12" size="12" onkeyup="msgsea()"> <a href="java script: msgsea();">Search</a> <br> That begins with the keyword: <input type="radio" name="searadx" value="begins" checked="checked"><br> That contains the keyword: <input type="radio" name="searadx" value="contains"><br> That ends with the keyword: <input type="radio" name="searadx" value="ends"> <a href="java script:checka()">Test Value</a> </div></form>
  5. Thanks. It looks like it works. =D By the way, what does the + do? Also where would I put in this: {4,12}? (I forgot to add it.)
  6. How can I validate input from a form that only allows numbers and letters in php?
  7. EDIT: I SOLVED IT.----Settimeout doesn't want to function even though the rest of the code works and I don't know why. var t;function time() {var ele = document.getElementById('ele');check(ele.value); // THIS WORKSt = setTimeout("check(ele.value)",100); // THIS DOESN'T WANT TO WORK} ----The solution for setTimeout: t = setTimeout(function() { check(ele.value)},100);
  8. Thanks. I have a question. Can we do a return function with the response text after xmlhttp.send() or is that not allowed?
  9. I want the function checkuser() to return a true/false status based on the server response, but the script returns to inter function of checkuser(). function checkuser(user) { if (window.XMLHttpRequest) { xmlhttp=new XMLHttpRequest(); } else { xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); }xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4 && xmlhttp.status==200) { alert(xmlhttp.responseText); if(xmlhttp.responseText == 'usertaken') { alert('ifok'); return(true); } else { return(false); } } }xmlhttp.open("GET","index.php?act=isusertaken&user=" + user,true);xmlhttp.send();}
  10. Thanks it works. ^^ By the way, what does the dollar sign do? Thanks.
  11. I want to use javascript to validate input of a username. I want the username to only allow letters and numbers, but I can't seem to do it. function letnum (ele){ ele = document.getElementById(ele); var patt = RegExp('[a-zA-Z0-9]'); if(patt.test(ele.value)) { alert("ok"); } else { alert("Only letters and numbers allowed."); }}
  12. I tried several times already and it still won't work. <div id="con2" style="display:block;">Text</text><script type="text/javascript">if(document.getElementById('con2').style.display == "block") { alert("Ok");}</script> EDIT: It works now. ; Apparently, external css doesn't work.
  13. Is this a valid format for meta revised?<meta name="revised" content="February 6, 2010">
  14. I'm trying to add a music player when a certain ajax file has the word "needed" f0r example. This was my attempt but I failed: <!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" src="swfobject.js"></script><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' onclick='send(\"ON\")'> <input type='button' value='Off' onclick='send(\"OFF\")'></form><div id='ss'></div>";document.getElementById("s").innerHTML=text;document.getElementById("s").innerHTML+=text2;}else if(pomoc == 'receive') {document.getElementById("s").innerHTML=text + "<div id='ss'></div>";receive();}else {document.getElementById("s").innerHTML=text;}}function send(status) {if(status == 'ON') {var status = '1';sendstatus(status);}if(status == 'OFF') {var status = '0';sendstatus(status);}}function GetXmlHttpObject(){if (window.XMLHttpRequest) { // code for IE7+, Firefox, Chrome, Opera, Safari return new XMLHttpRequest(); }if (window.ActiveXObject) { // code for IE6, IE5 return new ActiveXObject("Microsoft.XMLHTTP"); }return null;}var xmlhttp;function receive(){xmlhttp=GetXmlHttpObject();if (xmlhttp==null) { alert ("Browser does not support HTTP Request"); return; }var url="index.php?pomoc=receive";url=url+"&sid="+Math.random();xmlhttp.onreadystatechange=stateChanged;xmlhttp.open("GET",url,true);xmlhttp.send(null);setTimeout('receive()',60000);}function stateChanged(){if (xmlhttp.readyState==4){document.getElementById("ss").innerHTML=xmlhttp.responseText;if(xmlhttp.responseText.test(/needed/) == true) {var so = new SWFObject("playerMini.swf", "mymovie", "75", "30", "7", "#FFFFFF");so.addVariable("autoPlay", "no");so.addVariable("soundPath", "song.mp3");so.write("flashPlayer");}}}var xmlhttp2;function sendstatus(status){xmlhttp2=GetXmlHttpObject();if (xmlhttp2==null) { alert ("Browser does not support HTTP Request"); return; }var url="index.php?pomoc=send";url=url+"&sn="+status+"&sid="+Math.random();xmlhttp2.onreadystatechange=stateChanged2;xmlhttp2.open("GET",url,true);xmlhttp2.send(null);}function stateChanged2(){if (xmlhttp2.readyState==4){document.getElementById("ss").innerHTML='Sent Cry of Help/Przeslane Wolanie o Pomoc';}}</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><div id='flashPlayer'></div></body></html>
  • Create New...