ERLEDIGT
NEIN
NEIN
ANTWORTEN
1
1
ZUGRIFFE
735
735
EMPFEHLEN
-
12.10.05 14:41 #1
- Registriert seit
- Oct 2005
- Beiträge
- 15
Hallo alle miteinander,
mein Problem bezieht sich auf den folgenden Code.
Ich habe hier mittels dieses Forum und Dank der con-f-usen Hilfe ein Script hinbekommen, dass eine Textdatei ausliest und diese in einer Art Richtext Editor darstellt. Das funktioniert leider nur im Internetexplorer und nicht im Firefox.
Code :1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html lang="en" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml"> <head> <title>online-editor</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <meta name="AUTHOR" content="con-f-use@gmx.net" /> <link rel="stylesheet" href="../css/seventhlife.css" type="text/css"> <script type="text/javascript"> //coded by con-f-use@gmx.net - be fair and do not remove this var formu, ifrm, uagent=navigator.userAgent.toLowerCase(), isGecko = ( uagent.match('gecko') && navigator.productSub>=20030210 ), isIE = uagent.match('msie') && !uagent.match('opera') && (!uagent.match('msie 5.5')||!uagent.match('msie 6.')); function initEdit(strFormu,strEdit) { formu = document.getElementById(strFormu); if (isIE) ifrm = eval('window.'+ strEdit +'.document'); if (isGecko) { ifrm = document.getElementById(strEdit).contentWindow.document; ifrm.focus = new Function('fx','window.'+ strEdit +'.focus()'); } ifrm.designMode = 'on'; var kids = document.getElementsByTagName('div'); for (var i=0; i<kids.length; i++) if (kids[i].className == 'imagebutton') kids[i].onclick = tbclick; } function tbclick() { var id = this.id; if(id == 'CreateLink' && isIE) { ifrm.execCommand(id); } else { if (id=='FontName' || id=='FontSize') { sel = document.getElementById(id).childNodes; if (isIE) sel = sel[0]; if (isGecko) sel = sel[1]; arg = sel.options[sel.selectedIndex].firstChild.data; } else if (id == 'InsertImage') arg = prompt('Enter a image location:', 'http://'); else if (id == 'CreateLink') arg = prompt('Enter a URL:','http://') else arg = null; ifrm.execCommand(id,false,arg); if (arg == null) ifrm.focus(); } } function processData() { formu.content.value = ifrm.body.innerHTML; contents = contents.replace(/\r\n/g, '<br>'); contents = contents.replace(/\n/g, '<br>'); contents = contents.replace(/\r/g, '<br>'); if( !formu.content.value.replace(/<br>|\s| /ig,'') ) { alert('You did not enter any Text!'); return false; } return true; } </script> </head> <body onLoad="initEdit('form_content','edit')" class="t11" > <form onSubmit="return processData()" id="form_content" action="text_write.php" method="post"> <input type="hidden" name="var1" value= "<?php echo $vartxt; ?>"> <table width="400" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td width="100"> <div class="imagebutton" id="bold" onClick="tbclick()"> <a href="#" onClick="return false" style="font-weight:bold"> <img src="images/ed_format_bold.gif" width="18" height="18" border="0" /> </a> </div> </td> <td width="100"> <div class="imagebutton" id="italic"> <a href="#" onClick="return false" style="font-style:italic"> <img src="images/ed_format_italic.gif" width="18" height="18" border="0" /> </a> </div> </td> <td width="100"> <div class="imagebutton" id="underline"> <a href="#" onClick="return false" style="text-decoration:underline"> <img src="images/ed_format_underline.gif" width="18" height="18" border="0" /> </a> </div> </td> <td width="100"> <div class="imagebutton" id="insertorderedlist"> <a href="#" onClick="return false"> <img src="images/ed_list_num.gif" width="18" height="18" border="0" /> </a> </div> </td> <td width="100"> <div class="imagebutton" id="insertunorderedlist"> <a href="#" onClick="return false"> <img src="images/ed_list_bullet.gif" width="18" height="18" border="0" /> </a> </div> </td> <td width="100"> <div class="imagebutton" id="CreateLink"> <a href="#" onClick="return false"> <img src="images/ed_link.gif" width="18" height="18" border="0" /> </a> </div> </td> </tr> </table> <br /> <iframe id="edit" name="edit" src="<?php echo $vartxt; ?>" width="100%" height="400" frameborder="0" marginheight="0" marginwidth="0"> </iframe> <br /> <input type="submit" value="Speichern"> <textarea name="content" wrap="PHYSICAL" style="visibility:hidden;"></textarea> <br /> </form> </body> </html>
Kann mir jemand von euch helfen auch dieses Problem zu beheben.
Vielen Dank im Voraus!
-
Hallo....
führe bitte das bestehende Thema weiter.
Dieses identische Thema hier würde zu Überschneidungen und Chaos führen....wird deshalb geschlossen.
Ähnliche Themen
-
jQuery - Script funktioniert in IE nicht, Firefox & Safari aber schon!
Von flaep im Forum Javascript & AjaxAntworten: 2Letzter Beitrag: 28.10.10, 09:36 -
Java-Script funktioniert bei IE leider nicht bei Firefox
Von Cullmann87 im Forum Javascript & AjaxAntworten: 4Letzter Beitrag: 09.09.10, 10:02 -
Script funktioniert nach Firefox Update nicht mehr
Von bachhofer im Forum Javascript & AjaxAntworten: 1Letzter Beitrag: 30.07.09, 20:02 -
PHP-Script funktioniert unter Firefox, unter IE nicht - bin ratlos
Von Vektor im Forum PHPAntworten: 2Letzter Beitrag: 29.10.07, 13:59 -
Fader-Script: Funktioniert in IE6, aber nicht in Firefox
Von rolo im Forum Javascript & AjaxAntworten: 1Letzter Beitrag: 12.10.04, 19:51





Login





