Solved

Newbie  PHP and Layers

Posted on 2002-05-11
1
192 Views
Last Modified: 2011-10-03
HI Help needed.

I am just trying to use php.
I use Dreamweaver3 and use the  (function MM_showHideLayers) and preload images.

I have made the main template (main.htm)
I also have class.fasttemplate.php and prepend.php

I have leftnav and header html files
my leftnav.html uses reload images
and one of my content.php pages uses  (function MM_showHideLayers)

My Question is will the java work when the page is called
if so on what page do I put the script that normally goes in the head tag of the page
that the layers are on, because  the php files do not have a head tag.( or should they)
Or do all the java scripts that are required that normally reside in the head tag of the
page that they are on,go in the head tag of the main.htm template.
I hope that this is clear.
0
Comment
Question by:eggyone
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 32

Accepted Solution

by:
Batalf earned 50 total points
ID: 7003124
There's no difference between php-files and other html-files as you know them from netscape.

If your php-files doeesn't contain any <head>-section, you could simply add the <head> section to it.

About javascript-code: The head-section is a good place to put the code, but there's no rule saying that it has to be there. It could also be in the <body>-section. But you should always try to keep the javascript-code as close to the top of the file as possible.

Batalf
0

Featured Post

Don't Cry: How Liquid Web is Ensuring Security

WannaCry is just the start. Read how Liquid Web is protecting itself and its customers against new threats.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Build an array called $myWeek which will hold the array elements Today, Yesterday and then builds up the rest of the week by the name of the day going back 1 week.   (CODE) (CODE) Then you just need to pass your date to the function. If i…
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

691 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question