Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

Coding Forum


You are currently viewing our Coding Forum as a guest. Please register to participate.
Login



Reply
Old 04-15-2004, 10:15 AM An idea...
wicko3's Avatar
The Wickmeister

Posts: 368
Location: Derby, UK
Trades: 0
Right, here's an idea I've had. You know how you can use the javascript "document.write" function to write html in your site, something like "document.write('<p>Hello</p>')? Well, say you wanted the same footer on all your pages, then why not save the footer as a javascript script, then call the script from all the pages at the right point. This way the script can be easily editted when necessary, and only needs changing once.

What do you think?
__________________
Wicko
--------------------------------------------------------------------
Always proof-read your posts to see if you any words out.
wicko3 is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 04-15-2004, 03:16 PM
Christopher's Avatar
Iced Cap

Latest Blog Post:
Cross-domain AJAX with JSONP
Posts: 3,110
Location: Toronto, Ontario
Trades: 0
I used to think about doing that as well. But then you've got to worry about all the quotes and escaping them, the multiple document.write's, and the plain fact that not all people have javascript enabled.

Though the last problem isn't seen much these days, the first two would just piss me off I guess if you used a text editor's search and replace feature it wouldn't be that hard...

I wonder how much it would affect rendering time.
__________________

Please login or register to view this content. Registration is FREE
- Latest Articles:
Please login or register to view this content. Registration is FREE
,
Please login or register to view this content. Registration is FREE

--
Please login or register to view this content. Registration is FREE

Christopher is offline
Reply With Quote
View Public Profile
 
Old 04-16-2004, 08:30 AM
david's Avatar
King Spam Talker

Posts: 1,314
Location: Glasgow, UK
Trades: 0
I also tried this a little while ago. I'm not sure how much of an issue it is now, but I remember there were problems with some browsers which woudln't load external JavaScript files, though.

Shouldn't be too much of a problem, though. It's exactly the same way Google Adwords works.
__________________

Please login or register to view this content. Registration is FREE
- Everything a webmaster needs - for free

Please login or register to view this content. Registration is FREE
- Free web hosts reviewed and rated

Please login or register to view this content. Registration is FREE
- Impartial hosting directory - Add your host today for FREE
david is offline
Reply With Quote
View Public Profile
 
Old 04-16-2004, 09:19 AM
WaHoOoO!'s Avatar
Mentally Unstable Tugboat Captain

Posts: 797
Name: Chad
Location: /usr/bin/perl
Trades: 0
I would guess it would work...I mean, as a solution if your server doesn't have PHP. But you could do a similar thing and use the SHTML include (<!--#include virtual="PATH" -->) which is basically identical to the PHP include().
__________________
He's baaaaaaaack....
WaHoOoO! is offline
Reply With Quote
View Public Profile Visit WaHoOoO!'s homepage!
 
Reply     « Reply to An idea...
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.59084 seconds with 12 queries