SourceTec Software

It is currently Fri Apr 18, 2014 4:03 am

All times are UTC + 8 hours




Post new topic Reply to topic  [ 6 posts ] 
Author Message
PostPosted: Thu Jun 13, 2013 11:04 pm 
Offline
Member

Joined: Thu Jun 13, 2013 10:55 pm
Posts: 3
Hi! I been having this problem for a while now, i hope somebody helps me. I've made the menu and i've inserted it on all my webpages except for the index which is a php file. I've read on the website that i must make some changes when you deal with a php file but im having trouble with this. Can somebody help me out? Oh, and excuse my english :P Thanks.


Top
 Profile  
 
PostPosted: Fri Jun 14, 2013 3:41 am 
Offline
Guru
User avatar

Joined: Mon May 10, 2004 3:53 am
Posts: 1752
Location: Rescue, CA, USA
You can include (X)HTML in a PHP file as long as you put a ?> before it and a <?php after it. For example,
Code:
?> <script type="text/javascript" src="file.js"></script> <?php

Regards,

Bill
Unofficial DHTML Menu Resource Site


Top
 Profile  
 
PostPosted: Fri Jun 14, 2013 6:29 am 
Offline
Member

Joined: Thu Jun 13, 2013 10:55 pm
Posts: 3
I got what you say but i've have no open <?php. The file is a php, it has some php code (all between <?php and ?>) but the part that has the js script i thinks is html. I've inserted it like i did in my other pages except this is a php, thats all the diference i see.
I'll put in the code just in case im not explaining myself properly.

<?
include('conn.php'); //incluimos el config.php que contiene los datos de la conexión a la db
?>
<!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=utf-8" />
<title>Documento sin t&iacute;tulo</title>
<link href="estilo10.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
.divisor {
width: 50px;
float: left;
padding: 10px;
}
.textodiv {
//width: 290px;
padding-top: 5px;
padding-right: 5px !important;
padding-bottom: 5px;
padding-left: 5px;
background-color:#FFFFFF;
}
.claro {
background-color: #CCCCCC;
overflow:hidden;
float:left;
width: 289px;
}
.oscuro {
background-color: #999999;
overflow:hidden;
float:left;
width: 289px;
}
#sss {
width: 100px;
float: left;
}
#kkk {
width: 200px;
clear: none;
float: left;
}
#a {
width: 300px;
}
.fechaencabezado {
font-weight: bold;
text-transform: uppercase;
color: #FFFFFF;
background-color: #000000;
text-align: center;
}
.textonoticia
{
font-size:11px;
color:#999999;
line-height:13px;
padding-top:3px;
}

.titulonoticia
{
color:#666;
line-height:20px;
}

.fechanumero {
font-family: Arial, Helvetica, sans-serif;
font-size: 20px;
font-weight: normal;
color: #D50000;
text-align: center;
padding-top: 2px;
}

-->
</style>
<script type="text/javascript" id="sothink_dhtmlmenu"> <!--
st_siteroot="file:///C|/wamp2/www/stay%20young%202";
st_jspath="/js/stmenu.php";
if(!window.location.href.indexOf("file:") && st_jspath.charAt(0)=="/")
document.write('<script type="text/javascript" src="'+st_siteroot+st_jspath+'"><\/script>');
else
document.write('<script type="text/javascript" src="'+st_jspath+'"><\/script>');
//--> </script>
</head>

<body>

<div id="header">
<div id="cont_header"><img src="Sin título-2 copia3.png" width="360" height="75" /> --
<script type="text/javascript">
<!--
stm_bm(["menu4bf7",980,"/imagenes","blank.gif",0,"","",0,0,250,0,1000,1,0,0,"","",0,0,1,2,"default","hand","file:///C|/wamp2/www/stay%20young%202",1,25],this);
stm_bp("p0",[0,4,0,0,0,0,0,0,100,"",-2,"",-2,50,0,0,"#999999","transparent","",0,0,0,"#000000"]);
stm_ai("p0i0",[2,"","1_1.png","1_2.png",109,64,0,"/index.php","_self","","","","",0,0,0,"","",0,0,0,0,1,"#E6EFF9",1,"#FFD602",1,"","",2,3,0,0,"#E6EFF9","#000000","#000000","#000000","8pt Verdana","8pt Verdana",0,0,"","","","",0,0,0],0,64);
stm_aix("p0i1","p0i0",[2,"","2_1.png","2_2.png",100,64,0,"/packs.html"],100,64);
stm_aix("p0i2","p0i0",[2,"","3_1.png","3_2.png",100,64,0,"/portfolio.html"],100,64);
stm_aix("p0i3","p0i0",[2,"","4_1.png","4_2.png",100,64,0,"#"],100,64);
stm_aix("p0i4","p0i3",[2,"","5_1.png","5_2.png",116],100,64);
stm_ep();
stm_em();
//-->
</script>


Top
 Profile  
 
PostPosted: Fri Jun 14, 2013 10:00 am 
Offline
Guru
User avatar

Joined: Mon May 10, 2004 3:53 am
Posts: 1752
Location: Rescue, CA, USA
Your index page is not a PHP file. It has a .php extension because of the PHP include statement at the very top of the page. You should be able to include your DHTML Menu code just as you do on the other pages of the site. Please ignore my initial reply.

I suggest that you go to http://bestwebmenu.com/ and select the "Getting Started" tab. Read Steps 3b and 3c which recommend using "Web Path" and Step 3f through the end, especially the section about using a JavaScript include file instead of inserting the menu code in every page of your site.

By the way, your English is much better than my Spanish.

Regards,

Bill
Unofficial DHTML Menu Resource Site


Top
 Profile  
 
PostPosted: Sat Jun 15, 2013 1:22 am 
Offline
Member

Joined: Thu Jun 13, 2013 10:55 pm
Posts: 3
It's working now, thanks a lot!!


Top
 Profile  
 
PostPosted: Sat Jun 15, 2013 7:25 am 
Offline
Guru
User avatar

Joined: Mon May 10, 2004 3:53 am
Posts: 1752
Location: Rescue, CA, USA
You're welcome. I'm glad you got it working.

Regards,

Bill
Unofficial DHTML Menu Resource Site


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC + 8 hours


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group