Javascript Coder Needed - Simple Task

Status
Not open for further replies.

fahey

Newbie
Joined
Oct 28, 2011
Messages
21
Reaction score
10
I am looking for someone experienced in javascript. The job I need done is very simple and it should not take long if your experienced.
It will grab a line from a database, feed it into a table that holds 10 lines, and rotate through the lines.

Please message me if interested
 
Hi ,

I am interested in this task .Please send me more details or add me on skype at surender.singal1
 
Still looking for someone... I would prefer an American that actually knows what they are doing please.
 
Still looking... super easy task.. too bad all thats on this forum is indians -_-
 
Pure PHP solution:
Code:
<html>
<head>
</head>
<body>
	<table border="1">
		<tr>
			<th>Emails</th>
			<th>Password</th>
		</tr>
		<?php
		// Mysql settings
		$dbserver = "localhost";
		$user = "root";
		$password = "password";
		$database = "emails";
		
		// connect to Mysql
		mysql_connect($dbserver, $user, $password) or die(mysql_error());
		mysql_select_db($database) or die(mysql_error());
		
		// query table & grab 10 random rows
		$query = "SELECT * FROM accounts ORDER BY RAND() LIMIT 10"; 
		$result = mysql_query($query) or die(mysql_error());
		
		// loop through array
		while($row = mysql_fetch_array($result)){
			// start new row of table
			echo "<tr>";
			// start new column of current row
			echo "<td>".$row['email']."</td>";
			echo "<td>".$row['pass']."</td>";
			// end row
			echo "</tr>";
		}
		
		// close Mysql
		mysql_close();
		?>
	</table>
<body>
</html>




Using ajax to just output table (javascript does not build table, only includes it in the current page).

Page #1 - Main html page.
Code:
<html>
<head>
	<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js" type="text/javascript"></script>
	<script type="text/javascript">
		$(document).ready(function() {
			$("#submit").click(function() {
                var dataString = '';
                $.ajax({
                    type: "POST",
                    cache: false,
                    url: "sqltotable.php",
                    data: dataString,
                    success: function(data){
                        $("#table").html(data);
                    }
                });
                return false;
            });
		});
	</script>
</head>
<body>
	<form action="" method="post" onsubmit="">
		<input id="submit" type="submit" value="Submit" />
	</form>
	<p></p>
	<div id="table"></div>
</body>
</html>

Page #2 - PHP page where table is filled (name sqltotable.php for example above to work).
Code:
<table border="1">
	<tr>
		<th>Emails</th>
		<th>Password</th>
	</tr>
	<?php
	// Mysql settings
	$dbserver = "localhost";
	$user = "root";
	$password = "password";
	$database = "emails";
	
	// connect to Mysql
	mysql_connect($dbserver, $user, $password) or die(mysql_error());
	mysql_select_db($database) or die(mysql_error());
	
	// query table & grab 10 random rows
	$query = "SELECT * FROM accounts ORDER BY RAND() LIMIT 10"; 
	$result = mysql_query($query) or die(mysql_error());
	
	// loop through array
	while($row = mysql_fetch_array($result)){
		// start new row of table
		echo "<tr>";
		// start new column of current row
		echo "<td>".$row['email']."</td>";
		echo "<td>".$row['pass']."</td>";
		// end row
		echo "</tr>";
	}
	
	// close Mysql
	mysql_close();
	?>
</table>
 
Google "newsticker script" if you haven't already found someone, your post describes a newsticker word for word if i'm reading it correctly
 
wizard
Thanks for the detailed reply but where does the timing come in? If you could send me a message it would be appreciated
 
Still looking since no one on this thread knows how to pm -_-... except indians
 
When using Jquery to add a delay, all you have to do is:

Code:
setTimeout(function() {
** You're JS code **
}, 1500);

The above will add 1.5seconds delay to the code within the function.
 
When using Jquery to add a delay, all you have to do is:

Code:
setTimeout(function() {
** You're JS code **
}, 1500);

The above will add 1.5seconds delay to the code within the function.

I would appreciate it if you sent me a pm so you could perhaps help me implement this.
 
Well despite 4 more indians contacting me and then confidently saying they can do it only to respond the next day saying they dont know wtf they are doing, I am still looking for someone to do this simple task. Easy cash if you know code and your american.
 
Status
Not open for further replies.
This thread has been auto closed due to the forum's thread age policy. Read more.
Back
Top