Advanced Search

Results 1 to 4 of 4

Thread: How to insert JS into this particular PHP web?

  1. #1
    Join Date
    May 2011
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default How to insert JS into this particular PHP web?

    Hi all,

    I am new to PHP...I would like to insert a JavaScript slideshow into PHP website.

    I know there are a lot of articles discussing about this: Placing the script inside PHP file in between <HEAD></HEAD> and PHP echo inside the body.

    The problem is there is no HTML structure inside my PHP files (I've been searching header.php, index.php, functions.php, etc), no <HEAD></HEAD> and <BODY></BODY>. Most of them are just PHP echo...

    Any ideea how to put this?

    Thanks.

    hc.

  2. #2
    Join Date
    May 2007
    Location
    Boston,ma
    Posts
    2,127
    Thanks
    173
    Thanked 207 Times in 205 Posts

    Default

    What PHP code are you using, is it a CMS or did you hire a developer?
    Corrections to my coding/thoughts welcome.

  3. #3
    Join Date
    May 2011
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    No, this is like an open source PHP template that I downloaded for forum discussion like purpose.

    It has .htaccess file, I don't know if it will give a hint.

    hc.

  4. #4
    Join Date
    Apr 2008
    Location
    So.Cal
    Posts
    3,627
    Thanks
    63
    Thanked 516 Times in 502 Posts
    Blog Entries
    5

    Default

    It sounds like you have a fairly developed content management system. This might not be the best place to start if you want to work directly with the code, and don't know much about php.

    PHP, contrary to the way a lot of webmasters view it, is not script that you can "place inside" your webpages: it is script that generates webpages. PHP's job is to write HTML. The html structure you're looking for is being written in steps throughout the script, and so you can't add and remove stuff the same way you would on a normal webpage - you simply won't find it all in one place.

    I would definitely recommend learning more about php before trying to modify a complete system. In any case, we would need to know exactly what scripts you have, and what you want to do to them, before we could offer any help.
    We Only Torture the Folks We Don't Like (You're Probably Gonna Be Okay)
    It's a Party in the CIA

Bookmarks

Posting Permissions

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