Avatar billede thb Nybegynder
20. maj 2003 - 20:26 Der er 11 kommentarer og
2 løsninger

At lave egen html

Hej alle

Jeg er igang med at lave en side hvor man kan oprette forskellige tekster, jeg vil gerne kunne styre deres html brug, og indtil videre har jeg lavet så man kan lave bold, italic, underline, og jeg har lavet så man kan sætte sin tekst ind i en kasse.

Jeg har lavet det sådan at folk kan skrive Her er en bold tekst

Jeg kunne nu godt tænke mig at man kunne sætte billeder ind. Min tanke var noget med [img fil="en eller andet fil.gif"] men jeg ved ikke hvordan jeg får fil parameteret ind i en rigtig html kode...

Håber at i forstår og at i kan hjælpe mig..

Thomas
Avatar billede roenving Novice
20. maj 2003 - 20:30 #1
I html-kode hedder det <img src="en_eller_ande_fil.gif"> -- men du vil vel også have en fil-åbningsdialog ?-)

der er jeg ikke så god, men phoenixv har lavet noget flot, som du måske kan få inspiration fra:

http://www.phoenixv.dk/wysiwyg/wysiwyg.html
Avatar billede thb Nybegynder
20. maj 2003 - 20:35 #2
Det er meningen af folk skal kunne skrive:

Hej med jer.
Her er jeg: [img fil="www.enside.dk/mitbilled.gif"]

og så skal teksten kommer frem med et billed...

Thomas
Avatar billede thb Nybegynder
20. maj 2003 - 23:00 #3
Er der slet ikke nogle der har en ide til hvordan det kan gøres..

Thomas
Avatar billede mcgreed Nybegynder
21. maj 2003 - 00:45 #4
Jeg har leget med dette og har lavet denne ting som jeg bruge til mine sites. Det jeg paster nu er blot noget jeg har hurtigt rippede ud af en af mine sider, det skulle være til at få til at virke :)
Grundlæggende så er der 2 asp functioner, en til at convert AHL (det alternative html sprog) til HTML, som du bruger sådan Response.Write AHL2HTML(whichText)m og en til at strippe AHL til ren tekst. Skulle være selvforklarende, kik på det og se om du kan bruge det, vær dog opmærksom på at jeg blot har pastede ASP koden ind i html siden, så den er der, den bliver ikke brugt til selve siden):
------------------------------------------------------

