Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
I need this one to breathe again.
Old 09-02-2008, 12:30 PM I need this one to breathe again.
Sleeping Troll's Avatar
Ultra Talker

Posts: 351
Name: Butch Begy
Trades: 0
This is the code, problem is the xmlHttp.responsetext comes up null.

Code:
 
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Admin Default</title> 
<?php
$conn = mysql_connect("xxx","xxx","xxx"); 
mysql_select_db("xxx",$conn);
?>
<script type="text/javascript">
<!--
var xmlHttp;
function Init()
{
   try
     {  // Firefox, Opera 8.0+, Safari
      xmlHttp=new XMLHttpRequest();
     }
     catch (e)
       {  // Internet Explorer
        try
          {
          xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
          }
           catch (e)
            {
            try
               {
                xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
               }
               catch (e)
                 {
                  alert("Your browser does not support AJAX!");
                }
          }
       }
}
 
function NewCat(Elem)
{
Init();
 var Title = prompt("Please enter title for new category");
xmlHttp.onreadystatechange=function()
   {
  if(xmlHttp.readyState==4)
   {
   document.getElementById(Elem).innerHTML = xmlHttp.responseText;
     }
   }
  ReqStr = "NewCat.php?Title=" + encodeURI(Title);
  xmlHttp.open("Get",ReqStr,true);
  xmlHttp.send(null);
}
//-->
</script>
<style type="text/css">
<!--
.style1 {
font-family: "GrilledCheese BTN";
font-size: large;
}
.style2 {
font-family: "GrilledCheese BTN";
font-size: x-small;
}
.style3 {font-family: "GrilledCheese BTN"}
a:hover {
font-family: "GrilledCheese BTN";
font-size: larger;
color: #000000;
}
body {
background-color: #FDF993;
}
a:link {
color: #000000;
text-decoration: none;
}
dl, dt, dd, ul, li {
margin: 0;
padding: 0;
list-style-type: none;
}
.style8 {font-family: "GrilledCheese BTN"; font-size: small; }
a:visited {
color: #000000;
}
a:active {
color: #000000;
}
-->
</style>
<body>
<table width="100%" border="0">
<tr>
          <!-- Bumper -->
  <td>&nbsp;</td>
          <!-- Bumper -->
          <!-- Login Panel Start -->
  <td width="120" align="center" class="style3" id = "Message">
  <div align="center"><?php echo $Msg ?></div></td>
          <!-- Login Panel End -->
          <!-- Bumper -->
  <td>&nbsp;</td>
          <!-- Bumper -->
          <!-- Banner Panel Start -->
  <td id = "Banner" align="center" height="120">
   <div><img src="../Images/Bnnr.png" width="700" height="91"></div>
  </td>
          <!-- Banner Panel End -->
          <!-- Bumper -->
 
  <td>&nbsp;</td>
 
          <!-- Bumper -->
          <!-- Navigation Panel Start -->
  <td width="120" align="center" valign="middle" nowrap id = "Navigation">
   <div class = "style2">
     <a href = "default.php">Home</a><br>
     <a href = "FAQ.php">FAQ</a><br>
     <a href = "Contact.php">Contact Us</a><br>
     <a href = "About.php">About us</a><br>
     <a href = "Cart.php">My Cart</a><br>
   </div>
  </td>
          <!-- Navigation Panel End -->
 
          <!-- Bumper -->
  <td>&nbsp;</td>
          <!-- Bumper -->
</tr>
</table>
<table width="100%"> 
<tr>
          <!-- Left Panel Start -->
  <td width="200" colspan="4" align="center" valign="top" nowrap id = "Left_Panel">
   <div class = "style1">
    <div align="center">Categories</div>
    <div align="center"></div> 
   </div>  </td>
          <!-- Left Panel End -->
          <!-- Center Panel Start -->
  <td colspan="5" align="center" valign="top" id = "Center_Panel">
   <div class="style1">
    <div align="center">Templates</div>
    <div align="center">   </div>  </td>
          <!-- Center Panel End -->
 
          <!-- Right Panel Start -->
  <td width="400" align="center" valign="top" nowrap id = "Right_Panel">
   <div class="style1">Preview Image </div>  </td>
          <!-- Right Panel End -->
