Hello,
I would like to know how can I load a page in a iframe but with some added things to it (like scripts, header, etc). Suppose I have this example :
Code:
<html>
<head>
<script type="text/javascript">
function rightButton(event){
if (event.button==2)
alert("You clicked the right mouse button!")
}
</script>
</head>
<body onmousedown="rightButton(event)">
<p>Right button alert. </p>
</body>
</html>
which alerts you when you click the right mouse button. And now, suppose I have the following iframe :
<iframe src="http://google.com" name="show" height = "400" width = "400">
</iframe>
My question is how to "inject" into the iframe source the script I've talked about, and the declaration :
<body onmousedown="rightButton(event)">
so that the script can be used (so when I click the right button on the google page in the iframe the alert should apear).
Considering that the pages that will be displayed in the iframe (in the example, google.com) aren't editable, how can I do this thing ?
Regards,
Adi