Jump to content

sunfighter

Members
  • Posts

    579
  • Joined

  • Last visited

    Never

Everything posted by sunfighter

  1. To save some time in trouble shooting this, because you never gave us the log in script put session_start(); as the first line [iT SHOULD BE THE FIRST LINE] in login script: and not in line 11
  2. Why are you using an iframe and not a div???? Answer to height: http://www.w3schools.com/tags/att_iframe_height.asp
  3. javascript : function login_valid1() { var x=document.forms["login"]["user_name"].value; var y=document.forms["login"]["user_password"].value; if((x==null || x=="") && (y==null || y=="")) { document.getElementById("empty0").innerHTML="you left the username and the password boxes empty , please try again.<br/>"; return false; } else if(x==null || x=="") { document.getElementById("empty0").innerHTML="you left the username box empty , try again please<br/>"; return false;} else if (y==null ||y==""){ document.getElementById("empty0").innerHTML="you left the password box empty , try again<br/>"; return false; } } OR if the paragraphs are next to the input boxes: javascript : function login_valid1() { var x=document.forms["login"]["user_name"].value; var y=document.forms["login"]["user_password"].value; if((x==null || x=="") && (y==null || y=="")) { document.getElementById("empty0").innerHTML="you left the username and the password boxes empty , please try again.<br/>"; document.getElementById("empty1").innerHTML= ''; document.getElementById("empty2").innerHTML= ''; return false; } else if(x==null || x=="") { document.getElementById("empty1").innerHTML="you left the username box empty , try again please<br/>"; document.getElementById("empty0").innerHTML= ''; document.getElementById("empty2").innerHTML= ''; return false;} else if (y==null ||y==""){ document.getElementById("empty2").innerHTML="you left the password box empty , try again<br/>"; document.getElementById("empty1").innerHTML= ''; document.getElementById("empty0").innerHTML= ''; return false; } }
  4. A good way to check if things are being cached on the server is to just delete your main page, check it in IE. If it goes missing upload the newest and ck again. If it stays then it's your server
  5. The double colon is the Scope Resolution Operator http://php.net/manual/en/keyword.paamayim-nekudotayim.php Did you mean to use it that way?
  6. This should do what you wanted. I did make some changes to your php script and then added the $themsg to disply your errors. You might want to expand your valuation of the email address. And the way you check if password is entered correctly twice might need work to inform the user that they didn't match. Your code: <?php $themsg = ""; if ((isset($_POST['Msoft'])) && ($_POST['Msoft'] == 'junk')) { $link = mysql_connect("localhost", "root", "root") or die("Could not connect"); mysql_select_db("calendar") or die("Couldn't select db"); if(($_POST["usr"] != '') && ($_POST["passwd"] != '') && ($_POST["conf_passwd"] != '') && ($_POST["email"] != '') && ($_POST['passwd'] == $_POST['conf_passwd'])) { $username = mysql_real_escape_string($_POST["usr"]); $email = mysql_real_escape_string($_POST["email"]); $password = md5($_POST["passwd"]); //$result = mysql_query("SELECT user_name FROM user WHERE user_name = '".$username."'"); $result = mysql_query("SELECT rsn FROM clan_members WHERE rsn = '" . $username . "'"); if(!mysql_num_rows($result)) { mysql_query("INSERT INTO user (user_name, passwd, email) VALUES('$username', '$password', '$email')") or die (mysql_error()); $themsg = "3"; // good to go... }else{ $themsg = "1"; // user name... } }else{ $themsg = "2"; // 2 is fill in all... } } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Sign-in form</title> <meta name="generator" content="TSW WebCoder 2010" /> <link href="style/index_default.css" media="all" rel="Stylesheet" type="text/css" /> <script type="text/javascript" src="js/script.js"></script> <title></title> </head> <body> <div class="buttons"> <ul> <li><a href="index.php">HOME</a></li> <li><a href="about.php">ABOUT</a></li> <li><a href="login.php">LOGIN</a></li> <li><a href="sign.php" class="buttons_selected">SIGN IN</a></li> </ul> </div> <?php if($themsg == "1"){ echo '<div class="error_msg"> Username taken </div>'; } if($themsg == "2"){ echo '<div class="error_msg"> Please fill in all information </div>'; } ?> <div class="middle"> <h3>Complete the sign in, please.</h3> <form method="post" action="#" id="sign" class="sign" onsubmit="return control_sign();"> <p class="content" style="text-align: center;"> <label for="usr">Username: </label> <input style="margin-left: 57px;" type="text" size="30" id="usr" name="usr" /><br /><br /> <label for="passwd">Password: </label> <input style="margin-left: 61px;" type="password" size="30" id="passwd" name="passwd" /><br /><br /> <label for="conf_passwd">Cofirm Password: </label> <input style="margin-left: 15px;" type="password" size="30" id="conf_passwd" name="conf_passwd" /><br /><br /> <label for="email">E-mail: </label> <input style="margin-left: 82px;" type="text" size="30" id="email" name="email" /><br /><br /> <input type="hidden" name="Msoft" value="junk" /><br /><br /> <input id="log_button" type="submit" value="SIGN IN" /> </p> </form> </div> <?php if($themsg == "3") { echo "<br /><div class=pop>Account created</div>"; } mysql_close($link); ?> </body> </html>
  7. Yes all the css please after all it's the main box that's being changed.
  8. Played with all morning. At first the js stopped on the first xmlhttp.open. After fighting this a while, I think it's because my cashe wont flesh auto. I had to kill the browser and re open. What I found out is - IE dies because the <select onchange="GetRecords(this.value);"> is declared. When I removed it and put it in the called php script things worked. I have put the entire dropdown in the called script and echo it to a div in the main script. I am sure you will have to work on these scripts but the main idea is there and they work. Main script: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> <link rel="stylesheet" type="text/css" href="viewer.css" /> <title>ROB Viewer</title> <script type="text/javascript"> function AjaxO() { var xmlhttp = false; var modes=["Msxml2.XMLHTTP", "Microsoft.XMLHTTP"]; if (window.ActiveXObject) { for (var i=0; i<modes.length; i++) { try { xmlhttp = new ActiveXObject(modes[i]); } catch(e) { } } } else if (window.XMLHttpRequest) { xmlhttp = new XMLHttpRequest(); } return xmlhttp; } function SelectStore(date) { if (date=="") { return; } var xmlhttp = AjaxO(); xmlhttp.open("GET","test_2.php?q="+date,true); xmlhttp.send(null); xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState == 4 && xmlhttp.status == 200) { document.getElementById("Store").innerHTML=xmlhttp.responseText; } } } function SelectPgc(store) { var date = document.getElementById("Date").value; if (store=="") { return; } var xmlhttp = AjaxO(); xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState == 4 && xmlhttp.status == 200) { document.getElementById("Pgc").innerHTML=xmlhttp.responseText; } } xmlhttp.open("GET","test_3.php?q="+store+"&p="+date,true); xmlhttp.send(null); } function GetRecords(pgc) { var date = document.getElementById("Date").value; var store = document.getElementById("Store").value; if (pgc=="") { return; } var xmlhttp = AjaxO(); xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState == 4 && xmlhttp.status == 200) { document.getElementById("items").innerHTML=xmlhttp.responseText; } } xmlhttp.open("GET","/rob/getRecords.php?s="+store+"&d="+date+"&p="+pgc,true); xmlhttp.send(null); } </script> </head> <body> <table id="options"> <tr> <td>Date</td> <td>Store</td> <td>Pgc</td> </tr> <tr> <td> <select id="Date" onchange="SelectStore(this.value);"> <option value="">Select Date</option> <option value="date_ship">date_ship</option> </select> </td> <td id="Store"></td> <td id="Pgc"></td> </tr> </table> <br /> <table id="items"> </table> </body> </html> Calls two phps via AJAX First - test_2,php: <?php echo '<select onchange="SelectPgc(this.value);">'; echo '<option value="">Select Store</option>'; echo '<option value="place">place</option>'; echo '<option value="plac">plac</option>'; echo '<option value="pla">pla</option>'; echo '<option value="pl">pl</option>'; echo '<option value="p-">p-</option>'; ?> second named test_3,php <?php echo '<select onchange="GetRecords(this.value);">'; echo '<option value="">Select Store</option>'; echo '<option value="GetRecord_1">GetRecord_1</option>'; echo '<option value="GetRecord_2">GetRecord_2</option>'; echo '<option value="GetRecord_3">GetRecord_3</option>'; echo '<option value="GetRecord_4">GetRecord_4</option>'; echo '<option value="GetRecord_5>GetRecord_5</option>'; ?>
  9. The anchors are in file www.myjabberbox.xom_products.html Lines 227, 233, and 239 and the </a> on line 230, 236, and 242
  10. This is the code on that page with the map co-ords in red. <html> <body> <p>Click on the sun or on one of the planets to watch it closer:</p> <img src="planets.gif" width="145" height="126" alt="Planets" usemap="#planetmap" /> <map name="planetmap"> <area shape="rect" coords="0,0,82,126" alt="Sun" href="sun.htm" /> <area shape="circle" coords="90,58,3" alt="Mercury" href="mercur.htm" /> <area shape="circle" coords="124,58,8" alt="Venus" href="venus.htm" /> </map> </body> </html>
  11. It depends on where the php string $poid was gotten. req.open("GET", "shptfill.php?data="+src+"&val="+val+"&poid=+<?php echo $poid; ?>"); S/B req.open("GET", "shptfill.php?data="+src+"&val="+val+"&poid="+<?php echo $poid; ?>); Misplaced quote.
  12. This is from the html section of code you gave us. css code would be nice. The <div class="error_msg"> has to be hidden [done in css] Your php does not belong here. I'd replace it with AJAX code. We will show the error message with javascript. So, I need css.
  13. You have not declared a DOC type. IE demands one. Try that first.
  14. <div id="hov"> <a href=# id="t1">A really long link</a><br /><br /> <a href=# id="t2">Another really long link</a> </div> #hov:hover a { background-color: blue; } This will change both. You never answered if this is what you wanted.
  15. First .t2:hover is for a class not an ID like you have <a href=# id="t1"> The questions are = Are these the only two anchors? And is it ok to change the background of t2 when t1 is hovered?
  16. You will not be able to use the if statement example you gave us because it's php. And yes I know that you knew that. Change this line document.myForm.time.value = ajaxRequest.responseText; Call the function that will do the if statements. Let's call that function iffy(time) iffy('ajaxRequest.responseText'); Should do the trick.
  17. I don't do this but see if you can get help with this: http://www.docstore.mik.ua/orelly/webprog/pcook/ch15_01.htm
  18. To get a button to preform an action you need to tell it to do so and the JAVASCRIPT that it is to activate. <input type='button' name='editbtn' value='Edit' /> S/B <input type='button' name='editbtn' value='Edit' onclick=\"call java function\" /> And you need to write that function.
  19. <tr <?php echo "style=\"background-color:$mocolor;\" onmouseover=\"this.style.backgroundColor='$mocolor3';\" onmouseout=\"this.style.backgroundColor='$mocolor';\""; ?>>
  20. I like the site. Nice looking. The theme and the subject matter go together. Easy navigation. Great eye candy. Two thumbs up.
  21. It can't be this easy, I must have missed something. Your code: $sql = "SELECT productCode, name FROM product_inventory WHERE memberr_ID = '" . $_SESSION['SESS_mem_ID'] . "; You might have to change how this is displayed. Don't know, that code was not supplied. Give it a go.
  22. ssurya you have errors in the code you published and you don't show how any of it is called. Please repost usable code.
  23. Also: echo '<span class="hotspot" onmouseover="tooltip.show(\'User ID :\');" onmouseout="tooltip.hide();">';
  24. Using a relative reference has always been the recommended way to go. The reason being that the site could be picked up and moved without having things break. Now HTML has a tag called BASE, this sets the first part of a call that, for one reason or another, needed to be absolutely referenced. I set <base> when I grab a site's programming so I can view the images that are relative referenced in WAMP.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.