![]() |
hello
i have this java script: [code] <SCRIPT LANGUAGE = "VBScript"> Const KeyColor = "#0021E6" Const REMColor = "#008000" Dim oWindow,oDocument,oSelect,oSelectRange,key,grep Set oWindow = window.external.menuArguments Set oSource = oWindow.event.srcElement Set oDocument = oWindow.document Set oSelect = oDocument.selection Set oSelectRange = oSelect.createRange() 'KeyWords, Add more keywords if You Want ! KeyWords="Access,Alias,And,Append,As,Binary,Boolea n,ByRef,Byte,ByVal,Circle,Close,Const,Currency,Dat e,Decimal,Declare,Dim,Do,Double,Each,Else,ElseIf,E mpty,End,Enum,Erase,Error,Event,Exit,False,For,Fun ction,Get,Global,GoTo,If,In,Input,Integer,Let,Lib, Line,Lock,Long,Loop,Mod,New,Next,Not,Null,Object,O n,Open,Or,Output,Preserve,Private,Property,Public, ReDim,Resume,Set,Shared,Single,String,Sub,Then,To, True,Type,Until,Variant,Wend,While,WithEvents,Writ e,Xor" key = Split(KeyWords, ",") Set grep = New regexp If oSource.tagName = "TEXTAREA" Then oSelectRange.text = " Code:
" & GetColoredCode(oSelectRange.text) & "[ /code]" now i wsant to use this in my forums,, how and where should i add this?? thanx |
i dont exactly understand what you want to do but u can use javascript just like u would use it in html
|
I took a look at your code. Correct me if I'm wrong, this code searchs for things between the tag code in brackets right? If so you would only have to put it in your showthread template.
Be aware that since your using Client Side vbScript and not Javascript that as far as I know your code will only work in Internet Explorer. |
All times are GMT. The time now is 07:05 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|