Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Oct 2007
    Thanked 1 Time in 1 Post

    Load different HTML based on broswer

    I currently am using Javascript to load different CSS files to apply to a page depending on whether or not someone is using Firefox. But what I would like to do is have the script instead load entirely different html onto the page based on this same condition without having to make a document.write for every line of code. Is that possible?

    I've played with it a tad, but I'm still not too well versed in JS, and so I haven't found anything that seems to me like it'd work aside from having a crapload of document.write 's.

  2. #2
    Regular Coder
    Join Date
    Mar 2008
    Thanked 30 Times in 30 Posts
    I think ideally this is what the server is for. But I don't know that it would be best to serve different HTML/browser. Might be better to work out incompatibilities and serve out the same. Even the small screen devices now allow notepad-like finger sliding of the entire window.

    You can selectively shut things off, perhaps, in context. Let's say you have full-screen pages with navigation, but you also have the option of showing these same pages in an iframe. In the iframe, you might want to hide the nav bar. Something like that.


Posting Permissions

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