Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how does one write a Response.write to a file 5

Status
Not open for further replies.

MAWarGod

Programmer
Feb 15, 2002
352
US
I would ilike to be able to write a code like this to a asp
file
<% If Handle=&quot;WarGod MA&quot; then
Response.write &quot;<b><font color='gold'>&quot;
end if %>
 
Well, if you're wanting the &quot;<b><font color='gold'>&quot;
to be displayed to users when they load a page, then you need to enclose the string in parenthesis, like so:

===================================================

response.write(&quot;<b><font color='gold'>&quot;)

===================================================

If you're talking about writing text to a text-type file, then you'll need to use the FileSystemObject to open/write/close the info to a text file. If you need more info on this process, just holler.....


 
hollering hollering hollering hollering
ok what I trying to do is allow the user to input the name they so desire
<% If Handle=&quot;WarGod MA&quot; then
Response.write &quot;<b><font color='gold'>&quot;
end if %>

in this case WarGod MA them when they hit a submit button

have this writen to a file
<% If Handle=&quot;WarGod MA&quot; then
Response.write &quot;<b><font color='gold'>&quot;
end if %>
the rest of the database reads from that file
 
Have What written to a file? 1 line of html code?
To what file? What database ?

Please post the page's code to clarify what you want to do...


 
I have a file that has the names and colors like this
The file name is modb.asp<!-- mod.asp script -->

