EQ2Interface.com
Search Downloads


Go Back   EQ2Interface > Site Forums > Site Help & Suggestions

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4  
Old 04-03-2005, 03:59 AM
taco-man's Avatar
taco-man taco-man is offline
EQ2MAP Updater Author
This person is a EQ2Map developer.
Interface Author - Click to view interfaces
 
Join Date: Nov 2004
Server: Antonia Bayle
Posts: 1,349
Default

i know this much, mozilla is "retarded" when it comes to dealing with text. compare...
the scripting it takes to do the button for IE:
Code:
		if (text.substring(0, vbcode.length + 2 ) == "[" + vbcode + "]" && text.substring(text.length - vbcode.length - 3, text.length) == "[/" + vbcode + "]")
		{
			AddTxt = text.substring(vbcode.length + 2, text.length - vbcode.length - 3);
		}
		else
		{
			AddTxt = "[" + vbcode + optioncompiled + "]" + text + "[/" + vbcode + "]";
		}
		AddText(AddTxt);
the scripting it takes to do the button for Mozilla:
Code:
		var start_selection = theform.message.selectionStart;
		var end_selection = theform.message.selectionEnd;

		// fetch everything from start of text area to selection start
		var start = (theform.message.value).substring(0, start_selection);
		// fetch everything from start of selection to end of selection
		var middle = (theform.message.value).substring(start_selection, end_selection);
		// fetch everything from end of selection to end of text area
		var end = (theform.message.value).substring(end_selection, theform.message.textLength);

		if (middle.substring(0, vbcode.length + 2 ) == "[" + vbcode + "]" && middle.substring(middle.length - vbcode.length - 3, middle.length) == "[/" + vbcode + "]")
		{
			middle = middle.substring(vbcode.length + 2, middle.length - vbcode.length - 3);
		}
		else
		{
			middle = "[" + vbcode + optioncompiled + "]" + middle + "[/" + vbcode + "]";
		}

		theform.message.value = start + middle + end;
		setfocus();
		theform.message.selectionStart = end_selection + middle.length;
		theform.message.selectionEnd = start_selection + middle.length;
		return false;
__________________
EQ2MAP Updater Download
EQ2MAP Website
How to Install a custom interface
Reply With Quote
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 02:40 PM.


Our Network
EQInterface | EQ2Interface | WoWInterface | LoTROInterface | ESOUI | MMOUI