This code is ment to generate a CSS style page, but for some reason when I press the Generate button it doesn't print the code in the textarea. Any Ideas?
Thanks for the helpCode:<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <SCRIPT LANGUAGE="JavaScript"> <!-- Begin function View(form) { msg=open("","DisplayWindow","status=1,scrollbars=1"); msg.document.write(form.Text2.value); } function Generate(form) { "<style type="text/css">" txt="{" var txt="body {background-color: "+form.MainBackground.value+"}\r\n"; var txt+="{background-image: url"+form.MainBackgroundImage.value+"}\r\n"; var txt+="{font-family:"+form.PageFont.value+"}\r\n"; var txt+="{color:"+form.MainTextColor.value+"}\r\n"; var txt+="{font-size:"+form.MainTextSize.value+"}\r\n"; var txt="}" var txt+="{font-size:"+form.Link.value+"}\r\n"; var txt+="{font-size:"+form.LinkHover.value+"}\r\n"; var txt+="{font-size:"+form.LinkVisited.value+"}\r\n"; var txt+="{font-size:"+form.LinkActive.value+"}\r\n"; form.Text2.value=txt; } function AddText(form, Action){ var AddTxt=""; var txt=""; if(Action==1){ txt=prompt("Text for the level 1 header.","Text"); if(txt!=null) AddTxt="<h1>"+txt+"</h1>\r\n"; } if(Action==2){ txt=prompt("Text for the level 2 header.","Text"); if(txt!=null) AddTxt="<h2>"+txt+"</h2>\r\n"; } if(Action==3){ txt=prompt("Text for the level 3 header.","Text"); if(txt!=null) AddTxt="<h3>"+txt+"</h3>\r\n"; } if(Action==4) { txt=prompt("Text to be made BOLD.","Text"); if(txt!=null) AddTxt="<b>"+txt+"</b>"; } if(Action==5) { txt=prompt("Text to be italicized","Text"); if(txt!=null) AddTxt="<i>"+txt+"</i>"; } if(Action==6) AddTxt="\r\n<p>"; if(Action==7) AddTxt="<BR>\r\n"; if(Action==8) AddTxt="<hr>\r\n"; if(Action==9) { txt=prompt("URL for the link.","http://"); if(txt!=null){ AddTxt="<a href="+txt+">"; txt=prompt("Text to be show for the link","Text"); AddTxt+=txt+"</a>\r\n"; } } if(Action==10) { txt=prompt("URL for graphic","URL"); if(txt!=null) AddTxt="<img src="+txt+">\r\n"; } form.Text1.value+=AddTxt; } function ResetPage(form) { if(confirm("Reset the page?")) { form.MainBackground.value=""; form.MainBackgroundImage.value=""; form.PageFont.value=""; form.MainTextColor.value=""; form.MainTextSize.value=""; form.Fav1Title.value=""; form.Fav2URL.value=""; form.Fav2Title.value=""; form.Fav3URL.value=""; form.Fav3Title.value=""; form.Fav4URL.value=""; form.Fav4Title.value=""; form.Fav5URL.value=""; form.Fav5Title.value=""; form.Fav6URL.value=""; form.Fav6Title.value=""; } } // End --> </SCRIPT> <title>Web Page Stylize</title> <style type="text/css"> <!-- .style1 { color: #FFFFFF; font-weight: bold; } .style3 {font-size: 12px} --> </style> </head> <body> <CENTER> <font face="Verdana, Arial, Helvetica, sans-serif"> <FORM ACTION=""> <TABLE border=0 class="style3"> <TR bgcolor="#660000"> <TD colspan="2"> <div align="center" class="style1">Stylize Your Page</div> <TR> <TD width="204">Page Background Color: <TD width="376"><input name="MainBackground" type="text" size=10 maxlength="6"> <TR> <TD>Page Background Image Url: <TD><input name="MainBackgroundImage" type="text" size=30> Fixed: <input name="BackgroundImage1" type="radio" value="BackgroundImageFixed" checked> Scroll: <input name="BackgroundImage1" type="radio" value="BackgroundImageScroll"> <TR> <TD>Font Face: <TD><input name="PageFont" type="text" size=30> <TR><TD>Text Color: <TD> <input type="text" name="MainTextColor" size=10 maxlength="6"> <TR> <TD>Text Size: (1 - 99) <TD><input type="text" name="MainTextSize" size=10 maxlength="2"> <TR><TD><div align="left" class="style3">Link Color: </div> <TD> <div align="left"> <input type="text" name="Link" size=10 maxlength="6"> None:<strong> <input type="checkbox" name="LinkNone" value="checkbox"> Bold:</strong> <input type="checkbox" name="LinkBold" value="checkbox"> <em>Italic:</em> <input type="checkbox" name="LinkItalic" value="checkbox"> <u>Underline:</u> <input type="checkbox" name="LinkUnderline" value="checkbox"> </div> <TR> <TD>Hover Link Color: <TD><input type="text" name="LinkHover" size=10 maxlength="6"> None:<strong> <input type="checkbox" name="LinkHoverNone" value="checkbox"> Bold:</strong> <input type="checkbox" name="LinkHoverBold" value="checkbox"> <em>Italic:</em> <input type="checkbox" name="LinkHoverItalic" value="checkbox"> <u>Underline:</u> <input type="checkbox" name="LinkHoverUnderline" value="checkbox"> <TR> <TD>Visited Link Color: <TD><input type="text" name="LinkVisited" size=10 maxlength="6"> None:<strong> <input type="checkbox" name="LinkVisitedNone" value="checkbox"> </strong> <strong>Bold:</strong> <input type="checkbox" name="LinkVisitedBold" value="checkbox"> <em>Italic:</em> <input type="checkbox" name="LinkVisitedItalic" value="checkbox"> <u>Underline:</u> <input type="checkbox" name="LinkVisitedUnderline" value="checkbox"> <TR> <TD>Active Link Color: <TD><input type="text" name="LinkActive" size=10 maxlength="6"> None:<strong> <input type="checkbox" name="LinkActiveNone" value="checkbox"> Bold:</strong> <input type="checkbox" name="LinkActiveBold" value="checkbox"> <em>Italic:</em> <input type="checkbox" name="LinkActiveItalic" value="checkbox"> <u>Underline:</u> <input type="checkbox" name="LinkActiveUnderline" value="checkbox"> <TR bgcolor="#660000"> <TD colspan="2"><div align="center" class="style1">Textarea Stylize</div> <TR> <TD>Background Color: <TD><input type="text" name="TextareaBg" size=10 maxlength="6"> <TR> <TD>Background Image URL: <TD><input name="TextareaBackgroundImage" type="text" size=30> <TR> <TD>Border Color: <TD><input type="text" name="TextareaBorder" size=10 maxlength="6"> <TR> <TD>Border Size: (1 - 99) <TD><input type="text" name="TextareaBorderSize" size=10 maxlength="2"> <TR> <TD>Text Color: <TD><input type="text" name="TextareaTextColor" size=10 maxlength="6"> <TR> <TD>Font Size: (1 - 99) <TD><input type="text" name="TextareaFontSize" size=10 maxlength="2"> <TR bgcolor="#660000"> <TD colspan=2> <div align="center" class="style1">Input Stylize</div> <TR> <TD>Background Color: <TD><input type="text" name="InputBg" size=10 maxlength="6"> <TR> <TD>Border Color: <TD><input type="text" name="InputBorderColor" size=10 maxlength="6"> <TR> <TD>Text Color: <TD><input type="text" name="InputTextColor" size=10 maxlength="6"> <TR> <TD>Font Size: (1 - 99) <TD><input type="text" name="InputFontSize" size=10 maxlength="2"> <TR bgcolor="#660000"> <TD colspan=2> <div align="center" class="style1"> Select, Option Stylize</div> <TR> <TD>Background Color: <TD><input type="text" name="SelectBg" size=10 maxlength="6"> <TR> <TD>Text Color: <TD><input type="text" name="SelectTextColor" size=10 maxlength="6"> <TR> <TD>Font Size: (1 - 99) <TD><input type="text" name="SelectSize" size=10 maxlength="2"> <TR bgcolor="#660000"> <TD colspan="2"> <div align="center" class="style1">Scroll Bar Colors </div> <TR> <TD>Scrollbar Face Color: <TD><input type="text" name="ScrollFace" size=10 maxlength="6"> <TR> <TD>Scrollbar Arrow Color: <TD><input type="text" name="ScrollArrow" size=10 maxlength="6"> <TR> <TD>Scrollbar Track Color: <TD><input type="text" name="ScrollTrack" size=10 maxlength="6"> <TR> <TD>Scrollbar Shadow Color: <TD><input type="text" name="ScrollShadow" size=10 maxlength="6"> <TR> <TD>Scrollbar Highlight Color (RBG): <TD><input type="text" name="ScrollHighlightR" size=2 maxlength="3"> <input type="text" name="ScrollHighlightB" size=2 maxlength="3"> <input type="text" name="ScrollHighlightG" size=2 maxlength="3"> <TR> <TD>Scrollbar 3dlight Color: <TD><input type="text" name="Scroll3D" size=10 maxlength="6"> <TR> <TD>Scrollbar Darkshadow Color: <TD><input type="text" name="ScrollDarkShadow" size=10 maxlength="6"> <TD colspan="2"> <TR> <TD colspan="2"> <TR align=center><TD colspan=2><input type="button" value="Get Code" onClick="Generate(this.form);"> </TABLE> <HR> <input name="Reset" type="reset" onClick="ResetPage(this.form);" value="Reset"><BR> <textarea name="Text2" rows=20 Cols=70></textarea> </FORM> </CENTER> </font> </body> </html>


Reply With Quote
Bookmarks