xbl1 Posted December 28, 2006 Share Posted December 28, 2006 Hello; i got a bbcode, and i want to it whether it can be compatibility with firefox, mozilla, netscape navigator, please, and i has not of them. Would anyone help me to test it, please. Just see it can work on them or not.test.html<html><head><script language="Javascript">var isMozilla = (navigator.userAgent.toLowerCase().indexOf('gecko')!=-1) ? true : false;var regexp = new RegExp("[\r]","gi");function storeCaret(selec){ if (isMozilla) { // Si on est sur Mozilla oField = document.forms['news'].elements['newst']; objectValue = oField.value; deb = oField.selectionStart; fin = oField.selectionEnd; objectValueDeb = objectValue.substring( 0 , oField.selectionStart ); objectValueFin = objectValue.substring( oField.selectionEnd , oField.textLength ); objectSelected = objectValue.substring( oField.selectionStart ,oField.selectionEnd ); // alert("Debut:'"+objectValueDeb+"' ("+deb+")\nFin:'"+objectValueFin+"' ("+fin+")\n\nSelectionné:'"+objectSelected+"'("+(fin-deb)+")"); oField.value = objectValueDeb + "[" + selec + "]" + objectSelected + "[/" + selec + "]" + objectValueFin; oField.selectionStart = strlen(objectValueDeb); oField.selectionEnd = strlen(objectValueDeb + "[" + selec + "]" + objectSelected + "[/" + selec + "]"); oField.focus(); oField.setSelectionRange( objectValueDeb.length + selec.length + 2, objectValueDeb.length + selec.length + 2); } else { // Si on est sur IE oField = document.forms['news'].elements['newst']; var str = document.selection.createRange().text; if (str.length>0) { // Si on a selectionné du texte var sel = document.selection.createRange(); sel.text = "[" + selec + "]" + str + "[/" + selec + "]"; sel.collapse(); sel.select(); } else { oField.focus(oField.caretPos); // alert(oField.caretPos+"\n"+oField.value.length+"\n") oField.focus(oField.value.length); oField.caretPos = document.selection.createRange().duplicate(); var bidon = "%~%"; var orig = oField.value; oField.caretPos.text = bidon; var i = oField.value.search(bidon); oField.value = orig.substr(0,i) + "[" + selec + "][/" + selec + "]" + orig.substr(i, oField.value.length); var r = 0; for(n = 0; n < i; n++) {if(regexp.test(oField.value.substr(n,2)) == true){r++;}}; pos = i + 2 + selec.length - r; //placer(document.forms['news'].elements['newst'], pos); var r = oField.createTextRange(); r.moveStart('character', pos); r.collapse(); r.select(); } }}</script></head><body><center><form name="news"><input type="button" value="b" style="width:50px;font-weight:bold" onclick="storeCaret('b')"><input type="button" value="i" style="width:50px;font-style:italic" onclick="storeCaret('i')"><input type="button" value="u" style="width:50px;text-decoration:underline" onclick="storeCaret('u')"><input type="button" value="quote"style="width:50px" onclick="storeCaret('quote')"><input type="button" value="code"style="width:50px" onclick="storeCaret('code')"><input type="button" value="url"style="width:50px" onclick="storeCaret('url')"><input type="button" value="img"style="width:50px" onclick="storeCaret('img')"><br><textarea name="newst" id="newst" rows="10" wrap="virtual" cols="45"></textarea></form></center></body></html> Link to comment Share on other sites More sharing options...
ATM Posted December 29, 2006 Share Posted December 29, 2006 It would be a good idea to download them, It's not like they are extreamly large downloads and Personally I think FireFox is a really good browser. Link to comment Share on other sites More sharing options...
xbl1 Posted December 30, 2006 Author Share Posted December 30, 2006 It would be a good idea to download them, It's not like they are extreamly large downloads and Personally I think FireFox is a really good browser.If one computer have 4 different browser, do they affect each other perfomance? Link to comment Share on other sites More sharing options...
Webworldx Posted December 30, 2006 Share Posted December 30, 2006 It's like installing 4 separate applications, they won't have any effect on each other. Link to comment Share on other sites More sharing options...
PrateekSaxena Posted December 30, 2006 Share Posted December 30, 2006 Well they ARE allowed to import Favrourites or Bookmarks from each other arent they? Link to comment Share on other sites More sharing options...
xbl1 Posted December 30, 2006 Author Share Posted December 30, 2006 It's like installing 4 separate applications, they won't have any effect on each other.Thanks Webworldx. Link to comment Share on other sites More sharing options...
Sniffy Posted December 30, 2006 Share Posted December 30, 2006 Well they ARE allowed to import Favrourites or Bookmarks from each other arent they?I don't think they import from eachother, your favorites is probably stored somewhere inside the computer and the browsers extract from that. Link to comment Share on other sites More sharing options...
Webworldx Posted December 30, 2006 Share Posted December 30, 2006 Prateek, you can choose not to import your favorites from IE in the firefox setup process - i'm sure it's the same with other browsers. Link to comment Share on other sites More sharing options...
xbl1 Posted December 31, 2006 Author Share Posted December 31, 2006 Well they ARE allowed to import Favrourites or Bookmarks from each other arent they?Yes, they can import these thing each other, i just downloaded them, and they asked me whether i want to import by popping up a window. Link to comment Share on other sites More sharing options...
xbl1 Posted December 31, 2006 Author Share Posted December 31, 2006 Prateek, you can choose not to import your favorites from IE in the firefox setup process - i'm sure it's the same with other browsers.Hi Webworldx;At the movement, i got 3 browers in my computer. If i use the FireFox most of time, and i add some more links to bookmark later on. Then in this case, how i can import the bookmark from the FireFox to IE and the NetScape? Do you known how to do that? Link to comment Share on other sites More sharing options...
Webworldx Posted January 1, 2007 Share Posted January 1, 2007 Use Bookmarks Manager in FireFox (Bookmarks >> Organise), and export it. Then use File >> Import / Export in IE to get them in. Link to comment Share on other sites More sharing options...
PrateekSaxena Posted January 1, 2007 Share Posted January 1, 2007 Thnx Link to comment Share on other sites More sharing options...
xbl1 Posted January 2, 2007 Author Share Posted January 2, 2007 Use Bookmarks Manager in FireFox (Bookmarks >> Organise), and export it. Then use File >> Import / Export in IE to get them in.Thanks a lot Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now