fionaom87
02-27-2009, 08:44 PM
hey i am having a problem with hosting my pages. They work fine on my laptop but when i upload them my javascript doesnt seem to be working.
My buttons dont seem to be working below at all and ive tried everything. any help would be great times not really on my side.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<!-- This is my page with my WINDOWS and you can retrieve a quote from it -->
<html>
<head>
<title>PREMIER WINDOWS AND DOORS. QUOTE RETRIEVAL</title>
<link rel="stylesheet" type="text/css" href="style.css" media="screen" />
<script language=javascript>
<!-- hide
function write_to_field(code)
{
var found = false;
var i =0;
while ((found == false) && (i < document.form1.elements.length))
{i = i + 1
if (document.form1.elements[i].name == code)
{
found = true;
document.form1.elements[i].value = parent.item_quan(code);
}
}
}
function Loc_additem(code,price,desc,url)
{
self.parent.additem(code,price,desc,url);
write_to_field(code)
}
function Loc_subitem(code,price,desc)
{
self.parent.subitem(code,price,desc);
write_to_field(code)
}
function update_thiselem_page()
{
if (self!=parent)
parent.update_this_page()
}
<!-- End -->
</script>
</head>
<body bgcolor="#FFFFFF" alink="#FF0000">
<div id="header">
<div id="logo">
<h1>Premier Windows and Doors</h1>
<h3> Carraigtwohill, Co Cork</h3>
</div>
<!-- end #logo -->
<div id="menu">
<ul>
<li><a href="http://localhost/index2.html" target="_top">Home</a>
<li class="active"><a href="http://localhost/order/shopcartindex.html" target="_top">Products</a></li>
</ul>
</div>
<!-- end #menu -->
</div>
<form name=form1 action=""><!-- must be in code to WORK!!!!!!!-->
<div id="page">
<div id="content">
<div id="box41">
<img src="FYP/img18.jpg" alt="Windows"/></br>
</br>
<label> Bow Windows </label>
<br>
This Item Costs € 235.87 ex vat<P>
<input name=addbox type=button value="Add This Item To Quote" onclick=Loc_additem('Bow_Windows','235.97','incl_vat_€309.81','pagetwo.html')><br>
<input type=button name=subbox value="Subtract This Item" onclick=Loc_subitem('Bow_Windows','235.97','incl_vat_€309.81','pagetwo.html')><BR>
Quantity: <input type=text name=Bow_Windows size=2>
<hr>
<img src="FYP/img19.jpg" alt="Windows"/>
</br>
<label> Bay Windows </label>
<br>
This Item Costs € 195.00 ex vat<P>
<input name=addbox type=button value="Add This Item To Quote" onclick=Loc_additem('Bay_Windows','195.00','incl_vat_€221.00','pagetwo.html')><br>
<input type=button name=subbox value="Subtract This Item" onclick=Loc_subitem('Bay_Windows','195.00','incl_vat_€221.00','pagetwo.html')><BR>
Quantity: <input type=text name=Bay_Windows size=2>
<hr>
<img src="FYP/img20.jpg" alt="Windows"/>
</br>
<label> Speciality Type Windows </label>
<br>
This Item Costs € 195.00 ex vat<P>
<input name=addbox type=button value="Add This Item To Quote" onclick=Loc_additem('Speciality_Type_Windows','199.00','incl_vat_€225.00','pagetwo.html')><br>
<input type=button name=subbox value="Subtract This Item" onclick=Loc_subitem('Speciality_Type_Windows','199.00','incl_vat_€225.00','pagetwo.html')><BR>
Quantity:<input type=text name=Speciality_Type_Windows size=2>
<hr>
<img src="FYP/img21.jpg" alt="Windows"/>
</br>
<label> Vertical Slider Windows </label>
<br>
This Item Costs € 200.00 ex vat<P>
<input name=addbox type=button value="Add This Item To Quote" onclick=Loc_additem('Vertical_Slider_Windows','200.00','incl_vat_€227.00','pagetwo.html')><br>
<input type=button name=subbox value="Subtract This Item" onclick=Loc_subitem('Vertical_Slider_Windows','200.00','incl_vat_€227.00','pagetwo.html')><BR>
Quantity:<input type=text name=Vertical_Slider_Windows size=2>
<hr>
<img src="FYP/img22.jpg" alt="Windows"/>
</br>
<label> Casement Windows </label>
<br>
This Item Costs € 345.00 ex vat<P>
<input name=addbox type=button value="Add This Item To Quote" onclick=Loc_additem('Casement_Windows','345.00','incl_vat_€391.57','pagetwo.html')><br>
<input type=button name=subbox value="Subtract This Item" onclick=Loc_subitem('Casement_Windows','345.00','incl_vat_€391.57','pagetwo.html')><BR>
Quantity:<input type=text name=Casement_Windows size=2>
<hr>
<img src="FYP/img23.jpg" alt="Windows"/>
</br>
<label> Tilt and Turn Windows </label>
<br>
This Item Costs € 209.00 ex vat<P>
<input name=addbox type=button value="Add This Item To Quote" onclick=Loc_additem('Tilt_and_Turn_Windows','209.00','incl_vat_237.21','pagetwo.html')><br>
<input type=button name=subbox value="Subtract This Item" onclick=Loc_subitem('Tilt_and_Turn_Windows','209.00','incl_vat_237.21','pagetwo.html')><BR>
Quantity:<input type=text name=Tilt_and_Turn_Windows size=2>
</form><!-- must be in code to WORK!!!!!!!-->
<hr>
<center>
[ <a href="javascript:parent.updatemain_order()">Review Updated Order Form</a> ]
</center>
</div>
</div>
</div>
</body>
</html>
My buttons dont seem to be working below at all and ive tried everything. any help would be great times not really on my side.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<!-- This is my page with my WINDOWS and you can retrieve a quote from it -->
<html>
<head>
<title>PREMIER WINDOWS AND DOORS. QUOTE RETRIEVAL</title>
<link rel="stylesheet" type="text/css" href="style.css" media="screen" />
<script language=javascript>
<!-- hide
function write_to_field(code)
{
var found = false;
var i =0;
while ((found == false) && (i < document.form1.elements.length))
{i = i + 1
if (document.form1.elements[i].name == code)
{
found = true;
document.form1.elements[i].value = parent.item_quan(code);
}
}
}
function Loc_additem(code,price,desc,url)
{
self.parent.additem(code,price,desc,url);
write_to_field(code)
}
function Loc_subitem(code,price,desc)
{
self.parent.subitem(code,price,desc);
write_to_field(code)
}
function update_thiselem_page()
{
if (self!=parent)
parent.update_this_page()
}
<!-- End -->
</script>
</head>
<body bgcolor="#FFFFFF" alink="#FF0000">
<div id="header">
<div id="logo">
<h1>Premier Windows and Doors</h1>
<h3> Carraigtwohill, Co Cork</h3>
</div>
<!-- end #logo -->
<div id="menu">
<ul>
<li><a href="http://localhost/index2.html" target="_top">Home</a>
<li class="active"><a href="http://localhost/order/shopcartindex.html" target="_top">Products</a></li>
</ul>
</div>
<!-- end #menu -->
</div>
<form name=form1 action=""><!-- must be in code to WORK!!!!!!!-->
<div id="page">
<div id="content">
<div id="box41">
<img src="FYP/img18.jpg" alt="Windows"/></br>
</br>
<label> Bow Windows </label>
<br>
This Item Costs € 235.87 ex vat<P>
<input name=addbox type=button value="Add This Item To Quote" onclick=Loc_additem('Bow_Windows','235.97','incl_vat_€309.81','pagetwo.html')><br>
<input type=button name=subbox value="Subtract This Item" onclick=Loc_subitem('Bow_Windows','235.97','incl_vat_€309.81','pagetwo.html')><BR>
Quantity: <input type=text name=Bow_Windows size=2>
<hr>
<img src="FYP/img19.jpg" alt="Windows"/>
</br>
<label> Bay Windows </label>
<br>
This Item Costs € 195.00 ex vat<P>
<input name=addbox type=button value="Add This Item To Quote" onclick=Loc_additem('Bay_Windows','195.00','incl_vat_€221.00','pagetwo.html')><br>
<input type=button name=subbox value="Subtract This Item" onclick=Loc_subitem('Bay_Windows','195.00','incl_vat_€221.00','pagetwo.html')><BR>
Quantity: <input type=text name=Bay_Windows size=2>
<hr>
<img src="FYP/img20.jpg" alt="Windows"/>
</br>
<label> Speciality Type Windows </label>
<br>
This Item Costs € 195.00 ex vat<P>
<input name=addbox type=button value="Add This Item To Quote" onclick=Loc_additem('Speciality_Type_Windows','199.00','incl_vat_€225.00','pagetwo.html')><br>
<input type=button name=subbox value="Subtract This Item" onclick=Loc_subitem('Speciality_Type_Windows','199.00','incl_vat_€225.00','pagetwo.html')><BR>
Quantity:<input type=text name=Speciality_Type_Windows size=2>
<hr>
<img src="FYP/img21.jpg" alt="Windows"/>
</br>
<label> Vertical Slider Windows </label>
<br>
This Item Costs € 200.00 ex vat<P>
<input name=addbox type=button value="Add This Item To Quote" onclick=Loc_additem('Vertical_Slider_Windows','200.00','incl_vat_€227.00','pagetwo.html')><br>
<input type=button name=subbox value="Subtract This Item" onclick=Loc_subitem('Vertical_Slider_Windows','200.00','incl_vat_€227.00','pagetwo.html')><BR>
Quantity:<input type=text name=Vertical_Slider_Windows size=2>
<hr>
<img src="FYP/img22.jpg" alt="Windows"/>
</br>
<label> Casement Windows </label>
<br>
This Item Costs € 345.00 ex vat<P>
<input name=addbox type=button value="Add This Item To Quote" onclick=Loc_additem('Casement_Windows','345.00','incl_vat_€391.57','pagetwo.html')><br>
<input type=button name=subbox value="Subtract This Item" onclick=Loc_subitem('Casement_Windows','345.00','incl_vat_€391.57','pagetwo.html')><BR>
Quantity:<input type=text name=Casement_Windows size=2>
<hr>
<img src="FYP/img23.jpg" alt="Windows"/>
</br>
<label> Tilt and Turn Windows </label>
<br>
This Item Costs € 209.00 ex vat<P>
<input name=addbox type=button value="Add This Item To Quote" onclick=Loc_additem('Tilt_and_Turn_Windows','209.00','incl_vat_237.21','pagetwo.html')><br>
<input type=button name=subbox value="Subtract This Item" onclick=Loc_subitem('Tilt_and_Turn_Windows','209.00','incl_vat_237.21','pagetwo.html')><BR>
Quantity:<input type=text name=Tilt_and_Turn_Windows size=2>
</form><!-- must be in code to WORK!!!!!!!-->
<hr>
<center>
[ <a href="javascript:parent.updatemain_order()">Review Updated Order Form</a> ]
</center>
</div>
</div>
</div>
</body>
</html>