Results 1 to 4 of 4

Thread: Retrieving document title and URL?

  1. #1
    Join Date
    Aug 2005
    Posts
    115
    Thanks
    3
    Thanked 1 Time in 1 Post

    Post Retrieving document title and URL?

    I have found this great social bookmarking widget-service but I have so many pages (all set up in manual HTML files) that it would take days to set it up into each and every single one. However in all of them I have loaded external 'document.write("...")' js files so that I can create the appearance of a Wordpress powered site and as such I am able to add content to every page just by adding something into one of the js files.

    I am trying to add this widget into one of them and so that my visitors can bookmark certain individual pages that they happen to be on. I would believe there to be a way to do this simply by adding a javascript to <HEAD> and simply putting in some sort of 'variable retriever' into the form fields labeled Your page name and Your page url on this webpage here: http://www.addtoany.com/buttons/

    Best Regards
    ~Ross

  2. #2
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    I have so many pages (all set up in manual HTML files) that it would take days to set it up into each and every single one. However in all of them I have loaded external 'document.write("...")' js files so that I can create the appearance of a Wordpress powered site
    ARGH MY BRAIN!

    I pity non-JS users who stumble upon your site...
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  3. #3
    Join Date
    Aug 2005
    Posts
    115
    Thanks
    3
    Thanked 1 Time in 1 Post

    Default

    Quote Originally Posted by Twey View Post
    ARGH MY BRAIN!

    I pity non-JS users who stumble upon your site...
    Why do you say that? I realize the issue with non-js users though is there a specific problem with using document.write("...")?
    Also I plan on integrating a workaround for those users sometime this month anyway.

    Best Regards
    ~Ross

  4. #4
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Why do you say that? I realize the issue with non-js users though is there a specific problem with using document.write("...")?
    Yes. Non-JS users won't get any of that content. For JS users, it will simply slow down the page load rather majorly.
    Also I plan on integrating a workaround for those users sometime this month anyway.
    You're going about this the wrong way. That's not how websites should be built. First comes basic structure and data with HTML, then comes presentation with CSS, then comes functionality enhancements with JS. That way everybody down the chain gets at least the bare contents of the page. Read http://en.wikipedia.org/wiki/Progressive_enhancement and http://www.howtocreate.co.uk/tutoria...n/introduction.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

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
  •