HR.Net is working through web-browser and in the background it is plain html pages with javascript.
In the latest versions of HR.Net we have ability to put in our JavaScript into screens and workflows. And sometimes it is useful to see what HTML code is actually on the page.
To output HTML source code do the following: on the required screen place a field of type Memo. Give it a proper name. Then open Custom Script dialog for that screen an put there the following code:
$HRnet("MEMO FIELD NAME").setDisplayValue(document.body.innerHTML);
Replace “MEMO FIELD NAME” with the name of the memo field you have created.
Next time you open this screen, you will have the entire html source of the page loaded, where you can review the structure and develop further JavaScript. This technique allowed me to do much more stuff on the screen and enhanced interaction with a user.
Enjoy.
p.s. as Vicas says you can also do this:
var popup=window.open(); popup.document.open("text/plain"). write(document.documentElement.innerHTML)
or
var popup=window.open(); popup.document.open("text/plain"). write(document.documentElement.outerHTML)
Has been sooo useful to me,
Thanks a lot
found the same trick myself few days back. Another better approach :
var popup=window.open();
popup.document.open(‘text/plain’).write(document.documentElement.innerHTML)
or
var popup=window.open();
popup.document.open(‘text/plain’).write(document.documentElement.outerHTML)
Just paste above code in screen/form script editor
That looks quite neat. I’ll try that next time I need it.
Thanks)
What is the difference between inner and outer HTML?
Here is some interesting text
innerHTML= The HTML contained by a tag.
outerHTML = The HTML of a tag, including the tag itself.