Welcome Guest [Log In] [Register]
This board has been archived and is no longer accepting new questions. If you have a support question for your ZetaBoard, please visit us at the new support board. Registration is free and easy.


Visit the NEW ZetaBoards Support forum!

Username:   Password:
Add Reply
Jquery Help - Text Changing
Topic Started: May 4 2008, 10:09 AM (470 Views)
destiny235
Member
[ * ]
Hey i got this code what it does is it changes text to another text. example it would change inbox 0 to 1 Letter except i only know how to do javascript. Dont have a clue about anything to do with Jquery i was wondering if you would know how to make the code in Jquery. This is the code in javascript :
Code:
 
<SCRIPT LANGUAGE="JavaScript">
function change(text1,text2) {
var range = document.body.createTextRange();
range.collapse(true);
while (range.findText(text1)) {
range.text=text2;
range.collapse(false);
}}

change("Fast Reply","Reply Box");
//0
change("Inbox 0","No New Howlers");
//1
change("Inbox 1","1 New Howler");
//2
change("Inbox 2","2 New Howlers!");
//3
change("Inbox 3","3 New Howlers!");
//4
change("Inbox 4","4 New Howlers!");
//5
change("Inbox 5","5 New Howlers!");
//6
change("Inbox 6","6 New Howlers!");
//7
change("Inbox 7","7 New Howlers!");
//8
change("Inbox 8","8 New Howlers!");
//9
change("Inbox 9","9 New Howlers!")
//10
change("Inbox 10","10 New Howlers!");
//11
change("Inbox 11","11 New Howlers!");
//12
change("Inbox 12","12 New Howlers!");
//13
change("Inbox 13","13 New Howlers!");
//14
change("Inbox 14","14 New Howlers!");
//15
change("Inbox 15","15 New Howlers!");
//16
change("Inbox 16","16 New Howlers!");
//17
change("Inbox 17","17 New Howlers!");
//18
change("Inbox 18","18 New Howlers!");
//19
change("Inbox 19","19 New Howlers!");
//20
change("0 Guests","0 Muggles");
//0
change("1 Guest","1 Muggle");
//1
change("2 Guests","2 Muggles");
//2
change("3 Guests","3 Muggles");
//3
change("4 Guests","4 Muggles");
//4
change("5 Guests","5 Muggles");
//5
change("6 Guests","6 Muggles");
//6
change("7 Guests","7 Muggles");
//7
change("8 Guests","8 Muggles");
//8
change("9 Guests","9 Muggles");
//9
change("10 Guests","10 Muggles");
//10
change("10 Guests","10 Muggles");
//10
change("0 Members","0 Wizards");
//0
change("1 Member","1 Wizard");
//1
change("2 Members","2 Wizards");
//2
change("3 Members","3 Wizards");
//3
change("4 Members","4 Wizards");
//4
change("5 Members","5 Wizards");
//5
change("6 Members","6 Wizards");
//6
change("7 Members","7 Wizards");
//7
change("8 Members","8 Wizards");
//8
change("9 Members","9 Wizards");
//9
change("10 Members","10 Wizards");
//10
change("0 anonymous","0 Ghosts");
//0
change("1 anonymous","1 Ghost");
//1
change("2 anonymous","2 Ghosts");
//2
change("3 anonymous","3 Ghosts");
//3
change("4 anonymous","4 Ghosts");
//4
change("5 anonymous","5 Ghosts");
//5
change("6 anonymous","6 Ghosts");
//6
change("7 anonymous","7 Ghosts");
//7
change("8 anonymous","8 Ghosts");
//8
change("9 anonymous","9 Ghosts");
//9
change("10 anonymous","10 Ghosts");
//10

change("My Controls","Wizardry Control Panel");
change("Compose Message","Send Howlers");
change("Inbox","Owlery");
change("Address Book","Friends list");
change("Read Messages","Read Howlers");
change("Unread Messages","Unread Howlers");
change("Overall Top 10 Posters","Most Powerful Witch/wizard's");
change("member","wizard/witch");
</script>

HP PM MODIFIER V2. BY : By Justin (Ebk forever/Atra Mortis) : <a href="http://z3.invisionfree.com/The_Final_Hour/index.php?">The Final Hour</a>
Offline Profile Quote Post Goto Top
 
jediman (S)
Member Avatar
Hmmmm......
[ *  *  * ]
This is for IF.
I am intrested in making a code that would change things too though. Do not know how, but it would be intresting.
Offline Profile Quote Post Goto Top
 
destiny235
Member
[ * ]
I dont see the point of Jquery it is so much more complicated, im awesome at javascript
Edited by destiny235, May 4 2008, 06:07 PM.
Offline Profile Quote Post Goto Top
 
jediman (S)
Member Avatar
Hmmmm......
[ *  *  * ]
Jquery, is much better, and I see it as easier.
Offline Profile Quote Post Goto Top
 
Chris
Member Avatar
Member
[ *  *  *  * ]
You really shouldn't use something like that even for Invisionfree. I think that function was developed in the Microsoft Browser (IE) and is not even valid. It doesn't work (or atleast it shouldn't) in any other browser than IE, and I cant find any reference to it on the W3 (WWW) tutorials website. That page contains all valid / official functions for Javascript. That one is not even listed and then marked as deprecated (or no longer valid).

I'm sure there is a valid function somewhere that would suffice. Anyhow, it would not work for the Inbox because the source looks like this:

Code: HTML
 
<a href='...'><img src='...' /> Inbox <strong>#</strong></a>
Edited by Chris, May 5 2008, 04:35 PM.
Offline Profile Quote Post Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
« Previous Topic · Coding & Modifications · Next Topic »
Add Reply