Jump to content

itrollmework

Members
  • Content Count

    8
  • Joined

  • Last visited

Community Reputation

0 Neutral

About itrollmework

  • Rank
    Newbie
  1. function changeBtn(btn) { if (! btn.style) { alert("Big no for you and dont ask y, just cant do it D:"); return; } btn.style.background = "#00FF00"; btn.style.color = "black"; return; } <input type="button" id="btn1" value="glowwwww!!!" onclick="changeBtn(this)"></td> so i found this code on the internet, and it is very useful... sadly.... every time i refresh the page the button will go back to default color... how can i make it stay green even tho i refresh the page??? thankyou
  2. it doesnt work with audio tag (i cant make it work... i try and embed tag is the only way works (for me) thats why i m asking if i can del the record manually even tho i can stop the music....the page will refresh which means the music will start over and over again in every 8 sec.... while($row = $result->fetch_assoc()) { echo "<br> ". $row["hostname"]. $row["problem"]."<br>"; echo '<EMBED SRC="'.$myAudioFile.'" HIDDEN="true" AUTOSTART="TRUE"></EMBED>'
  3. <?php $myAudioFile= "fire.wav"; $servername = "localhost"; $username = "root"; $password = "root"; $dbname = "test"; $conn = new mysqli($servername, $username, $password, $dbname); if ($conn->connect_error) { die("Connection failed: " . $conn->connect_error); } $sql = "SELECT hostname, problem FROM test1"; $result = $conn->query($sql); if ( $result->num_rows > 0) { while($row = $result->fetch_assoc()) { echo "<br> ". $row["hostname"]. $row["problem"]."<br>"; echo '<EMBED SRC="'.$myAudioFile.'" HIDDEN="true" AUTOSTART="TRUE"><
  4. thankyou for helpin me to understand how it works, i m almost done with my work, but i got a problem now <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <?php $page = $_SERVER['PHP_SELF']; $sec = "5"; ?> <html> <head> <meta http-equiv="refresh" content="<?php echo $sec?>;URL='<?php echo $page?>'"> </head> <body> <script> function playMusic() { document.getElementById('sound1').play(); } </script> <form id="f1" name="f1" action="" method=""> <audio id="sound1" src="fire.wav">&
  5. !!!!!!!!!!!!!!! That is what i want, do you have some example that i can look at?? so i can learn from it? cuz i have a feelin that i misunderstand something about ajax and shiz..... Thankyou
  6. True..i need to do it step by step.. so i found something on the internet and i change a bit become this <?php if (isset($_GET["ThingsISend"])) { die(); }?><script type="text/javascript"> var ajaxWhatcha; if (window.XMLHttpRequest) ajaxWhatcha = new XMLHttpRequest(); else if (window.ActiveXObject) ajaxWhatcha = new ActiveXObject("Microsoft.XMLHTTP"); function sendTheThing() { document.getElementById("Button1").disabled = true; ajaxWhatcha.onreadystatechange = function() { if (ajaxWhatcha.readyState == 4) { document.getElementById("Button1").value = "Submited"; }
  7. i am sorry i didnt check after i post and my code was a mess and ya.... kinda open at the same time... let me put it this way PC 1,2,3,4 open Page A and send things PC_Z will always have page B open, when 1,2,3,4 submit, Page B will refresh (Btn turn red,play music)
  8. First of all, i must say i am really new, please forgive me if i ask something stupid. Sooooooo i want to make something like an alert system. page A can send a form and hostname to page B. Then B gets the information and one of the button will catch the hostname, turn the button to red and play a soundtrack. (real time update). After i click the button, it will turn back to green and show the information in a popup box. That's the whole idea. I am page 1<form method="get" action="get.php"><?php print (gethostbyaddr($_SERVER['REMOTE_ADDR'])); ?><input typ
×
×
  • Create New...