-
Posts
783 -
Joined
-
Last visited
Everything posted by Q695
-
Is there a way to run a check on the server to see how long it takes for the page to get built, then print it to the screen? I tried searching for it online for a few minutes, but it wasn't able to be found. All I'm finding on there is how to optimize the pages, but I want a simple time check performed on the page loading
-
You tell me what I'm going to use, because there's no good tutorial out there that I can find for some reason.
-
Aww, long polling to use it as a listener, unless they just join the chat Is there a way to do long polling within jquery technology working with the data possibly changing every time? What would I post for the server side JavaScript, and client side JavaScript?
-
I'm confused how to get the chat object to work with the pushes/pulls, and don't know where I'm going wrong. Here's the basics of what I need to know without reloading the page: how do I push new data to the server how do I push new data to the client how do I not rebuild the data client has every time I may need to know more, but that's what I know I need to be able to do so far.
-
messaging with server for data (chat-like page loading)
Q695 replied to Q695's topic in Javascript Help
Jquery Ajax? is there a good online tutorial?- 5 replies
-
- chat
- javascript
-
(and 2 more)
Tagged with:
-
How do I call a javascript function on remote website
Q695 replied to DeX's topic in Javascript Help
So like a popup on the page? -
How do I call a javascript function on remote website
Q695 replied to DeX's topic in Javascript Help
<script src="url" -
I've been trying to figure out how chat apps work all afternoon to do dynamic data in HTML loading. Can someone please tell me where I'm going wrong for the code flow in this script: <script> function submitchat{ if (form1.uname.value=='' || form1.msg.value==''){ alert("fill out whole form"); return; } var uname=form1.uname.value; var msg=form1.msg.value; var xmlhttp= new XMLHttpRequest(); xmlhttp.onreadystatechange = function(){ if (xmlhttp.readyState==4 && xmlhttp.status=200){ document.getElementById('chatlogs').innerHTML=xmlhttp.responseText; alert("message sent"); } xmlhttp.open('GET', '?page=3.2&uname='+uname+'&msg='+msg, true); xmlhttp.send(); } </script> <form name="form1"> enter your chat name<input type="text" name="uname"> message: <textarea name="msg"></textarea> <br> <div id="chatlogs">Loading Chat Logs...</div> <a href="#" onclick="">send</a> </form> <?php $uname = $_REQUEST['uname']; $msg = $_REQUEST['msg']; if ($msg!='' && $uname!=''){ $chat=" INSERT INTO chat ( `uname` , `msg` ) VALUES ( '$uname', '$msg' )"; $result = mysql_query($chat, $con) or die (sql_death($chat)); }
- 5 replies
-
- chat
- javascript
-
(and 2 more)
Tagged with:
-
Someone points their form without data required for the PDO to the page the form is on. When it's not set, it automatically sets the value to null. Sorry about the redundant posting, it was a slow server that I'll blame ;)
-
Someone showed me a while ago this trick for loading variables, but it creates an error when you go to the page initially: $fname = $_POST['fname'] ? $_POST['fname'] : null; How do I write the short hand to run correctly?
-
it doesn't explain the different symbols on a cheat sheet.
-
lol had a pdo quoting error. What does :variable name mean, compared to $variable mean in this pdo tutorial: http://www.phpeveryday.com/articles/PDO-Insert-and-Update-Statement-Use-Prepared-Statement-P552.html
-
What's wrong with the query, I'm not getting errors outputted: // configuration $dbtype = "MySQL"; $dbhost = "localhost"; $dbname = "eagle"; $dbuser = "root"; $dbpass = ""; // database connection $conn = new PDO("mysql:host=$dbhost;dbname=$dbname",$dbuser,$dbpass); // query $sql = "INSERT INTO member_data (fname, mname, lname, street, apt, city, state, zip, email, number, job, awarded) VALUES (:fname, :mname, :lname, :street, :apt, :city, :state, :zip, :email, :number, :job, :awarded) "; echo $sql; $q = $conn->prepare($sql); $q->execute(array(':fname'=>$fname, ':mname'=>$mname, ':lname'=>$lname, ':street'=>$street, ':apt'=>$apt, ':city'=>$city, ':state'=>$state, ':zip'=>$zip, ':email'=>$email, ':number'=>$number, ':job'=>$job, ':awarded'=>$awarded )); How do I run an or die to output the error?
-
lol, running a while on an insert
-
Working from this tutorial with PDO: http://www.phpeveryday.com/articles/PDO-Insert-and-Update-Statement-Use-Prepared-Statement-P552.html Since you said to PDO it, what am I doing wrong: // configuration $dbtype = "MySQL"; $dbhost = "localhost"; $dbname = "eagle"; $dbuser = "root"; $dbpass = ""; // database connection $conn = new PDO("mysql:host=$dbhost;dbname=$dbname",$dbuser,$dbpass); $title = 'PHP AJAX'; // query $sql = "INSERT INTO member_data WHERE fname = ?, mname = ?, lname = ?, street = ?, apt = ?, city = ?, state = ?, zip = ?, email = ?, number = ?, job = ?, awarded = ?"; $q = $conn->prepare($sql); $q->execute(array($title)); I created the database from the variable names.
-
What is wrong with the injection preventer (array function) seen below: //injection prevention if (isset($_GET)){ if (!is_array($_POST)){ foreach( $_POST as $key => $value){ $_POST["$key"]=mysql_real_escape_string($value) ; } } else {//here while (is_array($key)){ foreach( $_POST as $key => $value){ $_POST["$key"]=mysql_real_escape_string($value) ; echo $key; } } }
-
example: you have a file cabinet, then you reach for a folder pull the folder half way out, and see only half the folder pull the folder the rest of the way out, you can see the whole folder problem: How do I make the div visible only up to the point it's pulled out? What I have: style="width:100%; height:100%; overflow:hidden;"
-
When nesting a div how do I turn off the on click event for the inner div?
Q695 replied to Q695's topic in Javascript Help
I have a nested div within another div, and it bubbles from the first div tag to the 2nd div tag for some reason. -
How do I plug a tone generated by a function into a var?
Q695 replied to Q695's topic in Javascript Help
In JavaScript I'm trying to: take a tone generated by a tone generator manipulate the tone (the only thing that will be on the whole page for sound) in several ways at the same time produce the tone in its manipulated form What I understand: the tone is generated by startTone( tone ) computer speaker manipulation What I need to do: make the product of startTone() manipulatable- 11 replies
-
- tone
- javascript
-
(and 1 more)
Tagged with:
-
How do I plug a tone generated by a function into a var?
Q695 replied to Q695's topic in Javascript Help
This is the tone generator script from that page, and I want to load it into a page variable: http://jsfiddle.net/WH7Kf/61/ Would it be easier to grab the sounds from the whole page to manipulate them as I want to?- 11 replies
-
- tone
- javascript
-
(and 1 more)
Tagged with:
-
baffeled on why only one javascript function is being called
Q695 replied to Q695's topic in Javascript Help
I'm a beginner for JavaScript, and intermediate for PHP -
How do I plug a tone generated by a function into a var?
Q695 replied to Q695's topic in Javascript Help
I'm looking to load startTone( frequency ) into a variable so that I can manipulate the volume level of it instead of the generic 100%.- 11 replies
-
- tone
- javascript
-
(and 1 more)
Tagged with:
-
How do I plug a tone generated by a function into a var?
Q695 replied to Q695's topic in Javascript Help
That doesn't work, so how do I target the volume of everything on the page? Think how windows can target everything on your computer.- 11 replies
-
- tone
- javascript
-
(and 1 more)
Tagged with:
-
baffeled on why only one javascript function is being called
Q695 replied to Q695's topic in Javascript Help
Got it: use function A to call function B use function B to call function A