Computing.Net > Forums > Web Development > Auto Insert HTML into multi pages

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Auto Insert HTML into multi pages

Reply to Message Icon

Name: suspect52732
Date: September 20, 2004 at 08:51:32 Pacific
OS: XP
CPU/Ram: 2.4/512
Comment:

Is this possible? I constantly find myself entering the same html script into multiple pages. Isn't there a program somewhere that will just take the script I want and enter it into all my webpages? This would be an extremly useful tool, I imagine it exists somewhere. Can someone point me to a URL



Sponsored Link
Ads by Google

Response Number 1
Name: Don Arnett
Date: September 20, 2004 at 09:05:49 Pacific
Reply:

I've never used them, but I believe the Server-Side Includes (SSI) might do the trick for you. I did a google search on "HTML SSI" and below is one of the many returns.
http://www.carleton.ca/~dmcfet/html/ssi.html


Also, if you use a server side language like JSP, PHP, Coldfusion, etc., you can include files in those languages also.


0

Response Number 2
Name: suspect52732
Date: September 20, 2004 at 09:31:40 Pacific
Reply:

I am not sure if I was unclear. Is there any program that will take for example this script

<javascript>
Hello World
</script>

And insert into every page I specify into a specific place within each html?

So I want to insert this script:

<javascript>
Hello World
</script>


In this location of every page:

<html>

<head>
-----> X <-----
</head>

<body>
</body>

</html>

Looking more for a program, not a programming language if possible. I know it exists, and it would be extremly usful, and probably save me ALOT of time.
Thanks for any help offered!


0

Response Number 3
Name: Laler
Date: September 20, 2004 at 16:23:45 Pacific
Reply:

I can only think of:

dreamweaver's templating

- create page
- create "editable region(s)"
- save as template

then you can create as many pages as you like with the above template... but one thing for sure, the code will be bloated because of dreamweacer's comment (needed by them to understand the templating)...

Don Arnett's reading you clear, you should try his advice about SSI, it's the simplest templating method...

I dont think a "program" that will do the template for you is good... dreamweaver IMO is the best tool right now, but still I won't use their "program" to create a site template... too bloated

^o^
are you in Asia? do you watch Animax Asia? Please Vote


0

Response Number 4
Name: Laler
Date: September 20, 2004 at 16:25:13 Pacific
Reply:

and too many restrictions...

^o^
are you in Asia? do you watch Animax Asia? Please Vote


0

Response Number 5
Name: suspect52732
Date: September 21, 2004 at 07:22:44 Pacific
Reply:

Thanks for the help. I am really suprised that someone has written a program to do this yet. I mean, it really wouldn't be that hard to input a file in something like c++ and check the file until it hits <head> then after that line enter a predetermined code, or scan the file for the <body> and insert the predefined code there. Maybe if I have some free time I will just write the program, I know it would save a ton of overhead time in the long run!



0

Related Posts

See More



Response Number 6
Name: RTAdams89
Date: September 24, 2004 at 15:48:59 Pacific
Reply:

If yo uare dealiing with javascript just link to the external javascript in each page. then you can just ediit the .js file to alter all the pages at once.

-Ryan Adams
Ryan's
Custom Cables


0

Response Number 7
Name: El-Trucha
Date: September 25, 2004 at 08:48:29 Pacific
Reply:

Umm...maybe a Batch file can do that...:P

El-Trucha


0

Response Number 8
Name: drsmartman
Date: September 26, 2004 at 08:36:49 Pacific
Reply:

Laler is right if you use something like Dreamweaver...seems to be pretty good. If you have server-side scripting (ASP, PHP, JSP, SSI) you can use includes. For instance, I use the same PHP header and footer in all my pages using the PHP include() function...you can also use include_once(), require() and require_once(). Not sure if that's what you're looking for, just an alternate solution...


0

Sponsored Link
Ads by Google
Reply to Message Icon






Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Web Development Forum Home


Sponsored links

Ads by Google


Results for: Auto Insert HTML into multi pages

including .js file into jsp page www.computing.net/answers/webdevel/including-js-file-into-jsp-page-/2794.html

HTML into text file loaded in Flash www.computing.net/answers/webdevel/html-into-text-file-loaded-in-flash/339.html

Use Javascript to insert html www.computing.net/answers/webdevel/use-javascript-to-insert-html/2333.html