Hello, I would like a script written in javascript which would allow me to edit the current html file from where the script was run.
So for example if i have a page named: [login to view URL]
Javascipt code written in the [login to view URL] file would look like:
<script language="javascript">
function EditThis( command, id, text )
{
//There are 2 possible commands
1. Add - which would add the new text to the html file
2. Remove - which would remove the specified text from the html file
//The id is the location in the html file
example:
<div id="mainmenu">
</div>
//The text is the text to add/remove under the id
}
</script>
\*\*\*|\\*\*\*|\\*\*\*|\\*\*\*|\\*\*\*|\\*\*\*|\\*\*\*|\\*\*\*|\\*\*\*|\*\*
So if the code would be:
javascript:EditThis("Add", "mainmenu", "<a href='#'>Home</a>");
<div id="mainmenu">
</div>
The Result Should be:
<div id="mainmenu">
<a href='#'>Home</a>
</div>
\*\*\*|\\*\*\*|\\*\*\*|\\*\*\*|\\*\*\*|\\*\*\*|\\*\*\*|\\*\*\*|\\*\*\*|\*\*
I hope this makes sense and please let me know if not.
Thank you
Paul