Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

darwin23

macrumors newbie
Original poster
Oct 14, 2006
1
0
Hi there,

I have a problem with a web based html WYSIWYG Editor. this editor only works with IE and Mozilla browsers and i want to disable it when Safari users goes to my website

Into my phpscript, I call the editor with this code:

/*** Editor Script Wrapper ***/
var oScripts=document.getElementsByTagName("script");
var sEditorPath;
for(var i=0;i<oScripts.length;i++)
{
var sSrc=oScripts.src.toLowerCase();
if(sSrc.indexOf("scripts/myeditor.js")!=-1) sEditorPath=oScripts.src.replace(/myeditor.js/,"");
}



if(navigator.appName.indexOf('Microsoft')!=-1)

document.write("<scr"+"ipt src='"+sEditorPath+"editor.js'></scr"+"ipt>");

else

document.write("<scr"+"ipt src='"+sEditorPath+"moz/editor.js'></scr"+"ipt>");


How can I replace the editor with a text area when safari users visit this website? Is there any posibility to do it?

Thanks.

Excuse my english.
 

ddekker

macrumors regular
Sep 23, 2006
222
0
Michigan
wysiwyg

this must be possible, I found that wordpress has a editor in it, but it doesn't show up in Safari... I didn't even know it was there until I saw firefox running it, so I fired a PC and its there too... just not on Safari... come on apple... get with it..

DD
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.