Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > Simple script problem

Thread Tools

Simple script problem

Alex Kouzemtchenko
Posts: n/a
I have a very simple piece of Javascript code which generates some
code, but the code it generates does not display properly but if
pasted into another docmuent it shows properly.

the code is:


<title>IE Scroll Bars</title>
function create(){

var dlight = document.spell.dlight.value
var arrow = document.spell.arrow.value
var face = document.spell.face.value
var highlight = document.spell.highlight.value
var shadow = document.spell.shadow.value
var darkshadow = document.spell.darkshadow.value
var track = document.spell.track.value
document.write ("<html><head><title>n00bVi11e</title></head>");
document.write ("<body text=\"#666666\" BGCOLOR=\"#000000\">");
document.write ("<form>");
document.write (" <table width=\"921\" border=\"0\" cellspacing=\"1\"
cellpadding=\"1\" height=\"106\">");
document.write (" <tr>");
document.write (" <td width=\"236\"> </td>");
document.write (" <td width=\"678\">");
document.write (" <table width=\"521\" border=\"0\" cellspacing=\"1\"
cellpadding=\"1\" height=\"73\" bgcolor=\"#f8f8f8\">");
document.write (" <tr> ");
document.write (" <td class=\"bdr2\"><font face=\"verdana, arial,
helvetica, sans-serif\" size=\"2\" color=\"#003068\">the ");
document.write (" scrollbars on this page are an example of how yours
will look.</font></td>");
document.write (" </tr>");
document.write (" </table>");
document.write (" </td>");
document.write (" </tr>");
document.write (" </table>");
document.write (" <table border=\"0\" cellpadding=\"0\"
cellspacing=\"0\" bgcolor=\"#999999\" align=\"center\">");
document.write (" <tr><td>");
document.write (" <table border=\"0\" cellpadding=\"3\"
cellspacing=\"1\" bgcolor=\"#006699\" width=\"543\"
document.write (" <tr> ");
document.write (" <td bgcolor=\"#ffffff\" align=\"center\"> <font
size=\"2\" face=\"verdana, arial, helvetica, sans-serif\"
color=\"#003366\">here ");
document.write (" is your custom scrollbar code:</font><br>");
document.write ("<textarea name=\"cpcode1\" cols=\"60\" rows=\"11\"
style=\"color:#000080;background-color:#fafafa\" wrap=\"VIRTUAL\"> ");
document.write ("BODY {");
document.write ("scrollbar-face-color: " + face + ";");
document.write ("scrollbar-shadow-color: " + shadow + ";");
document.write ("scrollbar-highlight-color: " + highlight + ";");
document.write ("scrollbar-3dlight-color: " + dlight + ";");
document.write ("scrollbar-darkshadow-color: " + darkshadow + ";");
document.write ("scrollbar-track-color: " + track + ";");
document.write ("scrollbar-arrow-color: " + arrow + "; ");
document.write ("}");
document.write ("</textarea>");
document.write ("</form>");
document.write ("</body></html>");

<body text="#666666" bgcolor="#000000">

<form name="spell" method="post" action="">
<table width="328" border="0" cellspacing="0" cellpadding="1"
align="left" height="193">
<td width="131">3D Light Colour:</td>
<td width="193"> <input type="text" name="dlight"> </td>
<td width="131">Arrow Colour:</td>
<td width="193"> <input type="text" name="arrow"> </td>
<td width="131">Face Colour:</td>
<td width="193"> <input type="text" name="face"> </td>
<td width="131">Highlight Colour:</td>
<td width="193"> <input type="text" name="highlight"> </td>
<td width="131">Shadow Colour:</td>
<td width="193"> <input type="text" name="shadow"> </td>
<td width="131">Darkshadow Colour:</td>
<td width="193"> <input type="text" name="darkshadow"> </td>
<td width="131" height="16">Track Colour:</td>
<td width="193" height="16"> <input type="text" name="track"> </td>
<td width="131"> </td>
<td width="193" align="left">
<input onClick="create()" type="submit" value="Submit" name="B1">
<input type="reset" value="Reset" name="B2"> </td>


PLease help
Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to execute a script from another script and other script does notdo busy wait. Rajat Python 3 01-08-2010 02:05 PM
RE: How to execute a script from another script and other script doesnotdo busy wait. VYAS ASHISH M-NTB837 Python 2 01-07-2010 08:18 PM
Converting a simple python script to a simple windows executable geoffbache Python 5 06-13-2008 08:51 PM
How to call a simple perl script from HTML without need of HTTPS but simple HTTP ? Wladimir Borsov Perl Misc 4 05-11-2006 09:29 AM
Simple problem with a simple chat script dillon Javascript 1 11-17-2003 11:11 PM