Page 2 of 2 FirstFirst 12
Results 11 to 15 of 15

Thread: Referencing an external file

  1. #11
    Join Date
    Apr 2006
    Posts
    429
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    m not good at any server side scripting either its still ur choice no matter how daft and lame we think using javascript for includes really are
    Please don't mind me. I am just posting a lot of nonsense.

  2. #12
    Join Date
    Jul 2006
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thanks for the help everyone. Your advice pointed me in the perfect direction. I did get it sorted out.

    Since the part I wanted external was a javascript for drop down menus, I ended up using this script to call the external javascript menu file.

    <SCRIPT language="JavaScript" SRC="http://www.ctap4.org/menu.js"></SCRIPT>

    superjadex, can you explain your thoughts here a little more.

    Quote Originally Posted by superjadex12
    I would really emphasize NOT using javascript, because your entire website would then depend on a code that can be (easily) be disabled or just plain not supported. Accessability basically goes down the drain... whereas serverside is always executed, regardless of browser...
    The javascript has been working in all browsers I have tested on multiple platforms, but is there something else I should be aware of? Thanks again.

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

    Default

    The javascript has been working in all browsers I have tested on multiple platforms, but is there something else I should be aware of? Thanks again.
    You evidently haven't testing in Lynx.

    Also, many users deliberately disable Javascript for security reasons. There was a (nother) remote exploit that gave full access to the attacker to a Windows system a little while back. Microsoft typically took an entire week to patch it, but in the meantime it even recommended that users disable Javascript.
    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!

  4. #14
    Join Date
    Jul 2006
    Posts
    36
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Talking

    daddioja,

    Basically what I am getting at is that although javascript is very useful and enhances greatly the interactivity of a website, the general consensus is that
    a website should not depend entirely upon js. And in your case, your navigation is entirely dependant on js. Meaning that if js was disabed (and as Twey pointed out, its not so rare as you may think) , or not supported etc, then your site will cease to perform.

    I want to tell you I am no professional, I have no formal training , I don't get paid, etc. So I am getting all my facts from the guys that care to share their knowledge here on the internet. And time and again, I read that all well-done, progressive coding is based primarily on accessability. The idea that you want your code to be as compliant and as accessible to as many people as possible. This means different browsers, platforms, OS, mobile devices, handicapped accessability, etc. Not only do you benefit from working with a bigger market but search engines love to work with "good", clean, functional, code.

    So my opinion is , yes, It is HARDER, to code to such standards...but you benefit from it much more.

    To give you an example, I am working on a site that has ajax enabled page loads. Basically it uses javascript to load content right on the current page without reloading the page. Instant content, right there! Now this sounds great But turn off javascript and what do you get? A whole lotta blank space. So to fix this, I use php as a backup. The link tags that load the javascipt, also carry links to the exact same content only in a separate page. So clicking on the link with js enabled, gives the uses instant content, but with js disabled, the standard link will load the page that holds the same content.

    So in your case I think your best bet is working with your server side script. Server side script ALWAYS works! Don't you love that. If you can tell us exactly what language you're using I'm sure the guys here can help. I'm near positive that pretty much any and all server-side languages have include capability, and I'm also sure its a piece of cake too (i.e for php, include (filename.php); DONE!!!!

  5. #15
    Join Date
    Jul 2006
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thanks for the feedback guys. I will look into it a bit more. I appreciate your thoughts. I now have some homework to do.

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
  •