PHP interesse |
|
Ja, Ik ben idd op zoek alleen voor een Iframe, Maar misschien kan ik dat zo nog gebruiken voor een ander dingetje..
@ Grayen
Hierbij de gehele pagina ik wil er nog wat dingetjes aan aanpassen, maar weet nog niet precies wat.
Maar die smiles zijn wel heel erg belangrijk nu.
<html>
<head>
<script language="javascript">
function maak_frame(){
if(window.navigator.appName == "Microsoft Internet Explorer")
iframe.document.designMode = "on";
if(window.navigator.appName == "Netscape")
document.getElementById('iframe').contentDocument.designMode = "on";
}
function opslaan() {
var htmlCode = document.getElementById('iframe').contentWindow.document.body.innerHTML;
document.getElementById("areaCode").value = htmlCode;
document.getElementById("formCode").submit();
}
function vet() {
document.getElementById("iframe").contentWindow.document.execCommand("bold", false, null);
}
function schuin() {
document.getElementById("iframe").contentWindow.document.execCommand("italic", false, null);
}
function onderstreept() {
document.getElementById("iframe").contentWindow.document.execCommand("underline", false, null);
}
function lettertype(LetterType) {
if(LetterType != "")
document.getElementById("iframe").contentWindow.document.execCommand("FontName", false, LetterType);
}
function lettergrootte(LetterGrootte) {
if(LetterGrootte != "")
document.getElementById("iframe").contentWindow.document.execCommand("FontSize", false, LetterGrootte);
}
function positie(positie) {
document.getElementById("iframe").contentWindow.document.execCommand("Justify"+ positie, false, null);
}
</script>
</head>
<body onLoad="maak_frame()">
<img src="profiel/editor/images/icon_save.gif" onClick="opslaan()" alt="Opslaan"> <img src="profiel/editor/images/icon_bold.gif" onClick="vet()" alt="Vet"> <img src="profiel/editor/images/icon_italic.gif" onClick="schuin()" alt="Schuin"> <img src="profiel/editor/images/icon_underline.gif" onClick="onderstreept()" alt="Onderstreept"> <img src="profiel/editor/images/icon_align_left.gif" onClick="positie('Left')" alt="Links"> <img src="profiel/editor/images/icon_center.gif" onClick="positie('Center')" alt="Midden"> <img src="profiel/editor/images/icon_align_right.gif" onClick="positie('Right')" alt="Rechts"> <br>
<iframe id="iframe" height="300" width="500" src="profiel/editor/mijn_pagina.php?gbr=<? echo $gbr; ?>"></iframe><br><br>
Kies de tekstgrootte: Kies een lettertype:<br>
<select name="grootte" onChange="lettergrootte(this.options[this.selectedIndex].value)">
<option value="">Kies een grootte</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
</select>
<select name="letter" onChange="lettertype(this.options[this.selectedIndex].value)">
<option value="">Kies een lettertype</option>
<option value="Arial">Arial</option>
<option value="Tahoma">Tahoma</option>
<option value="Courier">Courier</option>
<option value="Verdana">Verdana</option>
<option value="Times New Roman">Times New Roman</option>
</select>
<?
if($_POST['areaCode']){
$over_mij = $_POST['areaCode'];
mysql_query("UPDATE vragen_lijst_pro SET over_mij = '".$over_mij."' WHERE gebruiker = '".$gbr."'") or die(mysql_error());
}
?>
<form action="" method="post" id="formCode" style="display: none;">
<textarea name="areaCode" id="areaCode"></textarea>
</form>
<input type=button onClick="opslaan()" value="opslaan">
</body>
</html>
</body>
</html>
<html> <head> <script language="javascript"> function maak_frame(){ if(window.navigator.appName == "Microsoft Internet Explorer") iframe.document.designMode = "on"; if(window.navigator.appName == "Netscape") document.getElementById('iframe').contentDocument.designMode = "on"; } function opslaan() { var htmlCode = document.getElementById('iframe').contentWindow.document.body.innerHTML; document.getElementById("areaCode").value = htmlCode; document.getElementById("formCode").submit(); } function vet() { document.getElementById("iframe").contentWindow.document.execCommand("bold", false, null); } function schuin() { document.getElementById("iframe").contentWindow.document.execCommand("italic", false, null); } function onderstreept() { document.getElementById("iframe").contentWindow.document.execCommand("underline", false, null); } function lettertype(LetterType) { if(LetterType != "") document.getElementById("iframe").contentWindow.document.execCommand("FontName", false, LetterType); } function lettergrootte(LetterGrootte) { if(LetterGrootte != "") document.getElementById("iframe").contentWindow.document.execCommand("FontSize", false, LetterGrootte); } function positie(positie) { document.getElementById("iframe").contentWindow.document.execCommand("Justify"+ positie, false, null); } </script> </head> <body onLoad="maak_frame()"> <img src="profiel/editor/images/icon_save.gif" onClick="opslaan()" alt="Opslaan"> <img src="profiel/editor/images/icon_bold.gif" onClick="vet()" alt="Vet"> <img src="profiel/editor/images/icon_italic.gif" onClick="schuin()" alt="Schuin"> <img src="profiel/editor/images/icon_underline.gif" onClick="onderstreept()" alt="Onderstreept"> <img src="profiel/editor/images/icon_align_left.gif" onClick="positie('Left')" alt="Links"> <img src="profiel/editor/images/icon_center.gif" onClick="positie('Center')" alt="Midden"> <img src="profiel/editor/images/icon_align_right.gif" onClick="positie('Right')" alt="Rechts"> <br> <iframe id="iframe" height="300" width="500" src="profiel/editor/mijn_pagina.php?gbr= <? echo $gbr; ?>"></iframe><br><br> Kies de tekstgrootte: Kies een lettertype:<br> <select name="grootte" onChange="lettergrootte(this.options[this.selectedIndex].value)"> <option value="">Kies een grootte</option> <option value="1">1</option> <option value="2">2</option> <option value="3">3</option> <option value="4">4</option> </select> <select name="letter" onChange="lettertype(this.options[this.selectedIndex].value)"> <option value="">Kies een lettertype</option> <option value="Arial">Arial</option> <option value="Tahoma">Tahoma</option> <option value="Courier">Courier</option> <option value="Verdana">Verdana</option> <option value="Times New Roman">Times New Roman</option> </select> <? if($_POST['areaCode']){ $over_mij = $_POST['areaCode']; } ?> <form action="" method="post" id="formCode" style="display: none;"> <textarea name="areaCode" id="areaCode"></textarea> </form> <input type=button onClick="opslaan()" value="opslaan"> </body> </html> </body> </html>
Alvast harstikke bedankt! |