Follow along with the video below to see how to install our site as a web app on your home screen.
Anmerkung: This feature may not be available in some browsers.
<html>
<head>
<script language="JavaScript">
<!--
function loadframe(formular,frame)
{
var element = formular.room.selectedIndex;
if (formular.room.options[element].value != 0)
{
document.getElementById(frame).src = formular.Ziel.options[element].value;
document.getElementById(frame).style.display = 'block';
}
}
//-->
</script>
<style type="text/css">
<!--
#chat {display:none;}
-->
</style>
</head>
<body>
<form name="chatrooms">
<select name="room" onchange="loadframe(this.form,'chat');">
<option value="" selected>Chatraum ändern</option>
<option value="raum1.html">Raum1</option>
<option value="raum2.html">Raum2</option>
<option value="raum3.html">Raum3</option>
</select>
</form>
<iframe src="room1.html" id="chat">
</body>
</html>
<div id="meinIframe"></div>
<script type="text/javascript">
function changeIframe() {
document.getElementById('meinIframe').innerHTML = '<iframe src="blubb.html"></iframe>';
}
</script>
Du kannst deinen IFrame in ein DIV positionieren.
Diesem gibst du dann eine ID
Code:<div id="meinIframe"></div>
Mit JavaScript kannst du dann den Inhalt des Divs ändern.
Code:<script type="text/javascript"> function changeIframe() { document.getElementById('meinIframe').innerHTML = '<iframe src="blubb.html"></iframe>'; } </script>
<select id="meineAbfrage" onChange="changeIframe()">
<option>---</option>
<option value="http://pfad/zum/iframe1.html">IFrame 1</option>
<option value="http://pfad/zum/iframe2.html">IFrame 2</option>
</select>
<script type="text/javascript">
function changeIframe() {
var src = this.getElementById('meineAbfrage').value;
document.getElementById('meinIframe').innerHTML = '<iframe src=" ' + src + ' "></iframe>';
}
</script>
<div id="meinIframe"></div>
<html>
<head>
{NEED|$roomlist&onlineusers}
<base href="{GET|$settings.urls.htmlurl}">
<link rel="stylesheet" href="http://web3.greatboard.de/start2/style.css" type="text/css">
<title>{GET|$settings.chatname}</title>
<script language="JavaScript" src="chat.js" type="text/javascript">
</script>
<script type="text/javascript">
function changeIframe() {
document.getElementById('changeIframe').innerHTML = '<iframe src="blubb.html"></iframe>';
}
</script>
<div id="changeIframe"></div>
<select value="changeIframe" onchange="CheckAuswahl()" name=room width="100px" size="10" face="Century Gothic" style="font-size: 11pt">
<select id="meineAbfrage" onchange="[b]changeIframe()[/b]" name="room" width="100px" size="10" face="Century Gothic" style="font-size: 11pt">
[b]<option value="iframe1.html">Iframe 1</option>
<option value="iframe2.html">Iframe 2</option>
</select>
[/b]