luvhartz
10-16-2005, 05:36 PM
ergh, I'n having serious problems with this form thing.. i thought I'd try something new. lol. So yeh Basically its a 4 option form that generates the HTML for you.. yeh? ok... well, the problem is everything you choose after the bodybackground colour option just doesnt show..
Thanks in advance. Much <3 Kerry.
The coding
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
<HEAD>
<TITLE></TITLE>
<SCRIPT LANGUAGE="JavaScript">
<!--
function gen(pagetitle, backg, content)
{
win=window.open("","win","toolbar=0,location=0,status=0,menubar=0,scrollbars =0,resizable=1,width=200,height=200")
//create html document, and add user_defind title
win.document.write("<html><head><title>"+pagetitle);
//close <title> tag and <head> tag and open <body> tag also change page colors
win.document.write("</title></head><body bgcolor='"+backg+"'>");
//make the header at the top of the page
win.document.write("<h1>"+pagehead+"</h1>");
//make the page content
win.document.write("<br>"+content);
//close <body> tag and <html> tag
win.document.write("</body></html>");
}
//-->
</SCRIPT>
</HEAD>
<BODY>
<FORM NAME=form>
Page Title (the bit in the very top bar, along with the minimise button etc... and the big text along the top of the page):<BR><INPUT TYPE="text" NAME="pagetitle" SIZE="20">
<BR><BR>
Background Color: <select NAME="backg">
<option value="$blue" selected="selected">blue</option>
<option value="#000000">black</option>
<option value="$FFFFFF">white</option>
<option value="$orange">orange</option>
<option value="$green">green</option></select>
<BR><BR>
Page Heading:<BR><INPUT TYPE="text" NAME="pagehead" SIZE="20">
<BR><BR>
Page Content:<BR><TEXTAREA NAME="content" ROWS="5" COLS="40"></TEXTAREA><BR><BR>
<BUTTON ONCLICK="gen(this.form.pagetitle.value, this.form.backg.value, this.form.pagehead.value, this.form.content.value)">Create Page</BUTTON>
</FORM>
</BODY>
</HTML>
And example of what is the end result of generation:
<html><head><title>ghjtj</title></head><body bgcolor='#FFFFFF'>
Thanks in advance. Much <3 Kerry.
The coding
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
<HEAD>
<TITLE></TITLE>
<SCRIPT LANGUAGE="JavaScript">
<!--
function gen(pagetitle, backg, content)
{
win=window.open("","win","toolbar=0,location=0,status=0,menubar=0,scrollbars =0,resizable=1,width=200,height=200")
//create html document, and add user_defind title
win.document.write("<html><head><title>"+pagetitle);
//close <title> tag and <head> tag and open <body> tag also change page colors
win.document.write("</title></head><body bgcolor='"+backg+"'>");
//make the header at the top of the page
win.document.write("<h1>"+pagehead+"</h1>");
//make the page content
win.document.write("<br>"+content);
//close <body> tag and <html> tag
win.document.write("</body></html>");
}
//-->
</SCRIPT>
</HEAD>
<BODY>
<FORM NAME=form>
Page Title (the bit in the very top bar, along with the minimise button etc... and the big text along the top of the page):<BR><INPUT TYPE="text" NAME="pagetitle" SIZE="20">
<BR><BR>
Background Color: <select NAME="backg">
<option value="$blue" selected="selected">blue</option>
<option value="#000000">black</option>
<option value="$FFFFFF">white</option>
<option value="$orange">orange</option>
<option value="$green">green</option></select>
<BR><BR>
Page Heading:<BR><INPUT TYPE="text" NAME="pagehead" SIZE="20">
<BR><BR>
Page Content:<BR><TEXTAREA NAME="content" ROWS="5" COLS="40"></TEXTAREA><BR><BR>
<BUTTON ONCLICK="gen(this.form.pagetitle.value, this.form.backg.value, this.form.pagehead.value, this.form.content.value)">Create Page</BUTTON>
</FORM>
</BODY>
</HTML>
And example of what is the end result of generation:
<html><head><title>ghjtj</title></head><body bgcolor='#FFFFFF'>