Currently utilizing this javascript to trigger an event on key press:
function myFunction() {
if (window.event || window.event.keyCode == 13) {
changeSource();
}
}
function changeSource(){
document.getElementById("frame1").src="Log-In.aspx";
window.alert("wow");
}
This is where I plan to use my onkeypress event:
<input id= "Text1" placeholder="Search here..." type="text" onkeypress="myFunction()"/>
And this is the iframe that I want the event to affect:
<iframe id="frame1" width="100%" height="100%" frameborder="0" name="page" src="about:blank" ></iframe>
The issue lies in being unable to change the src attribute of my iframe despite the event being triggered.