Tasmanian Devil
05-31-2003, 09:58 AM
why does this script work in IE not Netscape?
<head>
<style type="text/css">
.pane {
display : none;
}
td.tabs {
border-top : light outset white;
border-left : light outset white;
}
div.tabs {
background-color : #ffffff;
cursor : hand;
}
</style>
<style type="text/css">
body {
background-color : #ffffff;
}
input.txt {
position : absolute;
left : 120px;
}
input.chk {
position : relative;
}
</style>
<script type="text/javascript">
var currentPaneStyle = 0;
var currentTab = 0;
function tabstrip()
{
this.tabs = new Array();
this.add = addTab;
this.write = writeTabstrip;
}
function tab(caption,content)
{
this.setId = setId;
this.caption = caption;
this.content = content;
this.write = writeTab;
this.writeContent = writePane;
}
function addTab(tab)
{
tab.setId("tab" + this.tabs.length);
this.tabs[this.tabs.length] = tab;
}
function setId(id)
{
this.id = id;
}
function initiate()
{
var div = document.getElementById("tab0");
showPane(div);
}
function showPane(div)
{
if(currentTab != 0)
{
currentTab.style.backgroundColor = "#ffffff";
}
div.style.backgroundColor = "#ffffff";
currentTab = div;
if(currentPaneStyle != 0)
currentPaneStyle.display = "none";
var paneId = "pn_" + div.id;
var objPaneStyle = document.getElementById(paneId).style;
objPaneStyle.display = "block";
currentPaneStyle = objPaneStyle;
}
function SubmitForm()
{
tabform.submit();
}
function writePane()
{
document.write("<div class='pane' id='pn_" + this.id + "'>" + this.content + "</div>");
}
function writeTab()
{
document.write("<td class='tabs'><div class='tabs' id='" + this.id + "' onclick='showPane(this)'>" + this.caption + "</div></td>");
}
function writeTabstrip()
{
document.write("<table class='tabs'><tr>");
for(var i = 0; i < this.tabs.length; i++)
{
this.tabs[i].write();
}
document.write("</tr></table>"); for(var k = 0; k < this.tabs.length; k++)
{
this.tabs[k].writeContent();
}
initiate();
}
</script>
</head>
<body onUnload="spawntopfivewindow();">
<script language="Javascript" src="fctrack.js">
</script>
<div align="center">
<pre><b><font size="+7" color="#000000" face="Times New Roman, Times, serif">Fox Valley Newspapers</font><font face="Comic Sans MS" size="+7" color="#000000">
<font face="Verdana, Arial, Helvetica, sans-serif" size="4" color="#FF0000">To Subscribe to the newspaper(s)
for your choice please fill out
the following form.</font></font></b></pre>
<p>Once all of the contact information is filled out, just click on the newspaper
choices </p>
<p>(put a check next to the paper and click when you would like to receive it if applicable), then
click the billing options</p>
</div>
<form name="tabform" method="post" action="cgi-t/form.cgi">
<p>
<script type="text/javascript">
var pane2 = "<table border=10><tr><td>Newspaper Choices:<br><input type='checkbox' name='Barrons Paper' value='Subscribe Me'>Barron's </input><br><input type='checkbox' name='Chicago Suntimes Paper' value='Subscribe Me'>Chicago Suntimes</input><br><input type='checkbox' name='Fincanial Times Paper' value='Subscribe Me'> Fincanial Times</input><br><input type='checkbox' name='Investor Business Paper' value='Subscribe Me'> Investor Business </input><br><input type='checkbox' name='New York Times Paper' value='Subscribe Me'>New York Times</input><br><input type='checkbox' name='Wall Street Journal Paper' value='Subscribe Me'> Wall Street Journal</input><br><td rowspan=2>Full Week:<br><input type='radio' name= ‘Barrons' value=’Full Week’>N/A</input><br><input type='radio' name='Chicago Suntimes' value=' Full Week'>N/A</input><br><input type='radio' name='Fincanial Times' value=' Full Week '>N/A</input><br><input type='radio' name='Investor Business' value='Full Week '>N/A</input><br><input type='radio' name='New York Times' value='Full Week'>$49.00</input><br><input type='radio' name='Wall Street Journal' value='Full Week'>N/A</input><br><td rowspan=3>Monday - Friday:<br><input type='radio' name= ‘Barrons' value='Monday - Friday'>N/A</input><br><input type='radio' name='Chicago Suntimes ' value='Monday - Friday'>N/A</input><br><input type='radio' name='Fincanial Times' value='Monday - Friday'>$7.00</input><br><input type='radio' name='Investor Business' value='Monday - Friday'>$7.00</input><br><input type='radio' name='New York Times' value='Monday - Friday'>N/A</input><br><input type='radio' name='Wall Street Journal' value='Monday - Friday'>$6.00</input><br><td rowspan=4>Monday - Saturday:<br><input type='radio' name= ‘Barrons' value='Monday - Saturday'>N/A</input><br><input type='radio' name='Chicago Suntimes ' value='Monday - Saturday'>N/A</input><br><input type='radio' name='Fincanial Times' value='Monday - Saturday'>N/A</input><br><input type='radio' name='Investor Business' value='Monday - Saturday'>N/A</input><br><input type='radio' name='New York Times'value='Monday - Saturday'>$28.00</input><br><input type='radio' name='Wall Street Journal' value='Monday - Saturday'>N/A</input><br><td rowspan=6>Saturday Only:<br><input type='radio' name=‘Barrons' value='Saturday Only'>$3.75</input><br><input type='radio' name='Chicago Suntimes ' value='Saturday Only'>N/A</input><br><input type='radio' name='Fincanial Times’ value='Saturday Only'>$1.25</input><br><input type='radio' name='Investor Business' value='Saturday Only'>N/A</input><br><input type='radio' name='New York Times' value='Saturday Only'>N/A</input><br><input type='radio' name='Wall Street Journal' value='Saturday Only'>N/A</input><br><td rowspan=7>Sunday Only:<br><input type='radio' name=‘Barrons' value='Sunday Only'>N/A</input><br><input type='radio' name='Chicago Suntimes ' value='Sunday Only'>$2</input><br><input type='radio' name='Fincanial Times' value='Sunday Only'>N/A</input><br><input type='radio' name='Investor Business' value='Sunday Only'>N/A</input><br><input type='radio' name='New York Times' value='Sunday Only'>$22.00</input><br><input type='radio' name='Wall Street Journal' value='Sunday Only'>N/A</input><br><td rowspan=8>Weekend Only:<br><input type='radio' name=‘Barrons' value='Weekend Only'>N/A</input><br><input type='radio' name='Chicago Suntimes ' value='Weekend Only'>N/A</input><br><input type='radio' name='Fincanial Times' value='Weekend Only'>N/A</input><br><input type='radio' name='Investor Business' value='Weekend Only'>N/A</input><br><input type='radio' name='New York Times' value='Weekend Only'>$27.00</input><br><input type='radio' name='Wall Street Journal' value='Weekend Only'>N/A</input></table>";
var pane1 = "First Name: <input type='text' class='txt' name='First Name' size=20></input><br><br>Last Name: <input type='text' class='txt' name='Last Name' size=20></input><br><br>Address: <input type='text' class='txt' name='Address' size=20></input><br><br>Apartment: <input type='text' class='txt' name='Apartment' size=20></input><br><br>City: <input type='text' class='txt' name='City' size=20></input><br><br>State: <input type='text' class='txt' name='State' value='Wisconsin' onFocus='this.blur()' size=20></input><br><br>ZIP:<input type='text' class='txt' name='Zip'size=20></input><br><br>E-Mail:<input type='text' class='txt' name='E-Mail' size=20></input><br><br>Home Phone: <input type='text' class='txt' name='Home Phone' size=20 onChange=fmtPhoneno(this);></input><br><br>Work Phone: <input type='text' class='txt' name='Work Phone' size=20 onChange=fmtPhoneno(this);></input>";
var pane3 = "<table border=0><tr><td>Bill Me For:<br><input type='radio' name='Bill Me For' value='1 Month'>1 Month</input><br><input type='radio' name='Bill Me For' value='3 Months'>3 Months</input><br><input type='radio' name='Bill Me For' value='6 Months'>6 Months</input></td>";
var pane4 = "<table border=0><tr><td></td>";
var ts = new tabstrip();
var t1 = new tab("Contact Information",pane1);
var t2 = new tab("Newspaper Choices",pane2);
var t3 = new tab("Billing Options",pane3);
var t4 = new tab("",pane4);
ts.add(t1);
ts.add(t2);
ts.add(t3);
ts.add(t4);
ts.write();
</script>
<input type=hidden name="to" value=" subscribe@foxvalleynews.com">
<input type=hidden name="redirect" value="http://foxvalleynews.com/thank you for your subscription.html">
<input type=hidden name="subject" value="Fox Valley Area Subscription">
<input type=HIDDEN name=from value="subscribe@foxvalleynews.com">
<input type=hidden name="required" value="First Name,Last Name,Address,City,Zip,E-Mail,Bill Me For">
<input type=hidden name="print_blank_fields" value="1">
</p>
</form>
<button onclick="SubmitForm()">Subscribe Me Now</button>
<form name="form1" method="post" action="">
</form>
<p> </p>
<img src="http://www.foxvalleynews.com/cgi-t/counter?df=foxvalleynews.com.FoxValleyArea&sh=0">
</body>
Can anyone help me? I love the script but needs to work in Netscape.
Thanks
<head>
<style type="text/css">
.pane {
display : none;
}
td.tabs {
border-top : light outset white;
border-left : light outset white;
}
div.tabs {
background-color : #ffffff;
cursor : hand;
}
</style>
<style type="text/css">
body {
background-color : #ffffff;
}
input.txt {
position : absolute;
left : 120px;
}
input.chk {
position : relative;
}
</style>
<script type="text/javascript">
var currentPaneStyle = 0;
var currentTab = 0;
function tabstrip()
{
this.tabs = new Array();
this.add = addTab;
this.write = writeTabstrip;
}
function tab(caption,content)
{
this.setId = setId;
this.caption = caption;
this.content = content;
this.write = writeTab;
this.writeContent = writePane;
}
function addTab(tab)
{
tab.setId("tab" + this.tabs.length);
this.tabs[this.tabs.length] = tab;
}
function setId(id)
{
this.id = id;
}
function initiate()
{
var div = document.getElementById("tab0");
showPane(div);
}
function showPane(div)
{
if(currentTab != 0)
{
currentTab.style.backgroundColor = "#ffffff";
}
div.style.backgroundColor = "#ffffff";
currentTab = div;
if(currentPaneStyle != 0)
currentPaneStyle.display = "none";
var paneId = "pn_" + div.id;
var objPaneStyle = document.getElementById(paneId).style;
objPaneStyle.display = "block";
currentPaneStyle = objPaneStyle;
}
function SubmitForm()
{
tabform.submit();
}
function writePane()
{
document.write("<div class='pane' id='pn_" + this.id + "'>" + this.content + "</div>");
}
function writeTab()
{
document.write("<td class='tabs'><div class='tabs' id='" + this.id + "' onclick='showPane(this)'>" + this.caption + "</div></td>");
}
function writeTabstrip()
{
document.write("<table class='tabs'><tr>");
for(var i = 0; i < this.tabs.length; i++)
{
this.tabs[i].write();
}
document.write("</tr></table>"); for(var k = 0; k < this.tabs.length; k++)
{
this.tabs[k].writeContent();
}
initiate();
}
</script>
</head>
<body onUnload="spawntopfivewindow();">
<script language="Javascript" src="fctrack.js">
</script>
<div align="center">
<pre><b><font size="+7" color="#000000" face="Times New Roman, Times, serif">Fox Valley Newspapers</font><font face="Comic Sans MS" size="+7" color="#000000">
<font face="Verdana, Arial, Helvetica, sans-serif" size="4" color="#FF0000">To Subscribe to the newspaper(s)
for your choice please fill out
the following form.</font></font></b></pre>
<p>Once all of the contact information is filled out, just click on the newspaper
choices </p>
<p>(put a check next to the paper and click when you would like to receive it if applicable), then
click the billing options</p>
</div>
<form name="tabform" method="post" action="cgi-t/form.cgi">
<p>
<script type="text/javascript">
var pane2 = "<table border=10><tr><td>Newspaper Choices:<br><input type='checkbox' name='Barrons Paper' value='Subscribe Me'>Barron's </input><br><input type='checkbox' name='Chicago Suntimes Paper' value='Subscribe Me'>Chicago Suntimes</input><br><input type='checkbox' name='Fincanial Times Paper' value='Subscribe Me'> Fincanial Times</input><br><input type='checkbox' name='Investor Business Paper' value='Subscribe Me'> Investor Business </input><br><input type='checkbox' name='New York Times Paper' value='Subscribe Me'>New York Times</input><br><input type='checkbox' name='Wall Street Journal Paper' value='Subscribe Me'> Wall Street Journal</input><br><td rowspan=2>Full Week:<br><input type='radio' name= ‘Barrons' value=’Full Week’>N/A</input><br><input type='radio' name='Chicago Suntimes' value=' Full Week'>N/A</input><br><input type='radio' name='Fincanial Times' value=' Full Week '>N/A</input><br><input type='radio' name='Investor Business' value='Full Week '>N/A</input><br><input type='radio' name='New York Times' value='Full Week'>$49.00</input><br><input type='radio' name='Wall Street Journal' value='Full Week'>N/A</input><br><td rowspan=3>Monday - Friday:<br><input type='radio' name= ‘Barrons' value='Monday - Friday'>N/A</input><br><input type='radio' name='Chicago Suntimes ' value='Monday - Friday'>N/A</input><br><input type='radio' name='Fincanial Times' value='Monday - Friday'>$7.00</input><br><input type='radio' name='Investor Business' value='Monday - Friday'>$7.00</input><br><input type='radio' name='New York Times' value='Monday - Friday'>N/A</input><br><input type='radio' name='Wall Street Journal' value='Monday - Friday'>$6.00</input><br><td rowspan=4>Monday - Saturday:<br><input type='radio' name= ‘Barrons' value='Monday - Saturday'>N/A</input><br><input type='radio' name='Chicago Suntimes ' value='Monday - Saturday'>N/A</input><br><input type='radio' name='Fincanial Times' value='Monday - Saturday'>N/A</input><br><input type='radio' name='Investor Business' value='Monday - Saturday'>N/A</input><br><input type='radio' name='New York Times'value='Monday - Saturday'>$28.00</input><br><input type='radio' name='Wall Street Journal' value='Monday - Saturday'>N/A</input><br><td rowspan=6>Saturday Only:<br><input type='radio' name=‘Barrons' value='Saturday Only'>$3.75</input><br><input type='radio' name='Chicago Suntimes ' value='Saturday Only'>N/A</input><br><input type='radio' name='Fincanial Times’ value='Saturday Only'>$1.25</input><br><input type='radio' name='Investor Business' value='Saturday Only'>N/A</input><br><input type='radio' name='New York Times' value='Saturday Only'>N/A</input><br><input type='radio' name='Wall Street Journal' value='Saturday Only'>N/A</input><br><td rowspan=7>Sunday Only:<br><input type='radio' name=‘Barrons' value='Sunday Only'>N/A</input><br><input type='radio' name='Chicago Suntimes ' value='Sunday Only'>$2</input><br><input type='radio' name='Fincanial Times' value='Sunday Only'>N/A</input><br><input type='radio' name='Investor Business' value='Sunday Only'>N/A</input><br><input type='radio' name='New York Times' value='Sunday Only'>$22.00</input><br><input type='radio' name='Wall Street Journal' value='Sunday Only'>N/A</input><br><td rowspan=8>Weekend Only:<br><input type='radio' name=‘Barrons' value='Weekend Only'>N/A</input><br><input type='radio' name='Chicago Suntimes ' value='Weekend Only'>N/A</input><br><input type='radio' name='Fincanial Times' value='Weekend Only'>N/A</input><br><input type='radio' name='Investor Business' value='Weekend Only'>N/A</input><br><input type='radio' name='New York Times' value='Weekend Only'>$27.00</input><br><input type='radio' name='Wall Street Journal' value='Weekend Only'>N/A</input></table>";
var pane1 = "First Name: <input type='text' class='txt' name='First Name' size=20></input><br><br>Last Name: <input type='text' class='txt' name='Last Name' size=20></input><br><br>Address: <input type='text' class='txt' name='Address' size=20></input><br><br>Apartment: <input type='text' class='txt' name='Apartment' size=20></input><br><br>City: <input type='text' class='txt' name='City' size=20></input><br><br>State: <input type='text' class='txt' name='State' value='Wisconsin' onFocus='this.blur()' size=20></input><br><br>ZIP:<input type='text' class='txt' name='Zip'size=20></input><br><br>E-Mail:<input type='text' class='txt' name='E-Mail' size=20></input><br><br>Home Phone: <input type='text' class='txt' name='Home Phone' size=20 onChange=fmtPhoneno(this);></input><br><br>Work Phone: <input type='text' class='txt' name='Work Phone' size=20 onChange=fmtPhoneno(this);></input>";
var pane3 = "<table border=0><tr><td>Bill Me For:<br><input type='radio' name='Bill Me For' value='1 Month'>1 Month</input><br><input type='radio' name='Bill Me For' value='3 Months'>3 Months</input><br><input type='radio' name='Bill Me For' value='6 Months'>6 Months</input></td>";
var pane4 = "<table border=0><tr><td></td>";
var ts = new tabstrip();
var t1 = new tab("Contact Information",pane1);
var t2 = new tab("Newspaper Choices",pane2);
var t3 = new tab("Billing Options",pane3);
var t4 = new tab("",pane4);
ts.add(t1);
ts.add(t2);
ts.add(t3);
ts.add(t4);
ts.write();
</script>
<input type=hidden name="to" value=" subscribe@foxvalleynews.com">
<input type=hidden name="redirect" value="http://foxvalleynews.com/thank you for your subscription.html">
<input type=hidden name="subject" value="Fox Valley Area Subscription">
<input type=HIDDEN name=from value="subscribe@foxvalleynews.com">
<input type=hidden name="required" value="First Name,Last Name,Address,City,Zip,E-Mail,Bill Me For">
<input type=hidden name="print_blank_fields" value="1">
</p>
</form>
<button onclick="SubmitForm()">Subscribe Me Now</button>
<form name="form1" method="post" action="">
</form>
<p> </p>
<img src="http://www.foxvalleynews.com/cgi-t/counter?df=foxvalleynews.com.FoxValleyArea&sh=0">
</body>
Can anyone help me? I love the script but needs to work in Netscape.
Thanks