I have the following JS:
<script>
function SetContent(link) {
document.getElementById('lowerContent').innerHTML =
"<iframe frameborder='0' src='" + link + "' width=100%' height='" + (screen.height - 100) + "px'";
}
</script>
Which gets called like so:
<a href="javascript:SetContent('http://urlhere);" title="URL">URL</a>
How can I make the <a> execute on button click? Or how to assign "javascript:SetContent('http://urlhere);" to <input type=button>
No postback is required.
The click simply resets the main div and adds an iframe with the supplied URL.
Works fine for <a> but not sure how to move that to a button.
onclick just causes postback and nothing else.