RSS Forums RSS
Please support our JavaScript / DHTML / AJAX advertiser: Lunarpages Web Hosting
Views: 1844 | Replies: 2
Reply
Join Date: Jun 2005
Posts: 2
Reputation: katisco is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
katisco katisco is offline Offline
Newbie Poster

How can fix the problem?

  #1  
Jun 29th, 2005
This is my php page it's have javascript problem so plz tell me what should i do.

<?php
session_start();
if($permission=="yes"){?>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Gallery</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
//-->
</script>
<style type="text/css">
<!--
.heading1 {
font-family: Arial, Helvetica, sans-serif;
font-size: 12px;
color: 5A800C;
font-weight: bold;
}
-->
</style>
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_reloadPage(init) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
</script>
<link href="style.css" rel="stylesheet" type="text/css">
</head>
<body text="BLACK" onLoad="MM_preloadImages('images/update_b1_over.gif','images/traffic_b1_over.gif','images/traffic_b2_over.gif','images/traffic_b3_over.gif','images/traffic_b4_over.gif','images/traffic_b5_over.gif')">
<table width="85%" border="0" align="center" cellpadding="0" cellspacing="0" bordercolor="5482B0">
<tr>
<td><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td><div align="center"><img src="images/logo.gif" width="100" height="88">
</div></td>
<td width="78%"><div align="left"><img src="images/Welcome_to.gif"></div></td>
</tr>
<tr>
<td><div align="center"></div>
<div align="center">
<p><img src="images/traffic_top2.gif" width="133" height="50"><br>
<a href="history.htm" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image11','','images/traffic_b1_over.gif',1)"><img src="images/traffic_b1.gif" name="Image11" width="133" height="30" border="0"></a><br>
<a href="dotzoo.htm" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image6','','images/traffic_b2_over.gif',1)"><img src="images/traffic_b2.gif" name="Image6" width="133" height="30" border="0"></a><br>
<a href="gallery.php" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image7','','images/traffic_b3_over.gif',1)"><img src="images/traffic_b3.gif" name="Image7" width="133" height="30" border="0"></a><br>
<a href="signup.htm" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image8','','images/traffic_b4_over.gif',1)"><img src="images/traffic_b4.gif" name="Image8" width="133" height="30" border="0"></a><br>
<a href="help.htm" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image9','','images/traffic_b5_over.gif',1)"><img src="images/traffic_b5.gif" name="Image9" width="133" height="30" border="0"></a><br>
<img src="images/traffic_bottom.gif" width="133" height="110"><br><br>
<br>
</p>
</div></td>
<td align="left" valign="top"> <div align="right">
<p></p>
</div>
<blockquote>
<div align="left">

<table width="80%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="text"><div align="justify">
<script src="try/xaramenu.js"></script><script webstyle3 src="try/tranzport.js"></script>
</div></td>
</tr>
</table>

</div>
</blockquote>
</td>
</tr>
<tr>
<td height="8" colspan="2" class="heading1"><div align="center"> <img src="images/bar.gif" width="92%" height="1">
</div></td>
</tr>
</table></td>
</tr>
</table>
<div align="center"><span class="heading1">This site is developed and maintained
by</span><br><img src="images/dotzoo.gif" width="128" height="56"></div>
</body></html>

<?php } else
echo "<HTML> <HEAD> <META http-equiv=\"refresh\" content=\"0; url=home.htm\"></HEAD></HTML> ";
?>
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Jun 2005
Posts: 2
Reputation: katisco is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
katisco katisco is offline Offline
Newbie Poster

Re: How can fix the problem?

  #2  
Jun 29th, 2005
Line : 8
char : 894
Error : Expected';'
Code : 0

:cry: some one help me pls
Reply With Quote  
Join Date: Jun 2005
Location: Kansas City, Missouri, USA
Posts: 344
Reputation: Troy is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 4
Troy's Avatar
Troy Troy is offline Offline
Posting Whiz

Re: How can fix the problem?

  #3  
Jun 29th, 2005
The way to debug javascript is to make a copy of the full script, then remove everything but a few lines or functions. Test to see if it works. If not, remove more. Once you have a page that loads without any errors, add more code back in. Add a little at a time and test after each addition. When you get an error again, remove some code....back and forth until you find the exact piece that is producing the error. Liberally use javascript alert() to output information to help you know the value of variables and what is going on.

"Baby steps"
Troy Wolf is the author of SnippetEdit. "Website editing as easy as it gets." IX Web Hosting
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 11:24 am.
Newsletter Archive - Sitemap - Privacy Statement - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC