Go Back   CodingForums.com > :: Client side development > General web building

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 10-22-2012, 02:15 PM   PM User | #1
jj72ny
New to the CF scene

 
Join Date: Oct 2012
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
jj72ny is an unknown quantity at this point
Css or java script

I want to put a few picks and some HTML ect. at the top of each page of my websight do I use java script or css to do this I am new to both but want to know witch one to studie up on first I don't like the looks of iframes
jj72ny is offline   Reply With Quote
Old 10-22-2012, 02:23 PM   PM User | #2
DanInMa
Senior Coder

 
DanInMa's Avatar
 
Join Date: Nov 2010
Location: Salem,Ma
Posts: 1,307
Thanks: 12
Thanked 204 Times in 204 Posts
DanInMa is on a distinguished road
depending on the situation you can use server side includes, both php and asp have the capability
__________________
- Firebug is a web developers best friend! - Learn it, Love it, use it!
- Validate your code! - JQ/JS troubleshooting
- Using jQuery with Other Libraries - Jslint for Jquery/other JS library users

Last edited by DanInMa; 10-22-2012 at 04:50 PM..
DanInMa is offline   Reply With Quote
Old 10-22-2012, 02:36 PM   PM User | #3
WolfShade
Regular Coder

 
Join Date: Apr 2012
Location: St. Louis, MO, USA
Posts: 952
Thanks: 7
Thanked 98 Times in 98 Posts
WolfShade is an unknown quantity at this point
Also, this is the wrong forum for questions. This is for posting scripts that work and the OP thinks might be useful to others.

I'm sure a mod will move this to the proper forum.
__________________
^_^

If anyone knows of a website that can offer ColdFusion help that isn't controlled by neurotic, pedantic jerks* (stackoverflow.com), please PM me with a link.
*
The neurotic, pedantic jerks are not the owners; just the people who are in control of the "popularity contest".
WolfShade is offline   Reply With Quote
Old 10-23-2012, 04:48 PM   PM User | #4
jj72ny
New to the CF scene

 
Join Date: Oct 2012
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
jj72ny is an unknown quantity at this point
I was kinda hoping there was a way with java or css cuz now I will have to learn something new oh well lol guess ill just finish up with learning java script and go to one of the other ones
jj72ny is offline   Reply With Quote
Old 10-23-2012, 04:58 PM   PM User | #5
jj72ny
New to the CF scene

 
Join Date: Oct 2012
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
jj72ny is an unknown quantity at this point
What I am looking for is just to put something kinda like css dose with styles. With an external page that would load to the top of each page with my logo and a menu bar.just so I don't have to put a bunch of coding at the top of each page just like a link or something. Php will do this?
jj72ny is offline   Reply With Quote
Old 10-23-2012, 05:16 PM   PM User | #6
DanInMa
Senior Coder

 
DanInMa's Avatar
 
Join Date: Nov 2010
Location: Salem,Ma
Posts: 1,307
Thanks: 12
Thanked 204 Times in 204 Posts
DanInMa is on a distinguished road
Quote:
Originally Posted by jj72ny View Post
What I am looking for is just to put something kinda like css dose with styles. With an external page that would load to the top of each page with my logo and a menu bar.just so I don't have to put a bunch of coding at the top of each page just like a link or something. Php will do this?
yes, includes are really easy and they are the best solution. You can do something similar with javascript.
If you use an include, say you have a some html for your header. You code that html into a php file, just the html itself no doctype or anything like you normally would, Ill say its called mainheader.php and it's in your root folder under /includes/

the content so mainheader.php could be something like :


Code:
<div id='mainheader>
<ul>
<li>somelink</li>
<li>somelink</li>
<li>somelink</li>
<li>somelink</li>
</ul>
</div>
then right after the body tag in every php page you do this

PHP Code:
<?php include( $_SERVER['DOCUMENT_ROOT'].'/includes/mainheader.php'); ?>
This is also assuming you link your css file in the head of the document.
__________________
- Firebug is a web developers best friend! - Learn it, Love it, use it!
- Validate your code! - JQ/JS troubleshooting
- Using jQuery with Other Libraries - Jslint for Jquery/other JS library users
DanInMa is offline   Reply With Quote
Old 10-23-2012, 06:45 PM   PM User | #7
jj72ny
New to the CF scene

 
Join Date: Oct 2012
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
jj72ny is an unknown quantity at this point
I thought it would be harder than that I will study up on php thanks for your help
jj72ny is offline   Reply With Quote
Old 10-28-2012, 01:01 AM   PM User | #8
jj72ny
New to the CF scene

 
Join Date: Oct 2012
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
jj72ny is an unknown quantity at this point
The php worked perfectly just one problem I have a drop down menu at bottom of include page and most of it drops below the original page where it can't be read. is there a spacing method I can use?
jj72ny is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

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

Forum Jump


All times are GMT +1. The time now is 02:08 PM.


Advertisement
Log in to turn off these ads.