</tr>
<tr>
   <td align="center" valign="top" nowrap class="style8" id = "Left_Panel">&nbsp;</td>
  <td align="center" valign="top" class="style8" id = "Center_Panel"><div align="right">
   <div align="left">Title</div>
   </div></td>
  <td align="center" valign="top" class="style8" id = "Center_Panel"><div align="right">Status</div></td>
  <td align="center" valign="top" class="style8" id = "Center_Panel">&nbsp;</td>
  <td align="center" valign="top" nowrap class="style8" id = "Right_Panel">File Name </td>
  <td align="center" valign="top" nowrap class="style8" id = "Right_Panel">Text Fields </td>
  <td align="center" valign="top" nowrap class="style8" id = "Right_Panel">Categories</td>
  <td align="center" valign="top" nowrap class="style8" id = "Right_Panel">Photos</td>
  <td align="center" valign="top" nowrap class="style8" id = "Right_Panel">Enable</td>
</tr>
<tr>
  <td align="center" valign="top" nowrap id = "Left_Panel">&nbsp;</td>
  <td colspan="2" align="center" valign="top" nowrap id = "Left_Panel">
<table id= "Categories" name= "Categories" width="100%" align = "center" border="0">
   <?php
$SQL = "Select * From Categories";
$result = mysql_query($SQL);
while($row = mysql_fetch_array($result))
{
echo (" 
   <tr> 
    <td><div class = 'style8' align = 'left'>".$row['Title']."</div></td>
    <td><div class = 'style8' align = 'right'>".$row['Enable']."</div></td>
   </tr>
   ");
}
?>
  </table></td>
  <td align="center" valign="top" nowrap id = "Left_Panel">&nbsp;</td>
  <td colspan="5" align="center" valign="top" id = "Center_Panel">
<table id= 'Templates' width='100%' align = 'center' border='0'><?php
$SQL = "Select * From Templates";
$result = mysql_query($SQL);
while($row = mysql_fetch_array($result))
{
echo (" 
   <tr> 
    <td><div class = 'style8' align = 'left'>".$row['FileName']."</div></td>
    <td><div class = 'style8' align = 'right'>".$row['TxtFldCnt']."</div></td>
    <td><div class = 'style8' align = 'left'>".$row['PhotoCnt']."</div></td>
    <td><div class = 'style8' align = 'left'>".$row['Categories']."</div></td>
    <td><div class = 'style8' align = 'right'>".$row['Enable']."</div></td>
   </tr>
   ");
}
?>
</table></td>
  <td align="center" valign="top" nowrap id = "Right_Panel">&nbsp;</td>
</tr>
<tr>
  <td align="center" valign="top" nowrap class="style3" id = "Left_Panel">&nbsp;</td>
  <td colspan="2" align="center" valign="top" nowrap class="style3" id = "Left_Panel"><a href = "#" id = "NewCat" name = "NewCat" onClick = "NewCat('Categories')">New Category</a></td>
  <td align="center" valign="top" nowrap class="style3" id = "Left_Panel">&nbsp;</td>
  <td colspan="5" align="center" valign="top" id = "Center_Panel">&nbsp;</td>
  <td align="center" valign="top" nowrap id = "Right_Panel">&nbsp;</td>
</tr>
</table>
</body>
</html>
If you will see my previous post, the problem IS in this script!

http://trollnest.com/bragflags/Administration/default.php

if you want to play please feel free!

Last edited by Sleeping Troll; 09-02-2008 at 12:33 PM..
Sleeping Troll is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Reply     « Reply to I need this one to breathe again.
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.20276 seconds with 12 queries