SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Thread: JS for updates?

  1. #1
    SitePoint Enthusiast
    Join Date
    Sep 2003
    Location
    maine
    Posts
    60
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    JS for updates?

    OK, I've got a site that I want to update frequently and change leader sentences around when I want through different subpages without going and changing the HTML on every page. I'm thinking I could use JS and define variables as my "blurbs" and links and then they'd set up across all the pages as defined. Or I could dive into more of an understanding of PHP & mySQL (i know some basics). Any advice/suggestions?
    Thanks.

  2. #2
    SitePoint Addict
    Join Date
    Mar 2003
    Location
    CA
    Posts
    210
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You could certainly produce dynamic output using client-side js. In some respects it is better than dynamically generating the content for each request on the server. It is less work for the server to do. But traditionally this IS done on the server-side using PHP, ASP, JSP, Perl, etc... Partly because one can easily create an "Administration" page where the blurbs get updated by someone who doesn't know HTML or JS or so that you can do it all in one place. A good solution would be to create a small PHP or Perl program that rewrites your HTML pages each time you want to change the text. This way you get static pages served but the content is easily changeable. Another solution is using a commercial content management system if your site is large enough.

  3. #3
    Web-coding NINJA! silver trophy beetle's Avatar
    Join Date
    Jul 2002
    Location
    Dallas, TX
    Posts
    2,900
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ya, and remember, javascript generated content can't be spidered (or seen by those with JS disabled).
    beetle a.k.a. Peter Bailey
    blogs: php | prophp | security | design | zen | software
    refs: dhtml | gecko | prototype | phpdocs | unicode | charsets
    tools: ide | ftp | regex | ffdev





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
  •