<!-- reScripting by: MA WarGod -->
<!--=Head-Administrator= -->
<% On Error Resume Next %>
<% If Handle=&quot;WarGod MA&quot; then
Response.write &quot;<b><font color='gold'>&quot;
end if %>
<% If Handle=&quot;~*WarGod MA*~ *Venna*RGW&quot; then
Response.write &quot;<div><A href=&quot;&quot; color='gold'></A>&quot;
end if %>
<% If Handle=&quot;IMORATEC`*Never say Neve&quot; then
Response.write &quot;<b><font color='yellow'>&quot;
end if %>
<% If Handle=&quot;-=Head-Administrator=-&quot; then
Response.write &quot;<b><font color='gold'>&quot;
end if %>
<% If Handle=&quot;-=Head-Administrator=--=&quot; then
Response.write &quot;<b><font color='gold'>&quot;
end if %>
<!-- end-=Head-Administrator= -->
<!---=Site-Administrator= -->
<% If Handle=&quot;||||||| Eve Vale ||||||&quot; then
Response.write &quot;<b><font color='Yellow'>&quot;
end if %>
<% If Handle=&quot;Relius&quot; then
Response.write &quot;<b><font color='Yellow'>&quot;
end if %>
<% If Handle=&quot;Wynter Valentine Falconu&quot; then
Response.write &quot;<b><font color='#0099FF'>&quot;
end if %>
<% If Handle=&quot;***†† Hiskrut ††*** Retr&quot; then
Response.write &quot;<b><font color='Yellow'>&quot;
end if %>
<% If Handle=&quot;****††† Hiskrut †††****&quot; then
Response.write &quot;<b><font color='Yellow'>&quot;
end if %>
<% If Handle=&quot;Titan Phalynx UbarIsle o&quot; then

Response.write &quot;<b><font color='red'>&quot;
end if %>
<% If Handle=&quot;Ubar Relius / Juliet {ka&quot; then
Response.write &quot;<b><font color='Yellow'>&quot;
end if %>

<% If Handle=&quot;||||||| Eve Vale |||||||&quot; then
Response.write &quot;<b><font color='Yellow'>&quot;
end if %>
<!-- end-=Site-Administrator= -->
<% If Handle=&quot;'Vasade de la Rose&quot; then
Response.write &quot;<b><font color='#FF0000'>&quot;
end if %>
<% If Handle=&quot;Loric DavioUBARKo-ro-ba&quot; then
Response.write &quot;<b><font color='#FF0000'>&quot;
end if %>
<% If Handle=&quot;LoricWhat is one to doWh&quot; then
Response.write &quot;<b><font color='#FF0000'>&quot;
end if %>
<% If Handle=&quot;Ubar Relius {kardelen} {&quot; then
Response.write &quot;<b><font color='#FF0000'>&quot;
end if %>
<% If Handle=&quot;Ubar Relius/Juliet Ubar&quot; then
Response.write &quot;<b><font color='#FF0000'>&quot;
end if %>
<% If Handle=&quot;Locke D'AveramSlaverHous&quot; then
Response.write &quot;<b><font color='#FF0000'>&quot;
end if %>
<% If Handle=&quot;*~Haley LeBlanc~*QueenWi&quot; then
Response.write &quot;<b><font color='#FF0000'>&quot;
end if %>
<% If Handle=&quot;Lady Juliet/Ubar ReliusO&quot; then
Response.write &quot;<b><font color='#CC00FF'>&quot;
end if %>
<% If Handle=&quot;~Ubar Jask Tong~First Ch&quot; then
Response.write &quot;<b><font color='#FF0000'>&quot;
end if %>
<% If Handle=&quot;`-}-}-}Loric Da'vio{-{-{&quot; then
Response.write &quot;<b><font color='#FF0000'>&quot;
end if %>
<% If Handle=&quot;-}-}-}Loric Da'vio{-{-{-&quot; then
Response.write &quot;<b><font color='#FF0000'>&quot;
end if %>
<% If Handle=&quot;}-}-}-}-}Loric{-{-{-{-{-&quot; then
Response.write &quot;<b><font color='#FF0000'>&quot;
end if %>
<% If Handle=&quot;-=Room-Moderator=--=Room&quot; then
Response.write &quot;<b><font color='#FF0000'>&quot;
end if %>
<% If Handle=&quot;-=Room-Moderator=-&quot; then
Response.write &quot;<b><font color='#FF0000'>&quot;

end if %>

<% If Handle=&quot;Ubar Malik Heratic Oasis&quot; then
Response.write &quot;<b><font color='#FF0000'>&quot;
end if %>
<% If Handle=&quot;Ubar Malik Heratic Oasis&quot; then
Response.write &quot;<b><font color='#FF0000'>&quot;
end if %>

<!-- Members= -->
<% If Handle=&quot;^.^ Dark Kitty ^.^Tatrix&quot; then
Response.write &quot;<b><font color='#CC00FF'>&quot;
end if %>
<% If Handle=&quot;| | | Tovah Heratic |&quot; then
Response.write &quot;<b><font color='#CC00FF'>&quot;
end if %>
<% If Handle=&quot;Tovah Heratic&quot; then
Response.write &quot;<b><font color='#CC00FF'>&quot;
end if %>
<% If Handle=&quot;lianna{LD}House of D`Ave&quot; then
Response.write &quot;<b><font color='#CC00FF'>&quot;
end if %>

<% If Handle=&quot;kasey {Oslo} bl Masters&quot; then
Response.write &quot;<b><font color='#CC00FF'>&quot;
end if %>
<% If Handle=&quot;Oslo =First Shield=Port&quot; then
Response.write &quot;<b><font color='#CC00FF'>&quot;
end if %>
<% If Handle=&quot;*~Haley LeBlanc~*QueenWi&quot; then
Response.write &quot;<b><font color='#CC00FF'>&quot;
end if %>
<% If Handle=&quot;=-=the ORIGINAL evil=-=&quot; then
Response.write &quot;<b><font color='#CC00FF'>&quot;
end if %>
<% If Handle=&quot;~*~laynee~*~{LDavio-1}~*&quot; then
Response.write &quot;<b><font color='#CC00FF'>&quot;
end if %>
<% If Handle=&quot;laynee {LDavio}&quot; then
Response.write &quot;<b><font color='#CC00FF'>&quot;
end if %>
<% If Handle=&quot;~*~laynee~*~{LDavio-1}}-&quot; then
Response.write &quot;<b><font color='#CC00FF'>&quot;
end if %>
<% If Handle=&quot;Ubar Relius/JulietUbar&quot; then
Response.write &quot;<b><font color='#CC00FF'>&quot;
end if %>
<% If Handle=&quot;~kardelen~{Rel}~R~ restr&quot; then
Response.write &quot;<b><font color='#CC00FF'>&quot;
end if %>
<% If Handle=&quot;Malik&quot; then
Response.write &quot;<b><font color='#CC00FF'>&quot;
end if %>
<% If Handle=&quot;Lady Arwen Eveningstar&quot; then
Response.write &quot;<b><font color='#CC00FF'>&quot;
end if %>
<% If Handle=&quot;~kardelen~{Rel}~R~ ~rest&quot; then
Response.write &quot;<b><font color='#CC00FF'>&quot;
end if %>
<% If Handle=&quot;jace{MH}Oasis of The Sto&quot; then
Response.write &quot;<b><font color='#CC00FF'>&quot;
end if %>
<% If Handle=&quot;StefanieIMORATEC Eternal&quot; then
Response.write &quot;<b><font color='#CC00FF'>&quot;
end if %>
<% If Handle=&quot;damion{LJ}~R&quot; then
Response.write &quot;<b><font color='#CC00FF'>&quot;
end if %>
<% If Handle=&quot;damion {LJ}~r~~branded~l&quot; then
Response.write &quot;<b><font color='#CC00FF'>&quot;
end if %>
<% If Handle=&quot;damion {LJ}~R~~branded~l&quot; then
Response.write &quot;<b><font color='#CC00FF'>&quot;
end if %>
<% If Handle=&quot;Ubara Juliet/Ubar Relius&quot; then
Response.write &quot;<b><font color='#CC00FF'>&quot;
end if %>
<% If Handle=&quot;jewel{MoT}branded(M)(T)k&quot; then
Response.write &quot;<b><font color='#00FF00'>&quot;
end if %>
<% If Handle=&quot;JoKeR _MA&quot; then
Response.write &quot;<b><font color='#CC00FF'>&quot;
end if %>

<% If Handle=&quot;lazy laynee {LDavio-1}&quot; then
Response.write &quot;<b><font color='#CC00FF'>&quot;
end if %>







<!-- end .asp script -->
<!--limers-->
<% If Handle=&quot;I am not creative enough&quot; then
Response.write &quot;<b><font color='#00FF00'>&quot;
end if %>
<% If Handle=&quot;======Mentally ill======&quot; then
Response.write &quot;<b><font color='#00FF00'>&quot;
end if %>
<% If Handle=&quot;Zatrina_____Panther [Tuc&quot; then
Response.write &quot;<b><font color='#00FF00'>&quot;
end if %>
<% If Handle=&quot;Leatha Panther ~Ata Adoh&quot; then
Response.write &quot;<b><font color='#00FF00'>&quot;
end if %>
<% If Handle=&quot;_::Death by Beauty :::_&quot; then
Response.write &quot;<b><font color='#00FF00'>&quot;
end if %>
<% If Handle=&quot;Ramer/Shanna**-UBAR-**Ka&quot; then
Response.write &quot;<b><font color='#00FF00'>&quot;
end if %>
<% If Handle=&quot;~Ubar Jask Tong~Courting&quot; then
Response.write &quot;<b><font color='#00FF00'>&quot;
end if %>
<% If Handle=&quot;Claws of NightGryphon of&quot; then
Response.write &quot;<b><font color='#00FF00'>&quot;
end if %>
<% If Handle=&quot;~ leah ~Protected by Ret&quot; then
Response.write &quot;<b><font color='#00FF00'>&quot;
end if %>
<% If Handle=&quot;Beth de la RoseLo Spurgo&quot; then
Response.write &quot;<b><font color='#00FF00'>&quot;
end if %>

<% If Handle=&quot;*^^**Pwitty in Pink**^^*&quot; then
Response.write &quot;<b><font color='#00FF00'>&quot;
end if %>
<% If Handle=&quot;~*~Adrina Da'vio~*~~*~Da&quot; then
Response.write &quot;<b><font color='#00FF00'>&quot;
end if %>
<% If Handle=&quot;daphne{Citadel}Barbarian&quot; then
Response.write &quot;<b><font color='#00FF00'>&quot;
end if %>
<% If Handle=&quot;Maximus/=ClaireCity Seco&quot; then
Response.write &quot;<b><font color='#00FF00'>&quot;
end if %>
<% If Handle=&quot;~Claire/=Maximus~Proud M&quot; then
Response.write &quot;<b><font color='#00FF00'>&quot;
end if %>
<% If Handle=&quot;Maximus Jr. Proud Son of&quot; then
Response.write &quot;<b><font color='#00FF00'>&quot;
end if %>
<% If Handle=&quot;lu{KoB}&quot; then
Response.write &quot;<b><font color='#00FF00'>&quot;
end if %>
<% If Handle=&quot;willow{Dray}~R~~kajira t&quot; then
Response.write &quot;<b><font color='#00FF00'>&quot;
end if %>
<% If Handle=&quot;sherrie{HoD}~t~&quot; then
Response.write &quot;<b><font color='#00FF00'>&quot;
end if %>
<% If Handle=&quot;necia{LD}trainer House o&quot; then
Response.write &quot;<b><font color='#00FF00'>&quot;
end if %>
<% If Handle=&quot;...:::The Deadly Rose:::&quot; then
Response.write &quot;<b><font color='#00FF00'>&quot;
end if %>
<% If Handle=&quot;Tiamara Shadoweaver&quot; then
Response.write &quot;<b><font color='#00FF00'>&quot;
end if %>
<% If Handle=&quot;~*blossom*~(HoD)&quot; then
Response.write &quot;<b><font color='#00FF00'>&quot;
end if %>

<% If Handle=&quot;Jah`Karr =|=First Slaver&quot; then
Response.write &quot;<b><font color='#00FF00'>&quot;
end if %>
<% If Handle=&quot;^-^ mimpi ^-^ [[ Proper&quot; then
Response.write &quot;<b><font color='#00FF00'>&quot;
end if %>
<% If Handle=&quot;tibet{VIP}&quot; then
Response.write &quot;<b><font color='#00FF00'>&quot;
end if %>
<% If Handle=&quot;~'*rahanna{JTcm1)*'~Port&quot; then
Response.write &quot;<b><font color='#00FF00'>&quot;
end if %>
<% If Handle=&quot;~Nikki white Rose Fal&quot; then
Response.write &quot;<b><font color='#00FF00'>&quot;
end if %>
<% If Handle=&quot;sapphire{MoT}~Y~branded&quot; then
Response.write &quot;<b><font color='#00FF00'>&quot;
end if %>
<% If Handle=&quot;SebastianUbarTotM/Koroba&quot; then
Response.write &quot;<b><font color='#00FF00'>&quot;
end if %>
<% If Handle=&quot;~katriona~{DSh}~R~~brand&quot; then
Response.write &quot;<b><font color='#00FF00'>&quot;
end if %>
<% If Handle=&quot;~blossom{HoD}&quot; then
Response.write &quot;<b><font color='#00FF00'>&quot;
end if %>
<% If Handle=&quot;nidawi{LD}Master's lil m&quot; then
Response.write &quot;<b><font color='#00FF00'>&quot;
end if %>
<% If Handle=&quot;lianna{HoD}-t&quot; then
Response.write &quot;<b><font color='#00FF00'>&quot;
end if %>
<% If Handle=&quot;--Roi Zin Nepharius--&quot; then
Response.write &quot;<b><font color='#00FF00'>&quot;
end if %>
<% If Handle=&quot;adrina{KOB}FW in punishm&quot; then
Response.write &quot;<b><font color='#00FF00'>&quot;
end if %>
<% If Handle=&quot;jartarika{XT-1}submitted&quot; then
Response.write &quot;<b><font color='#00FF00'>&quot;
end if %>
<% If Handle=&quot;Lapis ALtare/=Xavier Tri&quot; then
Response.write &quot;<b><font color='#00FF00'>&quot;
end if %>
<% If Handle=&quot;Xavier Triton/Lapis ALta&quot; then
Response.write &quot;<b><font color='#00FF00'>&quot;
end if %>
<% If Handle=&quot;lianna{HoD}-t&quot; then
Response.write &quot;<b><font color='#00FF00'>&quot;
end if %>
<% If Handle=&quot;Jicaque Koroba, RGW&quot; then
Response.write &quot;<b><font color='#00FF00'>&quot;
end if %>
<% If Handle=&quot;Drayzek Raine~Wanderer~&quot; then
Response.write &quot;<b><font color='#00FF00'>&quot;
end if %>
<% If Handle=&quot;suria{HoD}&quot; then
Response.write &quot;<b><font color='#00FF00'>&quot;
end if %>
<% If Handle=&quot;.~ leah ~Protected by Re&quot; then
Response.write &quot;<b><font color='#00FF00'>&quot;
end if %>
<% If Handle=&quot;lena{Tal-1}~R~~restricte&quot; then
Response.write &quot;<b><font color='#00FF00'>&quot;
end if %>
<% If Handle=&quot;-=Brackus VeilSide=--=Tr&quot; then
Response.write &quot;<b><font color='#00FF00'>&quot;
end if %>
<% If Handle=&quot;Marcus Civititas TrevisU&quot; then
Response.write &quot;<b><font color='#00FF00'>&quot;
end if %>
<% If Handle=&quot;TaladrenWeaponMaster/Sla&quot; then
Response.write &quot;<b><font color='#00FF00'>&quot;
end if %>
<% If Handle=&quot;willow{LJ}~R~TuchuckRGW&quot; then
Response.write &quot;<b><font color='#00FF00'>&quot;
end if %>
<% If Handle=&quot;‡†Jémmã Gîøvãnn솇&quot; then
Response.write &quot;<b><font color='#00FF00'>&quot;
end if %>

<% If Handle=&quot;///~*~ Keighly ~*~///&quot; then
Response.write &quot;<b><font color='#00FF00'>&quot;
end if %>
<% If Handle=&quot;Jah`Karr =|= Slaver =|=&quot; then
Response.write &quot;<b><font color='#00FF00'>&quot;
end if %>
<% If Handle=&quot;*~jade~{D*A}~ps~Pierced&quot; then
Response.write &quot;<b><font color='#00FF00'>&quot;
end if %>
<% If Handle=&quot;eden{HoD}Slaver House of&quot; then
Response.write &quot;<b><font color='#00FF00'>&quot;
end if %>
<% If Handle=&quot;suria{Ka'Less} House of&quot; then
Response.write &quot;<b><font color='#00FF00'>&quot;
end if %>
<% If Handle=&quot;Andarious MA/Lady Shalot&quot; then
Response.write &quot;<b><font color='#00FF00'>&quot;
end if %>
<% If Handle=&quot;Grodos Initiate&quot; then
Response.write &quot;<b><font color='#00FF00'>&quot;
end if %>
<% If Handle=&quot;~Ubar Jask Tong~/Malique&quot; then
Response.write &quot;<b><font color='#00FF00'>&quot;
end if %>
<% If Handle=&quot;~desdemona~ {PK-RGW}firs&quot; then
Response.write &quot;<b><font color='#00FF00'>&quot;
end if %>
<% If Handle=&quot;~Shanna/Ramer~UbaraWith&quot; then
Response.write &quot;<b><font color='#00FF00'>&quot;
end if %>
<% If Handle=&quot;lil hellion{A-Anox}~R~Br&quot; then
Response.write &quot;<b><font color='#00FF00'>&quot;
end if %>
<% If Handle=&quot;DarykFirst SwordCamp of&quot; then
Response.write &quot;<b><font color='#00FF00'>&quot;
end if %>
<% If Handle=&quot;||Bryce||/RayaUbarCamp o&quot; then
Response.write &quot;<b><font color='#00FF00'>&quot;
end if %>
<% If Handle=&quot;Vivica Moore&quot; then
Response.write &quot;<b><font color='#00FF00'>&quot;
end if %>
<% If Handle=&quot;RENEGADE..Ubar&quot; then
Response.write &quot;<b><font color='#00FF00'>&quot;
end if %>
<% If Handle=&quot;utopia{REN}*Y*&quot; then
Response.write &quot;<b><font color='#00FF00'>&quot;
end if %>
<% If Handle=&quot;kley{Pel} ~spirit sister&quot; then
Response.write &quot;<b><font color='#00FF00'>&quot;
end if %>
<% If Handle=&quot;phoenix&quot; then
Response.write &quot;<b><font color='#00FF00'>&quot;
end if %>
<% If Handle=&quot;-=Water of Life=-Saint O&quot; then
Response.write &quot;<b><font color='#00FF00'>&quot;
end if %>
<% If Handle=&quot;Onior Mercy Faith&quot; then
Response.write &quot;<b><font color='#00FF00'>&quot;
end if %>
<% If Handle=&quot;Sasha Magus Daughter of&quot; then
Response.write &quot;<b><font color='#00FF00'>&quot;
end if %>
<% If Handle=&quot;Macabre&quot; then
Response.write &quot;<b><font color='#00FF00'>&quot;
end if %>
<% If Handle=&quot;Dark ShadowRariusTuchuk&quot; then
Response.write &quot;<b><font color='#00FF00'>&quot;
end if %>
<% If Handle=&quot;-=Khepera Triton=-~Young&quot; then
Response.write &quot;<b><font color='#00FF00'>&quot;
end if %>
<% If Handle=&quot;~mia~{SQ}Ar, RGW&quot; then
Response.write &quot;<b><font color='#00FF00'>&quot;
end if %>
<% If Handle=&quot;bill{MaxJR}Koroba RGW&quot; then
Response.write &quot;<b><font color='#00FF00'>&quot;
end if %>
<% If Handle=&quot;Destiny Luirean A'Vernon&quot; then
Response.write &quot;<b><font color='#00FF00'>&quot;
end if %>
<% If Handle=&quot;Lapis Triton/Xavier Trit&quot; then
Response.write &quot;<b><font color='#00FF00'>&quot;
end if %>
<% If Handle=&quot;Sepiriz Omicron First E&quot; then
Response.write &quot;<b><font color='#00FF00'>&quot;
end if %>
<% If Handle=&quot;k'atiue{J}~restricted ca&quot; then
Response.write &quot;<b><font color='#00FF00'>&quot;
end if %>
<% If Handle=&quot;chelynne{SRT}His lil Hel&quot; then
Response.write &quot;<b><font color='#00FF00'>&quot;
end if %>
<% If Handle=&quot;SquallSecond SwordAR/RGW&quot; then
Response.write &quot;<b><font color='#00FF00'>&quot;
end if %>
<% If Handle=&quot;~Claire/=Maximus~In a St&quot; then
Response.write &quot;<b><font color='#00FF00'>&quot;
end if %>
<% If Handle=&quot;SquallGuard CITY of Ko&quot; then
Response.write &quot;<b><font color='#00FF00'>&quot;
end if %>
<% If Handle=&quot;Çorwíñ«FC»Ãta_Ubar&quot; then
Response.write &quot;<b><font color='#00FF00'>&quot;
end if %>
<% If Handle=&quot;lil mina{KoB}&quot; then
Response.write &quot;<b><font color='#00FF00'>&quot;
end if %>
<% If Handle=&quot;-=.Khepera Triton.=-~You&quot; then
Response.write &quot;<b><font color='#00FF00'>&quot;
end if %>
<% If Handle=&quot;Anastasia CaldazarFunky&quot; then
Response.write &quot;<b><font color='#00FF00'>&quot;
end if %>
<% If Handle=&quot;Darius Dawson Wolf/=R. L&quot; then
Response.write &quot;<b><font color='#00FF00'>&quot;
end if %>
<% If Handle=&quot;ria{POCC}~Y~&quot; then
Response.write &quot;<b><font color='#00FF00'>&quot;
end if %>
<% If Handle=&quot;sanura{SWC}~R~Ubar's lil&quot; then
Response.write &quot;<b><font color='#00FF00'>&quot;
end if %>
<% If Handle=&quot;~Ubara Katrina Davio/Sha&quot; then
Response.write &quot;<b><font color='#00FF00'>&quot;
end if %>
<% If Handle=&quot;maggie{Citadel}RGW&quot; then
Response.write &quot;<b><font color='#00FF00'>&quot;
end if %>


<% If Handle=&quot;*~~shoshanna~~*~{POCC}~W&quot; then
Response.write &quot;<b><font color='#00FF00'>&quot;
end if %>
<% If Handle=&quot;Anastasia CaldazarFunky&quot; then
Response.write &quot;<b><font color='#00FF00'>&quot;
end if %>
<% If Handle=&quot;Rahveenah Fireheart Sist&quot; then
Response.write &quot;<b><font color='#00FF00'>&quot;
end if %>

<% If Handle=&quot;|||||||Tarik Atken||||||&quot; then
Response.write &quot;<b><font color='#00FF00'>&quot;
end if %>
<% If Handle=&quot;Tarik Atken/=Eve ValeInt&quot; then
Response.write &quot;<b><font color='#00FF00'>&quot;
end if %>
<% If Handle=&quot;maggie{Citadel}RGW&quot; then
Response.write &quot;<b><font color='#00FF00'>&quot;
end if %>

<% If Handle=&quot;Drak KloumBlack Eagle&quot; then
Response.write &quot;<b><font color='#00FF00'>&quot;
end if %>
<% If Handle=&quot;Charity Fireheart Proba&quot; then
Response.write &quot;<b><font color='#00FF00'>&quot;
end if %>
<% If Handle=&quot;adrina{KOB}RestrictedKor&quot; then
Response.write &quot;<b><font color='#00FF00'>&quot;
end if %>
<% If Handle=&quot;lisa protected escorted&quot; then
Response.write &quot;<b><font color='#00FF00'>&quot;
end if %>
<% If Handle=&quot;Jah`Karr =|= First Slave&quot; then
Response.write &quot;<b><font color='#00FF00'>&quot;
end if %>
<% If Handle=&quot;Cap Olav Shayburn~Southe&quot; then
Response.write &quot;<b><font color='#00FF00'>&quot;
end if %>
<% If Handle=&quot;^-^ mimpi ^-^ [[ Proper&quot; then
Response.write &quot;<b><font color='#00FF00'>&quot;
end if %>
<% If Handle=&quot;Marina&quot; then
Response.write &quot;<b><font color='#00FF00'>&quot;
end if %>
<% If Handle=&quot;That crazy old brujah†Si&quot; then
Response.write &quot;<b><font color='#00FF00'>&quot;
end if %>
<% If Handle=&quot;kley{Pel}~spirit sister&quot; then
Response.write &quot;<b><font color='#00FF00'>&quot;
end if %>
<% If Handle=&quot;Yuri Valentine&quot; then
Response.write &quot;<b><font color='#00FF00'>&quot;
end if %>
<% If Handle=&quot;Darius Dawson Wolf/R. L&quot; then
Response.write &quot;<b><font color='#00FF00'>&quot;
end if %>
<% If Handle=&quot;Joseph Kaufman&quot; then
Response.write &quot;<b><font color='#00FF00'>&quot;
end if %>
<% If Handle=&quot;Crystål Rose...Garou Abo&quot; then
Response.write &quot;<b><font color='#00FF00'>&quot;
end if %>
<% If Handle=&quot;~*Max DragonHeart/Blood&quot; then
Response.write &quot;<b><font color='#00FF00'>&quot;
end if %>
<% If Handle=&quot;*That crazy old brujah†S&quot; then
Response.write &quot;<b><font color='#00FF00'>&quot;
end if %>
<% If Handle=&quot;lu{KoB}chained to dias&quot; then
Response.write &quot;<b><font color='#00FF00'>&quot;
end if %>
<% If Handle=&quot;Justin AnoxHead Of The A&quot; then
Response.write &quot;<b><font color='#00FF00'>&quot;
end if %>
<% If Handle=&quot;Charity Fireheart Proba&quot; then
Response.write &quot;<b><font color='#00FF00'>&quot;
end if %>
<% If Handle=&quot;^Drayzek Raine^^FIRST SW&quot; then
Response.write &quot;<b><font color='#00FF00'>&quot;
end if %>
<% If Handle=&quot;>~*~Adrina Da'vio Scarle&quot; then
Response.write &quot;<b><font color='#00FF00'>&quot;
end if %>
<% If Handle=&quot;~katriona{DSh}~R~~brande&quot; then
Response.write &quot;<b><font color='#00FF00'>&quot;
end if %>



<% If Handle=&quot; TacitusWarrior {Captive&quot; then
Response.write &quot;<b><font color='#00FF00'>&quot;
end if %>
<% If Handle=&quot;-=-Dravik Antilles-=--=-&quot; then
Response.write &quot;<b><font color='#00FF00'>&quot;
end if %>
<% If Handle=&quot;~shaaylee~{Ram/Sha}~Y~Ka&quot; then
Response.write &quot;<b><font color='#00FF00'>&quot;
end if %>
<% If Handle=&quot;Alaric ShadowenCaste of&quot; then
Response.write &quot;<b><font color='#00FF00'>&quot;
end if %>
<% If Handle=&quot;chamomile {KoB}wt&quot; then
Response.write &quot;<b><font color='#00FF00'>&quot;
end if %>
<% If Handle=&quot;lil hellion{A-Anox}~R~Ko&quot; then
Response.write &quot;<b><font color='#00FF00'>&quot;
end if %>
<% If Handle=&quot;>~*~^Innocent^^Beauty^~*~&quot; then
Response.write &quot;<b><font color='#00FF00'>&quot;
end if %>
<% If Handle=&quot;~katriona{DSh}~R~~brande&quot; then
Response.write &quot;<b><font color='#00FF00'>&quot;
end if %>










<!-- end of mod.asp script -->
<!-- end of mod.asp script -->
<% If Handle=&quot;_:::Death by Beauty :::_&quot; then
Response.write &quot;<b><font color='#0099FF'>&quot;
end if %>
<% If Handle=&quot;Traveler&quot; then
Response.write &quot;<b><font color='#0099FF'>&quot;
end if %>
<% If Handle=&quot;Anonymous&quot; then
Response.write &quot;<b><font color='#0099FF'>I am not creative enough to think of a name<font color='red'> please remove me'>&quot;
end if %>
<% If Handle=&quot;///~*~ Keighly ~*~/// |&quot; then
Response.write &quot;<b><font color='#0099FF'>&quot;
end if %>
<% If Handle=&quot;ashtyn{DDW}~bellied~~CAG&quot; then
Response.write &quot;<b><font color='#0099FF'>&quot;

end if %>
<% If Handle=&quot;Wynter Valentine =SC=Sas&quot; then
Response.write &quot;<b><font color='#0099FF'>&quot;
end if %>
<% If Handle=&quot;kardelen{Rel}~R~ ~restr&quot; then
Response.write &quot;<b><font color='#0099FF'>&quot;
end if %>
<% If Handle=&quot;alinisa{WG}~Y~first danc&quot; then
Response.write &quot;<b><font color='#0099FF'>&quot;
end if %>
<% If Handle=&quot;~*Malique MA*~ *Ubara*Ve&quot; then
Response.write &quot;<b><font color='#0099FF'>&quot;
end if %>
<% If Handle=&quot;~kardelen~{Rel}~R~ ~res&quot; then
Response.write &quot;<b><font color='#0099FF'>&quot;
end if %>
<% If Handle=&quot;=amanda={RGW}E/everyones&quot; then
Response.write &quot;<b><font color='#0099FF'>&quot;
end if %>


Now as You can see each Handle Name and Response.write
I want to make it that the User can add the names to this file modb.asp
My question is how do I do that
I know it has to be writen to the file like this
<% If Handle=&quot;=amanda={RGW}E/everyones&quot; then
Response.write &quot;<b><font color='#0099FF'>&quot;
end if %>
the full code
 
First of all, let me make a suggestion to make your code alot easier to look at, and also easier to edit.

-----------------------------------------
Select Case handle
Case &quot;~*WarGod MA*~ *Venna*RGW&quot;
x = &quot;admin&quot;
Case &quot;-=Head-Administrator=-&quot;
x = &quot;gold&quot;
Case &quot;Joseph Kaufman&quot;
x = &quot;00FF00&quot;
(and so on)
End Select

If x = admin then
Response.write &quot;<div><A href=&quot;&quot; color='gold'></A>&quot;
Else
Response.write &quot;<b><font color='&quot; & x & &quot;'>&quot;
---------------------------------

Second, to write this out to a file, or append an existing ASP file, you will need to use a FileSystemObject....which is kind of alot to explain here. Try this link:

--------------------------------

And Finally, let me suggest that you do not do build ASP pages this way. All of that text parcing and IF statements can be taxing on your server.

I would recommend keeping a simple text file in the form of:
&quot;~*WarGod MA*~ *Venna*RGW&quot; = &quot;admin&quot;
&quot;-=Head-Administrator=-&quot; = &quot;gold&quot;
&quot;Joseph Kaufman&quot; = &quot;00FF00&quot;
etc etc

Then you can have your ASP page read this file to determine how each handle would get colored. Theres a variety of ways that you can do this, for your example I think it would be best to read a text file line by line, and compare the handle to the first field of the text file until it finds a match.
 
For Mawargod's sake! Use a database! This will keep all of your user handles listed, along with the group that they belong to (I am assuming that the colour denotes which group they are in). You could even add a field with the text value in. Then simply query the database with the current handle and write the code directly in.

I'm off now to get help for the repetitive strain injury that I recieved from scrolling through all your code! Derren
[Mediocre talent - spread really thin]
 
JeremyG
on the print our page My code looks like this so I would have to edit it as well to do it that why.
<td width=&quot;40%&quot; height=&quot;13&quot; VALIGN=TOP>
<div><font color='#CCCCCC'>
<% Set MyFileObj = Server.CreateObject(&quot;Scripting.FileSystemObject&quot;)
Set ReadStream = MyFileObj.OpenTextFile(&quot;c:\user\chatuser.2035&quot;,1,false)
x=1
response.write &quot;&quot;
while not ReadStream.AtEndOfStream
Read=ReadStream.Readline
NameLegnth=Len(Read)
ColonPosition=InStr (Read, &quot;:&quot;)
Name=(NameLegnth-ColonPosition)
Handle=Right(Read, Name)
Response.write &quot;&quot;
%>
<!--#include file=&quot;modb.asp&quot; -->
<% Response.write &quot;&nbsp;&quot; & Handle & &quot;&nbsp;<BR></b></font><font color=#CCCCCC>&quot;
If x=3 then
Response.write &quot;&quot;
x=0
End If
x=x+1
Wend
Response.write &quot;&quot;
Set ReadStream=Nothing
%>

note the
<!--#include file=&quot;modb.asp&quot; -->
<% Response.write &quot;&nbsp;&quot; & Handle & &quot;&nbsp;<BR></b></font><font color=#CCCCCC>&quot;
how would I get the case to print out, see each
someone wants a name I have to type it out well as My site grows huh well it takes alot of My time.

I want the user to be able to add the name
 
I have a cgi userfile that makes a file like this
dgdfgd #00FF00
velvet{JTcm1} #00FF00
Anonymous #00FF00
Ramer #00FF00
Me #00FF00
Beth Stregha Witch #00FF00
| | | Tovah Heratic | #00FF00
Rouge #00FF00

and have asked over and over how to get it to print out
to the page

 
derren
What is Your suggestion how would I go about doing as You say?
 
MAWarGod:

What derren is saying, is that you could create a small database table with a couple of fields....

Table - User

ID - Long (PK)
Username - String
DisplayColor - String

Then add all your users into the user database table...

1
&quot;Ramer&quot;
&quot;00FF00&quot;

2
&quot;Me&quot;
&quot;00FF00&quot;

etc

For databases you could use anything from Access to MySql (free), or SQL Server 2000.

If you don't know how to use any of these databases, you will need to pick up a text book nearest you now, because it is definitely something you will need to know to build online portals.


If you do know... then simply when somebody logs in with a username... lookup their display color in the database...

ie.

When somebody logs in...

sql = &quot;select username, displaycolor from user where username = '&quot; & varFromFormThatContainsUsername & &quot;';&quot;

Set RS = DataConn.Execute(sql)


Now, RS contains the displaycolor to use for your display...

Response.write &quot;<b><font color='&quot; & RS(&quot;displaycolor&quot;) & &quot;'>&quot; & RS(&quot;username&quot;) & &quot;</font>&quot;


This type of method that derren is talking about is almost completed code! That means the entire 500 lines of your code can be a tiny bit bigger than i have just given you!

ie. It will look up the users color and display it, nobody who it is! and it is extensible... you have a new user, just add them to your database, add their appropriate color, and when they log in, they will get their color! You wouldn't need to add to the code ever again!

Even if you don't understand the code, you should be able to understand the benefits now of using a database method instead.

Good luck :)

Brett Birkett B.Comp
Systems Analyst
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top