Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- Auto insert code into another html page
July 18, 2006, 11:01 pm
rate this thread
The program lets you export the project into several different html
document which link to each other. Each project is saved with its html
pages within a folder which has the same name as the project.
I have created a master file which lists all the project folders and
when you click the project name the project is displayed using the
automatically generated pages
One problem I have found is the automatically generated pages obviously
dont have a link back to my main page.
I dont want to edit all the newly created project documents with the
link so my question is can you automaticlly insert the link into the
pages when the user clicks the project file from my main page?
1 User creates new project and exports the html docs into a folder with
the same name.
2 Other user opens my main page which displays the newly created
3 He opens the project which inserts a link to the main page of the
4 If the link allready exists then dont insert it again.
Hope this makes sense?
Re: Auto insert code into another html page
page is loaded. For example, you could use the good old search and
replace to replace a tag with the one you wanted.
perl -pi.bak -e 's/<body>/<body><a href="http://yourpage.com ">Your
Note - the above line done from memory, might have to be tweaked. One
thing to be careful of is to avoid the use of quote/doublequotes within
the material to be changed. For instance in the line above, because I
use single quotes for the 's/.../..../i' section, the text inside there
should not have single quotes.
A good explanation is at
- » Automating Calls to a URL with different Parameters
- — Previous thread in » HTML Markup Language