Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 8 of 8
  1. #1
    New to the CF scene
    Join Date
    Oct 2012
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    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

  • #2
    Senior Coder DanInMa's Avatar
    Join Date
    Nov 2010
    Location
    Salem,Ma
    Posts
    1,577
    Thanks
    13
    Thanked 248 Times in 248 Posts
    depending on the situation you can use server side includes, both php and asp have the capability
    Last edited by DanInMa; 10-22-2012 at 04:50 PM.

  • #3
    Regular Coder
    Join Date
    Apr 2012
    Location
    St. Louis, MO
    Posts
    985
    Thanks
    7
    Thanked 101 Times in 101 Posts
    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".

  • #4
    New to the CF scene
    Join Date
    Oct 2012
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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

  • #5
    New to the CF scene
    Join Date
    Oct 2012
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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?

  • #6
    Senior Coder DanInMa's Avatar
    Join Date
    Nov 2010
    Location
    Salem,Ma
    Posts
    1,577
    Thanks
    13
    Thanked 248 Times in 248 Posts
    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.

  • #7
    New to the CF scene
    Join Date
    Oct 2012
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I thought it would be harder than that I will study up on php thanks for your help

  • #8
    New to the CF scene
    Join Date
    Oct 2012
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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?


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •