Hello folks,
I have a confluence Space which have many STEP-by-STEP procedures for implementing servers, network, etc.
One of our pains right now, is to change the COMMANDS to reflect to correct names, servers, and configuration.
I came with the idea of Creating a FORM in top of the page with some INPUT on that, like SERVERNAME, USERNAME, etc
and in the documentation it self, I used some tags <%SERVERNAME%> and <%USERNAME%>:
...
<omitted>
-- Connect using the username in the server
$ ssh <%USERNAME%>@<%SERVERNAME%>
...
<omitted>
...
Using HTML Macro, I was able to create the form and the javascript:
<script type="text/javascript">
function RefreshPageContent(x) {
console.log(x.getElementsByTagName("input"))
}
</script>
<form class="aui" id="FormToRefresh">
<div class="field-group">
<label for="text-input">Servername</label>
<input class="text" type="text" id="SERVERNAME" title="ServerName">
<div class="description">ServerName</div>
<input class="text" type="text" id="USERNAME" title="Username">
<div class="description">Username</div>
</div>
</form>
<button class="aui-button aui-button-primary" onclick="RefreshPageContent(self.document);" id="RefreshDetails">Refresh</button>
The problem now is how to access the main document to replace the BODY ? As It use iFrame, I cant access outside of it, and if I put the function out, I cant access it as well.
Four years later, looking for the same. Did you find a solution for this use case?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.