edytor tekstu wstawianie fotki do iframe nie dziala na f.fox

Wszystko związane ze skryptami JS, DHTML itd.
rafalkoszalin
Posty: 2
Rejestracja: 18 wrz 2011, 16:29:35
Płeć: Niewybrana
User Agent: Firefox Windows 1024x768

edytor tekstu wstawianie fotki do iframe nie dziala na f.fox

Post autor: rafalkoszalin »

Dlaczego to nie dziala na firefoxa a na IE dziala??

edytor.php:


<html>
<head>
<title></title>
<script language="Javascript" src="editor.js"></script>
</head>
<body>
<form method="POST">
<div>
<input type="button" onclick="Format('italic')" value="I" />
<input type="button" onclick="Format('Underline')" value="U" />
<input type="button" onclick="Format('justifycenter')" value="C" />
<input type="button" onclick="Format('justifyleft')" value="L" />
<input type="button" onclick="Format('justifyright')" value="R" /><br/>
<input type="button" name="pic" value="foto" onclick="format('InsertImage','','url')" />


<iframe id="textbox" style="width:300px; height:150px"></iframe><br/>
<input type="submit" value="Go" />
<input type="hidden" id="text" name="text" />
</div>
</form>
</body>
</html>





editor.js:


var Editor;

function Format(action)
{
Editor.execCommand(action, false, null);
}

function Colour(colour)
{
Editor.execCommand("forecolor",false, colour);
}

window.onload = function()
{
Editor = document.getElementById('textbox').contentWindow.document;
Editor.designMode = "on";
document.forms[0].onsubmit = function()
{
var text = document.getElementById('text');
text.value = Editor.body.innerHTML;
}
}

function document.onreadystatechange()
{
window.frames["textbox"].document.designMode="On";
}

function format(aa,bb)
{
window.frames['textbox'].focus;
window.frames['textbox'].document.selection.createRange();
window.frames['textbox'].document.execCommand(aa,true,bb);
}




chcialbym zeby to dzialalo na firefoxa chodzi o buttona z foto.**
Awatar użytkownika
DeaDriam
Posty: 4023
Rejestracja: 04 lip 2011, 14:00:40
Lokalizacja: Möglingen
Płeć: Mężczyzna
User Agent: Firefox Windows 1024x768
Kontakt:

Re: edytor tekstu wstawianie fotki do iframe nie dziala na f.fox

Post autor: DeaDriam »

rafalkoszalin pisze: Dlaczego to nie dziala na firefoxa a na IE dziala??
pokaż strone i jaka wersja Twojego FF..
_____________________________________________________
Nie badz pijawka-znalazles rozwiazanie problemu..podziel sie na forum!
----------------------------------------------------------------------------
SmacznY WordpresS>> http://www.przepisyzgarnka.pl <<
rafalkoszalin
Posty: 2
Rejestracja: 18 wrz 2011, 16:29:35
Płeć: Niewybrana
User Agent: Firefox Windows 1024x768

Re: edytor tekstu wstawianie fotki do iframe nie dziala na f.fox

Post autor: rafalkoszalin »

FF 6.0.2
jaka stronke mam pokaza?
ODPOWIEDZ