A question about one of the options ability
I was working with jquery and wanted to use it to call items from a database as soon as the page loads. I seem to be running into a problem trying to make a specific page appear based on the link selected by the user. The links are drawn up as titles from the database. The problem is the jquery code I am using is just not up to snuff. How do I change the code so it supports exactly what I want or can jquery not do this? My code is below.
- <?php
include('header.php');
require_once('connection3.php');
//query DB
$result2=mysql_query("SELECT * from articles");
?>
<!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">
<head>
<title>Simply Sauce Designs - Design Concepts, Blog, and Fun</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="/amir/css/desginBlog.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="/amir/js/jquery.tools.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$("#changeText").click(function() {
$('#textBox').load('');
});
});
</script>
</head>
<center>
<div style="width:780px;">
<div id="titleBox">
<?php
if($result){
while($row=mysql_fetch_array($result)){
//store variables
$title = ($row['title']);
$artid = ($row['artid']);
$blogs = ($row['blogs']);
$date = ($row['date']);
$location = ($row['location']);
?>
<a href="<?php echo $location; ?>" id="changeText"><?php echo $title; ?></a>
<?php
}
}
?>
</div>
<div id="textBox">This text will be changed to something else</div>
<div style="clear: left; margin-bottom: 1em"></div>
</div>
</center>
<?php include('footer.php'); ?>