<%
    ' #####################################################################
    ' ## ASP file made by Anders K. Nielsen, McGreed@hotmail.com.        #
    ' ## Copyright 2000-2004, NightStorm Web Design, All rights reserved. #
    ' #####################################################################

    ' #### BEGIN #################################################
    ' ## Convert "Alternativ-Homepage-Programming"-text To HTML ##
    ' ############################################################
    Function AHL2HTML(whichText)
        ' ####################################################
        ' ## whichText = The text which should be converted ##
        ' ####################################################
        Func_Temp_Text=whichText&""
        Func_Temp_Text=Server.HTMLEncode(Func_Temp_Text)
        Func_Temp_Text=Replace(Func_Temp_Text,vbCrLf,"<BR>",1,-1,1)
        Func_Temp_Text=Replace(Func_Temp_Text,"","<B>",1,-1,1)
        Func_Temp_Text=Replace(Func_Temp_Text,"
","</B>",1,-1,1)
        Func_Temp_Text=Replace(Func_Temp_Text,"","<U>",1,-1,1)
        Func_Temp_Text=Replace(Func_Temp_Text,"
","</U>",1,-1,1)
        Func_Temp_Text=Replace(Func_Temp_Text,"","<I>",1,-1,1)
        Func_Temp_Text=Replace(Func_Temp_Text,"
","</I>",1,-1,1)
        Func_Temp_Text=Replace(Func_Temp_Text,"[quot]","<DIV CLASS=""Quot"">",1,-1,1)
        Func_Temp_Text=Replace(Func_Temp_Text,"[/quot]","</DIV>",1,-1,1)
        Func_Temp_Text=Replace(Func_Temp_Text,"[br]","<BR>"&vbCrLf,1,-1,1)
        Func_Temp_Text=Replace(Func_Temp_Text,"[strike]","<STRIKE>",1,-1,1)
        Func_Temp_Text=Replace(Func_Temp_Text,"[/strike]","</STRIKE>",1,-1,1)
        Func_Temp_Text=Replace(Func_Temp_Text,"[sup]","<SUP>",1,-1,1)
        Func_Temp_Text=Replace(Func_Temp_Text,"[/sup]","</SUP>",1,-1,1)
        Func_Temp_Text=Replace(Func_Temp_Text,"[sub]","<SUB>",1,-1,1)
        Func_Temp_Text=Replace(Func_Temp_Text,"[/sub]","</SUB>",1,-1,1)
        Func_Temp_Text=Replace(Func_Temp_Text,"[left]","<DIV STYLE=""text-align:left;"">",1,-1,1)
        Func_Temp_Text=Replace(Func_Temp_Text,"[/left]","</DIV>",1,-1,1)
        Func_Temp_Text=Replace(Func_Temp_Text,"[right]","<DIV STYLE=""text-align:right;"">",1,-1,1)
        Func_Temp_Text=Replace(Func_Temp_Text,"[/right]","</DIV>",1,-1,1)
        Func_Temp_Text=Replace(Func_Temp_Text,"
","<DIV STYLE=""text-align:center;"">",1,-1,1)
        Func_Temp_Text=Replace(Func_Temp_Text,"
","</DIV>",1,-1,1)
        Func_Temp_Text=Replace(Func_Temp_Text,"[justify]","<DIV STYLE=""text-align:justify;"">",1,-1,1)
        Func_Temp_Text=Replace(Func_Temp_Text,"[/justify]","</DIV>",1,-1,1)
        Func_Temp_Text=Replace(Func_Temp_Text,"","<FONT SIZE=""1"">",1,-1,1)
        Func_Temp_Text=Replace(Func_Temp_Text,"[size=2]","<FONT SIZE=""2"">",1,-1,1)
        Func_Temp_Text=Replace(Func_Temp_Text,"[size=3]","<FONT SIZE=""3"">",1,-1,1)
        Func_Temp_Text=Replace(Func_Temp_Text,"[size=4]","<FONT SIZE=""4"">",1,-1,1)
        Func_Temp_Text=Replace(Func_Temp_Text,"[size=5]","<FONT SIZE=""5"">",1,-1,1)
        Func_Temp_Text=Replace(Func_Temp_Text,"[size=6]","<FONT SIZE=""6"">",1,-1,1)
        Func_Temp_Text=Replace(Func_Temp_Text,"[size=7]","<FONT SIZE=""7"">",1,-1,1)
        Func_Temp_Text=Replace(Func_Temp_Text,"
","</FONT>",1,-1,1)
        Func_Temp_Text=Replace(Func_Temp_Text,"[H1]","<H1>",1,-1,1)
        Func_Temp_Text=Replace(Func_Temp_Text,"[/H1]","</H1>",1,-1,1)
        Func_Temp_Text=Replace(Func_Temp_Text,"[H2]","<H2>",1,-1,1)
        Func_Temp_Text=Replace(Func_Temp_Text,"[/H2]","</H2>",1,-1,1)
        Func_Temp_Text=Replace(Func_Temp_Text,"[H3]","<H3>",1,-1,1)
        Func_Temp_Text=Replace(Func_Temp_Text,"[/H3]","</H3>",1,-1,1)
        Func_Temp_Text=Replace(Func_Temp_Text,"[H4]","<H4>",1,-1,1)
        Func_Temp_Text=Replace(Func_Temp_Text,"[/H4]","</H4>",1,-1,1)
        Func_Temp_Text=Replace(Func_Temp_Text,"[H5]","<H5>",1,-1,1)
        Func_Temp_Text=Replace(Func_Temp_Text,"[/H5]","</H5>",1,-1,1)
        Func_Temp_Text=Replace(Func_Temp_Text,"[H6]","<H6>",1,-1,1)
        Func_Temp_Text=Replace(Func_Temp_Text,"[/H6]","</H6>",1,-1,1)
        Func_Temp_Text=Replace(Func_Temp_Text,"[:)]","<IMG SRC=""Images/Smily_Smile.gif"" ALT=""Happy Smile"" WIDTH=""15"" HEIGHT=""15"" ALIGN=""absmiddle"">",1,-1,1)
        Func_Temp_Text=Replace(Func_Temp_Text,"[:D]","<IMG SRC=""Images/Smily_BigGrin.gif"" ALT=""Big Grin"" WIDTH=""15"" HEIGHT=""15"" ALIGN=""absmiddle"">",1,-1,1)
        Func_Temp_Text=Replace(Func_Temp_Text,"[:(]","<IMG SRC=""Images/Smily_Frown.gif"" ALT=""Frown"" WIDTH=""15"" HEIGHT=""15"" ALIGN=""absmiddle"">",1,-1,1)
        Func_Temp_Text=Replace(Func_Temp_Text,"[:o]","<IMG SRC=""Images/Smily_Eek.gif"" ALT=""Eek"" WIDTH=""15"" HEIGHT=""15"" ALIGN=""absmiddle"">",1,-1,1)
        Func_Temp_Text=Replace(Func_Temp_Text,"[:-?]","<IMG SRC=""Images/Smily_Confused.gif"" ALT=""Confused"" WIDTH=""15"" HEIGHT=""15"" ALIGN=""absmiddle"">",1,-1,1)
        Func_Temp_Text=Replace(Func_Temp_Text,"[:?]","<IMG SRC=""Images/Smily_Confused.gif"" ALT=""Confused"" WIDTH=""15"" HEIGHT=""15"" ALIGN=""absmiddle"">",1,-1,1)
        Func_Temp_Text=Replace(Func_Temp_Text,"[8)]","<IMG SRC=""Images/Smily_Cool.gif"" ALT=""Cool Smily"" WIDTH=""15"" HEIGHT=""15"" ALIGN=""absmiddle"">",1,-1,1)
        Func_Temp_Text=Replace(Func_Temp_Text,"[lol]","<IMG SRC=""Images/Smily_LOL.gif"" ALT=""Laughing Out Loud"" WIDTH=""15"" HEIGHT=""15"" ALIGN=""absmiddle"">",1,-1,1)
        Func_Temp_Text=Replace(Func_Temp_Text,"[:x]","<IMG SRC=""Images/Smily_Mad.gif"" ALT=""Mad Smily"" WIDTH=""15"" HEIGHT=""15"" ALIGN=""absmiddle"">",1,-1,1)       
        Func_Temp_Text=Replace(Func_Temp_Text,"[oops]","<IMG SRC=""Images/Smily_Redface.gif"" ALT=""Red Face Smily"" WIDTH=""15"" HEIGHT=""15"" ALIGN=""absmiddle"">",1,-1,1)
        Func_Temp_Text=Replace(Func_Temp_Text,"[cry]","<IMG SRC=""Images/Smily_Cry.gif"" ALT=""Crying Smily"" WIDTH=""15"" HEIGHT=""15"" ALIGN=""absmiddle"">",1,-1,1)
        Func_Temp_Text=Replace(Func_Temp_Text,"[evil]","<IMG SRC=""Images/Smily_Evil.gif"" ALT=""Wicked Smily"" WIDTH=""15"" HEIGHT=""15"" ALIGN=""absmiddle"">",1,-1,1)
        Func_Temp_Text=Replace(Func_Temp_Text,"[::)]","<IMG SRC=""Images/Smily_RollEyes.gif"" ALT=""Rolling Eyes"" WIDTH=""15"" HEIGHT=""15"" ALIGN=""absmiddle"">",1,-1,1)
        Func_Temp_Text=Replace(Func_Temp_Text,"[;)]","<IMG SRC=""Images/Smily_Wink.gif"" ALT=""Wink"" WIDTH=""15"" HEIGHT=""15"" ALIGN=""absmiddle"">",1,-1,1)
        Func_Temp_Text=Replace(Func_Temp_Text,"[wink]","<IMG SRC=""Images/Smily_Wink.gif"" ALT=""Wink"" WIDTH=""15"" HEIGHT=""15"" ALIGN=""absmiddle"">",1,-1,1)
        Func_Temp_Text=Replace(Func_Temp_Text,"[¤]","<IMG SRC=""Images/Smily_Sniper.gif"" ALT=""Sniper"" WIDTH=""75"" HEIGHT=""26"" ALIGN=""absmiddle"">",1,-1,1)
        Func_Temp_Text=Replace(Func_Temp_Text,"[&#164;]","<IMG SRC=""Images/Smily_Sniper.gif"" ALT=""Sniper"" WIDTH=""75"" HEIGHT=""26"" BORDER=""0""  ALIGN=""middle"">",1,-1,1)

        ' BEGIN - Check for color codes, defined like this:  text
        LoopCount=0
        BeginAtChar=1
        Do While InStr(BeginAtChar,Func_Temp_Text,"[color=#",1) AND LoopCount<Int(Len(Func_Temp_Text)/8)
            BeginTag=InStr(BeginAtChar,Func_Temp_Text,"[color=#",1)
            EndTag=InStr(BeginTag+1,Func_Temp_Text,"]",1)
            TagColor=Mid(Func_Temp_Text,BeginTag+8,6)
            If ConfirmHex(TagColor)=true Then
                Temp_Text=Left(Func_Temp_Text,BeginTag-1)&"<FONT COLOR=""#"&TagColor&""">"&Right(Func_Temp_Text,Len(Func_Temp_Text)-EndTag)
                Func_Temp_Text=Temp_Text
            else
                BeginAtChar=EndTag
            end if
            LoopCount=LoopCount+1
        loop
        Func_Temp_Text=Replace(Func_Temp_Text,"[/color]","</FONT>",1,-1,1)
        ' END - Check for color codes, defined like this:  text
   
        ' BEGIN - Find image codes, defined like this:  [IMAGE=http://www.url.com/test.gif]
        LoopCount=0
        BeginAtChar=1
        Func_Temp_Text=Replace(Func_Temp_Text,"[IMAGE=]","*Forkert Image Kode*")
        Do While InStr(BeginAtChar,Func_Temp_Text,"[IMAGE=",1) AND LoopCount<Int(Len(Func_Temp_Text)/8)
            BeginTag=InStr(BeginAtChar,Func_Temp_Text,"[IMAGE=",1)
            EndTag=InStr(BeginTag+1,Func_Temp_Text,"]",1)
            If EndTag-7>BeginTag Then
                TagURL=Mid(Func_Temp_Text,BeginTag+7,EndTag-BeginTag-7)
                Func_Temp_Text=Replace(Func_Temp_Text,"[IMAGE="&TagURL&"]","<IMG SRC="""&TagURL&""">")
            end if
            BeginAtChar=BeginTag
            LoopCount=LoopCount+1
        loop
        ' END - Find image codes, defined like this:  [IMAGE=http://www.url.com/test.gif]

        ' BEGIN - Find URL codes, defined like this:  [URL=http://www.url.com/]linkname[/URL]
        LoopCount=0
        BeginAtChar=1
        Func_Temp_Text=Replace(Func_Temp_Text,"[URL=]","*Error Image Code*")
        Do While InStr(BeginAtChar,Func_Temp_Text,"[URL=",1) AND LoopCount<Int(Len(Func_Temp_Text)/5)
            BeginTag=InStr(BeginAtChar,Func_Temp_Text,"[URL=",1)
            EndTag=InStr(BeginTag+1,Func_Temp_Text,"]",1)
            If EndTag=0 Then EndTag=BeginTag+5 end if
            TagURL=Mid(Func_Temp_Text,BeginTag+5,(EndTag-BeginTag-5))
            Temp_Text=Left(Func_Temp_Text,BeginTag-1)&"<A HREF="""&TagURL&""" CLASS=""AHLLink"">"&Right(Func_Temp_Text,Len(Func_Temp_Text)-EndTag)
            Func_Temp_Text=Temp_Text
            LoopCount=LoopCount+1
        loop
        Func_Temp_Text=Replace(Func_Temp_Text,"[/URL]","</A>",1,-1,1)
        ' END - Find URL codes, defined like this:  [URL=http://www.url.com/]linkname[/URL]

        ' BEGIN - Find FONT codes, defined like this:  [FONT=Tahoma]text[/FONT]
        LoopCount=0
        BeginAtChar=1
        Func_Temp_Text=Replace(Func_Temp_Text,"[FONT=]","*Error Font*")
        Do While InStr(BeginAtChar,Func_Temp_Text,"[FONT=",1) AND LoopCount<Int(Len(Func_Temp_Text)/5)
            BeginTag=InStr(BeginAtChar,Func_Temp_Text,"[FONT=",1)
            EndTag=InStr(BeginTag+1,Func_Temp_Text,"]",1)
            If EndTag=0 Then EndTag=BeginTag+6 end if
            TagURL=Mid(Func_Temp_Text,BeginTag+6,(EndTag-BeginTag-6))
            Temp_Text=Left(Func_Temp_Text,BeginTag-1)&"<FONT FACE="""&TagURL&""">"&Right(Func_Temp_Text,Len(Func_Temp_Text)-EndTag)
            Func_Temp_Text=Temp_Text
            LoopCount=LoopCount+1
        loop
        Func_Temp_Text=Replace(Func_Temp_Text,"[/FONT]","</FONT>",1,-1,1)
        ' END - Find FONT codes, definet like this:  [FONT=Tahoma]text[/FONT]

        AHL2HTML=Func_Temp_Text
    End Function
    ' ############################################################
    ' ## Convert "Alternativ-Homepage-Programming"-text To HTML ##
    ' #### END ###################################################

    ' #### BEGIN ################################################
    ' ## Remove all "Alternativ-Homepage-Programming" Contents ##
    ' ###########################################################
    Function RemoveAHL(whichText)
        ' ####################################################
        ' ## whichText = The text which should be converted ##
        ' ####################################################
        Func_Temp_Text=whichText&""
        Func_Temp_Text=Server.HTMLEncode(Func_Temp_Text)
        Func_Temp_Text=Replace(Func_Temp_Text,"[B]","",1,-1,1)
        Func_Temp_Text=Replace(Func_Temp_Text,"[/B]","",1,-1,1)
        Func_Temp_Text=Replace(Func_Temp_Text,"[U]","",1,-1,1)
        Func_Temp_Text=Replace(Func_Temp_Text,"[/U]","",1,-1,1)
        Func_Temp_Text=Replace(Func_Temp_Text,"[I]","",1,-1,1)
        Func_Temp_Text=Replace(Func_Temp_Text,"[/I]","",1,-1,1)
        Func_Temp_Text=Replace(Func_Temp_Text,"[quot]","",1,-1,1)
        Func_Temp_Text=Replace(Func_Temp_Text,"[/quot]","",1,-1,1)
        Func_Temp_Text=Replace(Func_Temp_Text,"[br]","",1,-1,1)
        Func_Temp_Text=Replace(Func_Temp_Text,"[strike]","",1,-1,1)
        Func_Temp_Text=Replace(Func_Temp_Text,"[/strike]","",1,-1,1)
        Func_Temp_Text=Replace(Func_Temp_Text,"[sup]","",1,-1,1)
        Func_Temp_Text=Replace(Func_Temp_Text,"[/sup]","",1,-1,1)
        Func_Temp_Text=Replace(Func_Temp_Text,"[sub]","",1,-1,1)
        Func_Temp_Text=Replace(Func_Temp_Text,"[/sub]","",1,-1,1)
        Func_Temp_Text=Replace(Func_Temp_Text,"[left]","",1,-1,1)
        Func_Temp_Text=Replace(Func_Temp_Text,"[/left]","",1,-1,1)
        Func_Temp_Text=Replace(Func_Temp_Text,"[right]","",1,-1,1)
        Func_Temp_Text=Replace(Func_Temp_Text,"[/right]","",1,-1,1)
        Func_Temp_Text=Replace(Func_Temp_Text,"
","",1,-1,1)
        Func_Temp_Text=Replace(Func_Temp_Text,"
","",1,-1,1)
        Func_Temp_Text=Replace(Func_Temp_Text,"[justify]","",1,-1,1)
        Func_Temp_Text=Replace(Func_Temp_Text,"[/justify]","",1,-1,1)
        Func_Temp_Text=Replace(Func_Temp_Text,"","",1,-1,1)
        Func_Temp_Text=Replace(Func_Temp_Text,"[font=Arial Black]","",1,-1,1)
        Func_Temp_Text=Replace(Func_Temp_Text,"[font=Comic Sans MS]","",1,-1,1)
        Func_Temp_Text=Replace(Func_Temp_Text,"[font=Courier]","",1,-1,1)
        Func_Temp_Text=Replace(Func_Temp_Text,"[font=Courier New]","",1,-1,1)
        Func_Temp_Text=Replace(Func_Temp_Text,"[font=Fixedsys]","",1,-1,1)
        Func_Temp_Text=Replace(Func_Temp_Text,"[font=Impact]","",1,-1,1)
        Func_Temp_Text=Replace(Func_Temp_Text,"[font=Lucida Console]","",1,-1,1)
        Func_Temp_Text=Replace(Func_Temp_Text,"[font=Marlett]","",1,-1,1)
        Func_Temp_Text=Replace(Func_Temp_Text,"[font=Modern]","",1,-1,1)
        Func_Temp_Text=Replace(Func_Temp_Text,"[font=MS Sans Serif]","",1,-1,1)
        Func_Temp_Text=Replace(Func_Temp_Text,"[font=MS Serif]","",1,-1,1)
        Func_Temp_Text=Replace(Func_Temp_Text,"[font=Small Fonts]","",1,-1,1)
        Func_Temp_Text=Replace(Func_Temp_Text,"[font=Symbol]","",1,-1,1)
        Func_Temp_Text=Replace(Func_Temp_Text,"[font=System]","",1,-1,1)
        Func_Temp_Text=Replace(Func_Temp_Text,"[font=Tahoma]","",1,-1,1)
        Func_Temp_Text=Replace(Func_Temp_Text,"[font=Terminal]","",1,-1,1)
        Func_Temp_Text=Replace(Func_Temp_Text,"[font=Times New Roman]","",1,-1,1)
        Func_Temp_Text=Replace(Func_Temp_Text,"[font=Verdana]","",1,-1,1)
        Func_Temp_Text=Replace(Func_Temp_Text,"[font=Webdings]","",1,-1,1)
        Func_Temp_Text=Replace(Func_Temp_Text,"[font=Wingdings]","",1,-1,1)
        Func_Temp_Text=Replace(Func_Temp_Text,"
","",1,-1,1)
        Func_Temp_Text=Replace(Func_Temp_Text,"","",1,-1,1)
        Func_Temp_Text=Replace(Func_Temp_Text,"[size=2]","",1,-1,1)
        Func_Temp_Text=Replace(Func_Temp_Text,"[size=3]","",1,-1,1)
        Func_Temp_Text=Replace(Func_Temp_Text,"[size=4]","",1,-1,1)
        Func_Temp_Text=Replace(Func_Temp_Text,"[size=5]","",1,-1,1)
        Func_Temp_Text=Replace(Func_Temp_Text,"[size=6]","",1,-1,1)
        Func_Temp_Text=Replace(Func_Temp_Text,"[size=7]","",1,-1,1)
        Func_Temp_Text=Replace(Func_Temp_Text,"
","",1,-1,1)
        Func_Temp_Text=Replace(Func_Temp_Text,"[H1]","",1,-1,1)
        Func_Temp_Text=Replace(Func_Temp_Text,"[/H1]","",1,-1,1)
        Func_Temp_Text=Replace(Func_Temp_Text,"[H2]","",1,-1,1)
        Func_Temp_Text=Replace(Func_Temp_Text,"[/H2]","",1,-1,1)
        Func_Temp_Text=Replace(Func_Temp_Text,"[H3]","",1,-1,1)
        Func_Temp_Text=Replace(Func_Temp_Text,"[/H3]","",1,-1,1)
        Func_Temp_Text=Replace(Func_Temp_Text,"[H4]","",1,-1,1)
        Func_Temp_Text=Replace(Func_Temp_Text,"[/H4]","",1,-1,1)
        Func_Temp_Text=Replace(Func_Temp_Text,"[H5]","",1,-1,1)
        Func_Temp_Text=Replace(Func_Temp_Text,"[/H5]","",1,-1,1)
        Func_Temp_Text=Replace(Func_Temp_Text,"[H6]","",1,-1,1)
        Func_Temp_Text=Replace(Func_Temp_Text,"[/H6]","",1,-1,1)

        ' BEGIN - Find color codes, definet like this:  text
        LoopCount=0
        BeginAtChar=1
        Do While InStr(BeginAtChar,Func_Temp_Text,"[color=#",1) AND LoopCount<Int(Len(Func_Temp_Text)/8)
            BeginTag=InStr(BeginAtChar,Func_Temp_Text,"[color=#",1)
            EndTag=InStr(BeginTag+1,Func_Temp_Text,"]",1)
            TagColor=Mid(Func_Temp_Text,BeginTag+8,6)
            If ConfirmHex(TagColor)=true Then
                Temp_Text=Left(Func_Temp_Text,BeginTag-1)&""&Right(Func_Temp_Text,Len(Func_Temp_Text)-EndTag)
                Func_Temp_Text=Temp_Text
            else
                BeginAtChar=EndTag
            end if
            LoopCount=LoopCount+1
        loop
        Func_Temp_Text=Replace(Func_Temp_Text,"[/color]","",1,-1,1)
        ' END - Find color codes, definet like this:  text

        ' BEGIN - Find image codes, definet like this:  [IMAGE=http://www.url.com/]
        LoopCount=0
        BeginAtChar=1
        Func_Temp_Text=Replace(Func_Temp_Text,"[IMAGE=]","")
        Do While InStr(BeginAtChar,Func_Temp_Text,"[IMAGE=",1) AND LoopCount<Int(Len(Func_Temp_Text)/8)
            BeginTag=InStr(BeginAtChar,Func_Temp_Text,"[IMAGE=",1)
            EndTag=InStr(BeginTag+1,Func_Temp_Text,"]",1)
            If EndTag-7>BeginTag Then
                TagURL=Mid(Func_Temp_Text,BeginTag+7,EndTag-BeginTag-7)
                Func_Temp_Text=Replace(Func_Temp_Text,"[IMAGE="&TagURL&"]","")
            end if
            BeginAtChar=BeginTag
            LoopCount=LoopCount+1
        loop
        ' END - Find color codes, definet like this:  text

        ' BEGIN - Find URL codes, definet like this:  [URL=http://www.url.com/]linkname[/URL]
        LoopCount=0
        BeginAtChar=1
        Func_Temp_Text=Replace(Func_Temp_Text,"[URL=]","")
        Do While InStr(BeginAtChar,Func_Temp_Text,"[URL=",1) AND LoopCount<Int(Len(Func_Temp_Text)/5)
            BeginTag=InStr(BeginAtChar,Func_Temp_Text,"[URL=",1)
            EndTag=InStr(BeginTag+1,Func_Temp_Text,"]",1)
            If EndTag=0 Then EndTag=BeginTag+5 end if
            TagURL=Mid(Func_Temp_Text,BeginTag+5,(EndTag-BeginTag-5))
            Temp_Text=Left(Func_Temp_Text,BeginTag-1)&Right(Func_Temp_Text,Len(Func_Temp_Text)-EndTag)
            Func_Temp_Text=Temp_Text
            LoopCount=LoopCount+1
        loop
        Func_Temp_Text=Replace(Func_Temp_Text,"[/URL]","",1,-1,1)
        ' END - Find URL codes, definet like this:  [URL=http://www.url.com/]linkname[/URL]

        ' BEGIN - Find FONT codes, defined like this:  [FONT=Tahoma]text[/FONT]
        LoopCount=0
        BeginAtChar=1
        Func_Temp_Text=Replace(Func_Temp_Text,"[FONT=]","")
        Do While InStr(BeginAtChar,Func_Temp_Text,"[FONT=",1) AND LoopCount<Int(Len(Func_Temp_Text)/5)
            BeginTag=InStr(BeginAtChar,Func_Temp_Text,"[FONT=",1)
            EndTag=InStr(BeginTag+1,Func_Temp_Text,"]",1)
            If EndTag=0 Then EndTag=BeginTag+6 end if
            TagURL=Mid(Func_Temp_Text,BeginTag+6,(EndTag-BeginTag-6))
            Temp_Text=Left(Func_Temp_Text,BeginTag-1)&Right(Func_Temp_Text,Len(Func_Temp_Text)-EndTag)
            Func_Temp_Text=Temp_Text
            LoopCount=LoopCount+1
        loop
        Func_Temp_Text=Replace(Func_Temp_Text,"[/FONT]","",1,-1,1)
        ' END - Find FONT codes, definet like this:  [FONT=Tahoma]text[/FONT]

        RemoveAHL=Func_Temp_Text
    End Function
    ' ###########################################################
    ' ## Remove all "Alternativ-Homepage-Programming" Contents ##
    ' #### END ##################################################
%><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
<HEAD>
<LINK REL="StyleSheet" TYPE="text/css" HREF="Layout_CSS.css">
<STYLE TYPE="text/css">
<!--
A                    { font-family: 'Tahoma'; font-size: 12px; font-weight: normal; color: #006000; text-decoration: underline; }
A:Visited    { font-family: 'Tahoma'; font-size: 12px; font-weight: normal; color: #006000; text-decoration: underline; }
A:Active    { font-family: 'Tahoma'; font-size: 12px; font-weight: normal; color: #006000; text-decoration: underline; }
A:Hover        { font-family: 'Tahoma'; font-size: 12px; font-weight: normal; color: #800000; text-decoration: none; }

A.SubEditButton                    { font-family: 'Arial'; font-size: 11px; font-weight: bold; color: #202020; text-decoration: none; height: 18px; text-align: center; padding-top: 1px; padding-left: 5px; padding-right: 5px; border-left: 1px solid #FFFFFF; border-right: 1px solid #4B4B4B; border-top: 1px solid #FFFFFF; border-bottom: 1px solid #4B4B4B; background-color: #D5D5D5; letter-spacing: 1px; }
A:Visited.SubEditButton    { font-family: 'Arial'; font-size: 11px; font-weight: bold; color: #202020; text-decoration: none; height: 18px; text-align: center; padding-top: 1px; padding-left: 5px; padding-right: 5px; border-left: 1px solid #FFFFFF; border-right: 1px solid #4B4B4B; border-top: 1px solid #FFFFFF; border-bottom: 1px solid #4B4B4B; background-color: #D5D5D5; letter-spacing: 1px; }
A:Active.SubEditButton    { font-family: 'Arial'; font-size: 11px; font-weight: bold; color: #202020; text-decoration: none; height: 18px; text-align: center; padding-top: 1px; padding-left: 5px; padding-right: 5px; border-left: 1px solid #FFFFFF; border-right: 1px solid #4B4B4B; border-top: 1px solid #FFFFFF; border-bottom: 1px solid #4B4B4B; background-color: #D5D5D5; letter-spacing: 1px; }
A:Hover.SubEditButton        { font-family: 'Arial'; font-size: 11px; font-weight: bold; color: #20201C; text-decoration: none; height: 18px; text-align: center; padding-top: 1px; padding-left: 5px; padding-right: 5px; border-left: 1px solid #E5E5CA; border-right: 1px solid #6C6C5E; border-top: 1px solid #E5E5CA; border-bottom: 1px solid #6C6C5E; background-color: #BDBDA5; letter-spacing: 1px; }

.EditSelectStyle        { font-family: 'Arial'; font-size: 11px; font-weight: normal; color: #000000; background-color: #F3F3F3; }
.IconSmily            { width: 15px; height: 15px; cursor: hand; margin-left: 9px; }
.Palette            { width: 10px; height: 10px; border: 0px; cursor: crosshair; }

.Hand                { cursor: hand; }

FORM                { padding: 0px; margin: 0px; }
-->
</STYLE>
<SCRIPT LANGUAGE="Javascript1.2" TYPE="text/javascript">
// ##############################################################
// # Scripts created by Anders K. Nielsen, do not copy without  #
// # permission from Author. All scripts is copyright 2001-2003 #
// # NightStorm Web Design, McGreed@mcgreed.dk                  #
// ##############################################################
<!--
function OpenAHLHelp() {
    window.open('Popup_AHL_Help.asp','AHLHelp','toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=yes,resizable=yes,width=750,height=550');
}
function GC(whichColor) {
    tagBB('[color='+whichColor+']','[/color]');
}
function storeCaret(textEl) {
    if (textEl.createTextRange) textEl.caretPos = document.selection.createRange().duplicate();
}
function tagBB(bbopen, bbclose) {
    FormName = document.FormNew;
    if ((clientVer >= 4) && is_ie && is_win) {
        theSelection = document.selection.createRange().text;
        if (!theSelection) {
            FormName.NewsMessage.value += bbopen + bbclose;
            FormName.NewsMessage.focus();
            return;
        }
        document.selection.createRange().text = bbopen + theSelection + bbclose;
        FormName.NewsMessage.focus();
        return;
    } else {
        FormName.NewsMessage.value += bbopen + bbclose;
        FormName.NewsMessage.focus();
        return;
    }
    storeCaret(FormName.NewsMessage.value);
    return true;
}
function AddImageCode() {
    FormName = document.FormNew;
    x=prompt("Indtast en URL for hvor billedet ligger:","http://");
    if ((x!="") && (x!=null)) {
        text = "[IMAGE="+x+"]";
        if (FormName.NewsMessage.createTextRange && FormName.NewsMessage.caretPos) {
            var caretPos = FormName.NewsMessage.caretPos;
            caretPos.text = caretPos.text.charAt(caretPos.text.length - 1) == ' ' ? text + ' ' : text;
            FormName.NewsMessage.focus();
        } else {
            FormName.NewsMessage.value  += text;
            FormName.NewsMessage.focus();
        }
    }
}
function AddURLCode() {
    FormName = document.FormNew;
    x=prompt("Indtast en URL for hjemmesiden:","http://");
    if ((x!="") && (x!=null)) {
        tagBB("[URL="+x+"]",'[/URL]');
    }
}
function AddSmilyCode(whichSmily) {
    FormName = document.FormNew;
    text = "["+whichSmily+"]";
    if (FormName.NewsMessage.createTextRange && FormName.NewsMessage.caretPos) {
        var caretPos = FormName.NewsMessage.caretPos;
        caretPos.text = caretPos.text.charAt(caretPos.text.length - 1) == ' ' ? text + ' ' : text;
        FormName.NewsMessage.focus();
    } else {
        FormName.NewsMessage.value  += text;
        FormName.NewsMessage.focus();
    }
}
function delNews(whichID) {
    x = confirm("Er du sikker på at du vil slette denne nyhed?");
    if (x == true) {
        window.location = "News.asp?page=delete&nid=" + whichID;
    }
}
//  Script End -->
</SCRIPT>
</HEAD>
<BODY>
<FORM NAME="FormNew" ACTION="News.asp" METHOD="POST">
<TABLE WIDTH="100%" BGCOLOR="#F0F0F0" CELLPADDING="1" CELLSPACING="0" BORDER="0" STYLE="font-family: 'Arial'; font-size: 12px; border: 1px solid #000000;">
    <COL WIDTH="120">
    <TR>
        <TD BGCOLOR="#D0D0D0" STYLE="font-size: 13px; color: #606060; border-bottom: 1px solid #505050;"><B>&nbsp;Tilføj Nyhed</B><BR></TD>
    </TR><TR>
        <TD BGCOLOR="#E0E0E0" STYLE="border-bottom: 1px solid #505050;">
<TABLE CELLPADDING="1" CELLSPACING="0" BORDER="0" ALIGN="CENTER"><TR><TD>
<TABLE CELLPADDING="2" CELLSPACING="0" BORDER="0"><TR>
    <TD><SELECT ID="SelectFont" CLASS="EditSelectStyle" ONCHANGE="tagBB('[font='+this.options[this.selectedIndex].text+']','[/font]');document.FormNew.SelectFont.selectedIndex=0;">
        <OPTION VALUE="" SELECTED>Vælge Skrift...</OPTION>
        <OPTION>Arial</OPTION>
        <OPTION>Arial Black</OPTION>
        <OPTION>Comic Sans MS</OPTION>
        <OPTION>Courier</OPTION>
        <OPTION>Courier New</OPTION>
        <OPTION>Fixedsys</OPTION>
        <OPTION>Impact</OPTION>
        <OPTION>Lucida Console</OPTION>
        <OPTION>Marlett</OPTION>
        <OPTION>Modern</OPTION>
        <OPTION>MS Sans Serif</OPTION>
        <OPTION>MS Serif</OPTION>
        <OPTION>Small Fonts</OPTION>
        <OPTION>Symbol</OPTION>
        <OPTION>System</OPTION>
        <OPTION>Tahoma</OPTION>
        <OPTION>Terminal</OPTION>
        <OPTION>Times New Roman</OPTION>
        <OPTION>Verdana</OPTION>
        <OPTION>Webdings</OPTION>
        <OPTION>Wingdings</OPTION>
    </SELECT> &nbsp; &nbsp;<BR></TD>
    <TD><SELECT ID="SelectSize" CLASS="EditSelectStyle" OnChange="tagBB('[size='+this.options[this.selectedIndex].value+']','[/size]');document.FormNew.SelectSize.selectedIndex=0;">
        <OPTION VALUE="">Font Størrelse...</OPTION>
        <OPTION VALUE="1">1 (Mindst)</OPTION>
        <OPTION VALUE="2">2</OPTION>
        <OPTION VALUE="3">3 (Normal)</OPTION>
        <OPTION VALUE="4">4</OPTION>
        <OPTION VALUE="5">5</OPTION>
        <OPTION VALUE="6">6</OPTION>
        <OPTION VALUE="7">7 (Størst)</OPTION>
    </SELECT> &nbsp; &nbsp;<BR></TD>
    <TD><A HREF="java script:tagBB('','');" TITLE="Mark the text you want to be Bold, then click here" CLASS="SubEditButton">B</A><BR></TD>
    <TD><A HREF="java script:tagBB('','');" TITLE="Mark the text you want to be Italic, then click here" CLASS="SubEditButton" STYLE="font-style: italic;">I</A><BR></TD>
    <TD><A HREF="java script:tagBB('','');" TITLE="Mark the text you want to be Underline, then click here" CLASS="SubEditButton" STYLE="text-decoration: Underline;">U</A><BR></TD>
    <TD><A HREF="java script:tagBB('[strike]','[/strike]');" TITLE="Mark the text you want to be Strike, then click here" CLASS="SubEditButton" STYLE="text-decoration: strike-through;">Strike</A><BR></TD>
    <TD><A HREF="java script:tagBB('[quot]','[/quot]');" TITLE="Mark the text you want to be Quot, then click here" CLASS="SubEditButton">Quot</A><BR></TD>
</TR></TABLE></TD>
<TD ROWSPAN="3" STYLE="padding-left: 10px;">
<TABLE CELLPADDING="0" CELLSPACING="1" BORDER="1" BORDERCOLORLIGHT="#000000" BORDERCOLORDARK="#909090" TITLE="Click to add color to selected text">
    <TR>
        <TD BGCOLOR="#000000"><IMG SRC="Images/Blank.gif" OnClick="GC('#000000');" CLASS="Palette"><BR></TD>
        <TD BGCOLOR="#222222"><IMG SRC="Images/Blank.gif" OnClick="GC('#222222');" CLASS="Palette"><BR></TD>
        <TD BGCOLOR="#444444"><IMG SRC="Images/Blank.gif" OnClick="GC('#444444');" CLASS="Palette"><BR></TD>
        <TD BGCOLOR="#666666"><IMG SRC="Images/Blank.gif" OnClick="GC('#666666');" CLASS="Palette"><BR></TD>
        <TD BGCOLOR="#888888"><IMG SRC="Images/Blank.gif" OnClick="GC('#888888');" CLASS="Palette"><BR></TD>
        <TD BGCOLOR="#AFAFAF"><IMG SRC="Images/Blank.gif" OnClick="GC('#AFAFAF');" CLASS="Palette"><BR></TD>
        <TD BGCOLOR="#D1D1D1"><IMG SRC="Images/Blank.gif" OnClick="GC('#D1D1D1');" CLASS="Palette"><BR></TD>
        <TD BGCOLOR="#FFFFFF"><IMG SRC="Images/Blank.gif" OnClick="GC('#FFFFFF');" CLASS="Palette"><BR></TD>
    </TR>
    <TR>
        <TD BGCOLOR="#006400"><IMG SRC="Images/Blank.gif" OnClick="GC('#006400');" CLASS="Palette"><BR></TD>
        <TD BGCOLOR="#009600"><IMG SRC="Images/Blank.gif" OnClick="GC('#009600');" CLASS="Palette"><BR></TD>
        <TD BGCOLOR="#00C800"><IMG SRC="Images/Blank.gif" OnClick="GC('#00C800');" CLASS="Palette"><BR></TD>
        <TD BGCOLOR="#00FF00"><IMG SRC="Images/Blank.gif" OnClick="GC('#00FF00');" CLASS="Palette"><BR></TD>
        <TD BGCOLOR="#44FF44"><IMG SRC="Images/Blank.gif" OnClick="GC('#44FF44');" CLASS="Palette"><BR></TD>
        <TD BGCOLOR="#7FFF7F"><IMG SRC="Images/Blank.gif" OnClick="GC('#7FFF7F');" CLASS="Palette"><BR></TD>
        <TD BGCOLOR="#BBFFBB"><IMG SRC="Images/Blank.gif" OnClick="GC('#BBFFBB');" CLASS="Palette"><BR></TD>
        <TD BGCOLOR="#DDFFDD"><IMG SRC="Images/Blank.gif" OnClick="GC('#DDFFDD');" CLASS="Palette"><BR></TD>
    </TR>
    <TR>
        <TD BGCOLOR="#000064"><IMG SRC="Images/Blank.gif" OnClick="GC('#000064');" CLASS="Palette"><BR></TD>
        <TD BGCOLOR="#000090"><IMG SRC="Images/Blank.gif" OnClick="GC('#000090');" CLASS="Palette"><BR></TD>
        <TD BGCOLOR="#0000C9"><IMG SRC="Images/Blank.gif" OnClick="GC('#0000C9');" CLASS="Palette"><BR></TD>
        <TD BGCOLOR="#0000FF"><IMG SRC="Images/Blank.gif" OnClick="GC('#0000FF');" CLASS="Palette"><BR></TD>
        <TD BGCOLOR="#1E90FF"><IMG SRC="Images/Blank.gif" OnClick="GC('#1E90FF');" CLASS="Palette"><BR></TD>
        <TD BGCOLOR="#84C2FF"><IMG SRC="Images/Blank.gif" OnClick="GC('#84C2FF');" CLASS="Palette"><BR></TD>
        <TD BGCOLOR="#BBDDFF"><IMG SRC="Images/Blank.gif" OnClick="GC('#BBDDFF');" CLASS="Palette"><BR></TD>
        <TD BGCOLOR="#00FFFF"><IMG SRC="Images/Blank.gif" OnClick="GC('#00FFFF');" CLASS="Palette"><BR></TD>
    </TR>
    <TR>
        <TD BGCOLOR="#640000"><IMG SRC="Images/Blank.gif" OnClick="GC('#640000');" CLASS="Palette"><BR></TD>
        <TD BGCOLOR="#A50000"><IMG SRC="Images/Blank.gif" OnClick="GC('#A50000');" CLASS="Palette"><BR></TD>
        <TD BGCOLOR="#FF0000"><IMG SRC="Images/Blank.gif" OnClick="GC('#FF0000');" CLASS="Palette"><BR></TD>
        <TD BGCOLOR="#D2691E"><IMG SRC="Images/Blank.gif" OnClick="GC('#D2691E');" CLASS="Palette"><BR></TD>
        <TD BGCOLOR="#FF8C00"><IMG SRC="Images/Blank.gif" OnClick="GC('#FF8C00');" CLASS="Palette"><BR></TD>
        <TD BGCOLOR="#FFD700"><IMG SRC="Images/Blank.gif" OnClick="GC('#FFD700');" CLASS="Palette"><BR></TD>
        <TD BGCOLOR="#FFFF00"><IMG SRC="Images/Blank.gif" OnClick="GC('#FFFF00');" CLASS="Palette"><BR></TD>
        <TD BGCOLOR="#FFFF90"><IMG SRC="Images/Blank.gif" OnClick="GC('#FFFF90');" CLASS="Palette"><BR></TD>
    </TR>
    <TR>
        <TD BGCOLOR="#4B0082"><IMG SRC="Images/Blank.gif" OnClick="GC('#4B0082');" CLASS="Palette"><BR></TD>
        <TD BGCOLOR="#8A2BE2"><IMG SRC="Images/Blank.gif" OnClick="GC('#8A2BE2');" CLASS="Palette"><BR></TD>
        <TD BGCOLOR="#9370DB"><IMG SRC="Images/Blank.gif" OnClick="GC('#9370DB');" CLASS="Palette"><BR></TD>
        <TD BGCOLOR="#B794FF"><IMG SRC="Images/Blank.gif" OnClick="GC('#B794FF');" CLASS="Palette"><BR></TD>
        <TD BGCOLOR="#E57FFF"><IMG SRC="Images/Blank.gif" OnClick="GC('#E57FFF');" CLASS="Palette"><BR></TD>
        <TD BGCOLOR="#BA55D3"><IMG SRC="Images/Blank.gif" OnClick="GC('#BA55D3');" CLASS="Palette"><BR></TD>
        <TD BGCOLOR="#9400D3"><IMG SRC="Images/Blank.gif" OnClick="GC('#9400D3');" CLASS="Palette"><BR></TD>
        <TD BGCOLOR="#800080"><IMG SRC="Images/Blank.gif" OnClick="GC('#800080');" CLASS="Palette"><BR></TD>
    </TR>
</TABLE>
</TD></TR>
<TR><TD>
<TABLE CELLPADDING="2" CELLSPACING="0" BORDER="0"><TR>
    <TD><A HREF="java script:AddImageCode();" TITLE="Klik her for at indsætte en URL til et billede" CLASS="SubEditButton">Billede...</A><BR></TD>
    <TD><A HREF="java script:AddURLCode();" TITLE="Klik for indsætte en URL til en hjemmeside" CLASS="SubEditButton">URL...</A><BR></TD>
    <TD><BR></TD>
    <TD><A HREF="java script:tagBB('
','
');" TITLE="Marker den tekst som du vil centere, og klik så her" CLASS="SubEditButton" STYLE="padding-top: 3px;"><IMG SRC="Images/Button_Align_Center.gif" BORDER="0"></A><BR></TD>
    <TD><A HREF="java script:tagBB('[left]','[/left]');" TITLE="Marker den tekst som du vil venstre-centre, og klik så her" CLASS="SubEditButton" STYLE="padding-top: 3px;"><IMG SRC="Images/Button_Align_Left.gif" BORDER="0"></A><BR></TD>
    <TD><A HREF="java script:tagBB('[right]','[/right]');" TITLE="Mark the text you want to right-align, then click here" CLASS="SubEditButton" STYLE="padding-top: 3px;"><IMG SRC="Images/Button_Align_Right.gif" BORDER="0"></A><BR></TD>
    <TD><A HREF="java script:tagBB('[justify]','[/justify]');" TITLE="Mark the text you want to justity, then click here" CLASS="SubEditButton" STYLE="padding-top: 3px;"><IMG SRC="Images/Button_Align_Justify.gif" BORDER="0"></A><BR></TD>
    <TD>&nbsp;<A HREF="java script:tagBB('[H1]','[/H1]');" TITLE="Mark the text you want to be with Headline 1, and then click here" CLASS="SubEditButton">H1</A><BR></TD>
    <TD><A HREF="java script:tagBB('[H2]','[/H2]');" TITLE="Mark the text you want to be with Headline 2, and then click here" CLASS="SubEditButton">H2</A><BR></TD>
    <TD><A HREF="java script:tagBB('[H3]','[/H3]');" TITLE="Mark the text you want to be with Headline 3, and then click here" CLASS="SubEditButton">H3</A><BR></TD>
    <TD><A HREF="java script:tagBB('[H4]','[/H4]');" TITLE="Mark the text you want to be with Headline 4, and then click here" CLASS="SubEditButton">H4</A><BR></TD>
    <TD><A HREF="java script:tagBB('[H5]','[/H5]');" TITLE="Mark the text you want to be with Headline 5, and then click here" CLASS="SubEditButton">H5</A><BR></TD>
    <TD><A HREF="java script:tagBB('[H6]','[/H6]');" TITLE="Mark the text you want to be with Headline 6, and then click here" CLASS="SubEditButton">H6</A><BR></TD>
</TR></TABLE>
</TD></TR>
<TR><TD>
<TABLE CELLPADDING="0" CELLSPACING="0" BORDER="0">
    <TR>
        <TD><IMG SRC="Images/Smily_Smile.gif" ALT="Happy Smile [:)]" OnClick="AddSmilyCode(':)');" CLASS="IconSmily"><BR></TD>
        <TD><IMG SRC="Images/Smily_BigGrin.gif" ALT="Big Grin [:D]" OnClick="AddSmilyCode(':D');" CLASS="IconSmily"><BR></TD>
        <TD><IMG SRC="Images/Smily_Frown.gif" ALT="Frown [:(]" OnClick="AddSmilyCode(':(');" CLASS="IconSmily"><BR></TD>
        <TD><IMG SRC="Images/Smily_Eek.gif" ALT="Eek [:o]" OnClick="AddSmilyCode(':o');" CLASS="IconSmily"><BR></TD>
        <TD><IMG SRC="Images/Smily_Confused.gif" ALT="Confused [:?]" OnClick="AddSmilyCode(':?');" CLASS="IconSmily"><BR></TD>
        <TD><IMG SRC="Images/Smily_Cool.gif" ALT="Cool Smily [8)]" OnClick="AddSmilyCode('8)');" CLASS="IconSmily"><BR></TD>
        <TD><IMG SRC="Images/Smily_LOL.gif" ALT="Laughing Out Loud [lol]" OnClick="AddSmilyCode('lol');" CLASS="IconSmily"><BR></TD>
        <TD><IMG SRC="Images/Smily_Mad.gif" ALT="Mad Smily [:x]" OnClick="AddSmilyCode(':x');" CLASS="IconSmily"><BR></TD>
        <TD><IMG SRC="Images/Smily_Redface.gif" ALT="Red Face Smily [oops]" OnClick="AddSmilyCode('oops');" CLASS="IconSmily"><BR></TD>
        <TD><IMG SRC="Images/Smily_Cry.gif" ALT="Crying Smily [cry]" OnClick="AddSmilyCode('cry');" CLASS="IconSmily"><BR></TD>
        <TD><IMG SRC="Images/Smily_Evil.gif" ALT="Wicked Smily [evil]" OnClick="AddSmilyCode('evil');" CLASS="IconSmily"><BR></TD>
        <TD><IMG SRC="Images/Smily_RollEyes.gif" ALT="Rolling Eyes [::)]" OnClick="AddSmilyCode('::)');" CLASS="IconSmily"><BR></TD>
        <TD><IMG SRC="Images/Smily_Razz.gif" ALT="Bah [:P]" OnClick="AddSmilyCode(':P');" CLASS="IconSmily"><BR></TD>
        <TD><IMG SRC="Images/Smily_Wink.gif" ALT="Wink [;)]" OnClick="AddSmilyCode(';)');" CLASS="IconSmily"><BR></TD>
        <TD><IMG SRC="Images/Smily_Sniper.gif" ALT="Sniper [¤]" OnClick="AddSmilyCode('¤');" WIDTH="75" HEIGHT="26" STYLE="cursor: hand;"><BR></TD>
    </TR>
</TABLE>
</TD></TR></TABLE>
        </TD>
    </TR><TR>
        <TD>
<TABLE WIDTH="100%" CELLPADDING="0" CELLSPACING="0" BORDER="0" CLASS="GeneralFont">
    <TR>
        <TD ALIGN="RIGHT" WIDTH="110">Tilføjet af:&nbsp;<BR></TD>
        <TD>&nbsp;<B><%=Server.HTMLEncode(Session("DLDK_Username"))%></B><BR></TD>
    </TR><TR>
        <TD ALIGN="RIGHT">Dato/Tid:&nbsp;<BR></TD>
        <TD>&nbsp;<B><%=FullDate(Now(),2,"%D. %ML, %Y - %TH:%TM")%></B><BR></TD>
    </TR><TR>
        <TD ALIGN="RIGHT" VALIGN="TOP">Nyhedstekst:&nbsp;<BR></TD>
        <TD><TEXTAREA NAME="NewsMessage" COLS="35" ROWS="8" onClick="storeCaret(this);" onSelect="storeCaret(this);" onKeyUp="storeCaret(this);" CLASS="GeneralField" STYLE="width: 98%;"><%=Server.HTMLEncode(Str_New_Message&"")%></TEXTAREA><BR></TD>
    </TR><TR>
        <TD BGCOLOR="#E0E0E0" STYLE="border-top: 1px solid #000000;"><BR></TD>
        <TD ALIGN="RIGHT" BGCOLOR="#E0E0E0" STYLE="padding-top: 3px; border-top: 1px solid #000000;"><INPUT TYPE="image" SRC="Images/Button_Grey_Create.png" ALT="Klik her for at tilføj nyhed" CLASS="ButtonCreate">&nbsp; &nbsp;<BR></TD>
    </TR>
</TABLE>
</TD></TR></TABLE>
</FORM>
</BODY>
</HTML>

------------------------------------------------------
Håber at det kan bruges
Avatar billede thb Nybegynder
21. maj 2003 - 08:25 #5
Puha... det var meget.. jeg kigger på det senere... :)

Thomas
Avatar billede oasen Nybegynder
21. maj 2003 - 10:35 #6
Hvis der skal laves SÅ mange replaces, ville jeg helt klart foretrække at lægge det hele ind i en ny tabel. Opret f.eks. tabellen "Repl" med kolonnerne "Gammel" og "Ny".

Tekst = "blablaogblabla"

Set rs = Conn.Execute("Select Gammel, Ny From Repl")
While Not rs.EOF
  Tekst = Replace(Tekst, Gammel, Ny)
  rs.MoveNext
Wend

Kan du se idéen?
Avatar billede oasen Nybegynder
21. maj 2003 - 10:37 #7
Tekst = Replace(Tekst, rs("Gammel"), rs("Ny"))

- skal det selvfølgelig være.
Avatar billede mcgreed Nybegynder
21. maj 2003 - 14:20 #8
Det er jo smag og behag. Jeg gør det på denne måde for at undgå for mange connections til databasen.
Avatar billede oasen Nybegynder
21. maj 2003 - 14:40 #9
Databaseforbindelsen er jo formentlig allerede etableret, så et så simpelt udtræk af en enkelt tabel, vil næppe have den store betydning ved mindre den er hårdt belastet i forvejen.

Alternativt ville jeg lægge de to serier ned i en txt-fil adskilt af et tabulatorskift. Men det må jo være op til thb at afgøre, hvad han foretrækker ;)
Avatar billede thb Nybegynder
21. maj 2003 - 14:50 #10
mcgreed > jeg har ikke lige fået kigget på din kode, er lige kommet ind af døren og smutter igen om lidt... Men jeg kigger senere..

oasen > Jeg tror at jeg vil gøre det med et par replace, for jeg skal ikke lave ligeså meget html som mcgreed bare omkring 5 koder..

Thomas
Avatar billede oasen Nybegynder
21. maj 2003 - 14:52 #11
Hvis du ikke skal lave mere end 5, vil jeg også gøre det på den traditionelle måde.
Avatar billede thb Nybegynder
21. maj 2003 - 15:25 #12
mcgreed > nu har jeg kigget på din kode.. jeg kan meget godt lide den... den kan en del mere end jeg har brug, men det er jo lige meget..
Her er 80 point.

oasen > Din ide er fin nok, så her er 20 point

Thomas
Avatar billede oasen Nybegynder
21. maj 2003 - 19:09 #13
Tak ;)
Avatar billede Ny bruger Nybegynder

Din løsning...

Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.

Loading billede Opret Preview
Kategori
Kurser inden for grundlæggende programmering

Log ind eller opret profil

Hov!

For at kunne deltage på Computerworld Eksperten skal du være logget ind.

Det er heldigvis nemt at oprette en bruger: Det tager to minutter og du kan vælge at bruge enten e-mail, Facebook eller Google som login.

Du kan også logge ind via nedenstående tjenester



Seneste spørgsmål Seneste aktivitet
I dag 06:10 Excel åbner fil i kæmpe format Af Aske i Excel
I går 22:00 Datafordeler Af Lsk i PHP
I går 12:37 Summere beløb pr. dato Af TTA i Excel
31/1022:44 Tilslutte chassic fans Af viking69 i PC
31/1020:28 LED lysstofrør Af ErikHg i Fri debat