Go Back   CodingForums.com > :: Client side development > General web building

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 02-19-2013, 08:13 AM   PM User | #16
felgall
Master Coder

 
felgall's Avatar
 
Join Date: Sep 2005
Location: Sydney, Australia
Posts: 5,447
Thanks: 0
Thanked 496 Times in 488 Posts
felgall is a jewel in the roughfelgall is a jewel in the roughfelgall is a jewel in the rough
Quote:
Originally Posted by StevenHu View Post
I wrote an article that included a simple way to incorporate a simple footer using Javascript and innerHTML.
It doesn't work when JavaScript is turned off!

Also writing output using innerHTML messes things up of you need JavaScript to be able to interact with those parts of the page - so a lot of the time it will not work with JavaScript turned on.

Including web page content should ALWAYS be done using server side processing.
__________________
Stephen
Learn Modern JavaScript - http://javascriptexample.net/
Helping others to solve their computer problem at http://www.felgall.com/
felgall is offline   Reply With Quote
Old 02-19-2013, 11:57 AM   PM User | #17
VIPStephan
The fat guy next door


 
VIPStephan's Avatar
 
Join Date: Jan 2006
Location: Halle (Saale), Germany
Posts: 7,583
Thanks: 5
Thanked 864 Times in 841 Posts
VIPStephan is a jewel in the roughVIPStephan is a jewel in the roughVIPStephan is a jewel in the rough
Quote:
Originally Posted by felgall View Post
Including web page content should ALWAYS be done using server side processing.
Or you use the object element. But that should only be used if no server side processing is possible.
__________________
Don’t click this link!
VIPStephan is offline   Reply With Quote
Old 02-19-2013, 06:20 PM   PM User | #18
felgall
Master Coder

 
felgall's Avatar
 
Join Date: Sep 2005
Location: Sydney, Australia
Posts: 5,447
Thanks: 0
Thanked 496 Times in 488 Posts
felgall is a jewel in the roughfelgall is a jewel in the roughfelgall is a jewel in the rough
Quote:
Originally Posted by VIPStephan View Post
Or you use the object element. But that should only be used if no server side processing is possible.
You do end up with a border around the included content in IE7 though if you include HTML using an object tag. So that isn't practical if you want it to appear to be part of the same page.

Also if you still need to support IE6 you need two nested object tags and conditional comments. You can get rid of the border in IE6 using CSS from within the included page.
__________________
Stephen
Learn Modern JavaScript - http://javascriptexample.net/
Helping others to solve their computer problem at http://www.felgall.com/
felgall is offline   Reply With Quote
Old 02-19-2013, 07:03 PM   PM User | #19
VIPStephan
The fat guy next door


 
VIPStephan's Avatar
 
Join Date: Jan 2006
Location: Halle (Saale), Germany
Posts: 7,583
Thanks: 5
Thanked 864 Times in 841 Posts
VIPStephan is a jewel in the roughVIPStephan is a jewel in the roughVIPStephan is a jewel in the rough
Yes, I assumed that these browsers are of little concern by now.
__________________
Don’t click this link!
VIPStephan is offline   Reply With Quote
Old 02-22-2013, 10:29 PM   PM User | #20
StevenHu
Regular Coder

 
Join Date: Jun 2011
Location: CA
Posts: 105
Thanks: 0
Thanked 10 Times in 10 Posts
StevenHu is an unknown quantity at this point
Quote:
Originally Posted by felgall View Post
It doesn't work when JavaScript is turned off!

Also writing output using innerHTML messes things up of you need JavaScript to be able to interact with those parts of the page - so a lot of the time it will not work with JavaScript turned on.

Including web page content should ALWAYS be done using server side processing.
I'm curious: are there any stats on how many people turn off JS, besides web coders who test for this?
__________________
Steve Husting
http://iphonedevlog.wordpress.com
StevenHu is offline   Reply With Quote
Old 02-22-2013, 10:51 PM   PM User | #21
VIPStephan
The fat guy next door


 
VIPStephan's Avatar
 
Join Date: Jan 2006
Location: Halle (Saale), Germany
Posts: 7,583
Thanks: 5
Thanked 864 Times in 841 Posts
VIPStephan is a jewel in the roughVIPStephan is a jewel in the roughVIPStephan is a jewel in the rough
There are stats, I’ve heard, which indicate some one figure percentage of users who have no JS. However, statistics are irrelevant because that’s the wrong way of thinking (I know, there are people that would strongly disagree with me). It is my strong conviction that JavaScript should (still, nowadays, in times of “web apps”) be used only as an enhancement of a site that’s already working at least in a basic way; it should not be used as sole solution for crucial functionality. And after all, if a website is coded properly, JavaScript is rarely necessary to provide all the relevant functionality, and if coded properly, rarely any significant additional work is necessary to add the JS enhancements. Plus, it makes future maintenance much easier if functionality is separated and working independently.

And finally, 1% of a million users is still 10,000 users. Wanna lose 10,000 potential customers/clients because you’re too lazy to do a little more thinking in advance?
__________________
Don’t click this link!
VIPStephan is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 08:15 PM.


Advertisement
Log in to turn off these ads.