Reputation: 37
I have two html pages; shop and cart, in both headers I have the code
<script type="text/javascript" src="JS/simpleCart.js"></script>
In my shop.html I have this code in the body;
<div id="cart" style="clear: both;">
<a href="cart.html">YOUR CART ( <span class="simpleCart_quantity"></span> )</a>
</div>
and
<div class="simpleCart_shelfItem" style="margin-top:120px;">
<h1 class="item_name"> Oriental Patterned Maxiskirt</>
<h1 class="item_price"> PHP2,099</h1>
<h1 class="size_item_title">SIZE</h1>
<ul>
<li>
<input type="radio" class="item_size" id="s-size1" value="small" name="size1">
<label class="sizeLabel" style="background-color:#fff;" for="s-size1">S</label>
<div class="size"></div>
</li>
<li>
<input type="radio" class="item_size" id="m-size1" value="medium" name="size1">
<label class="sizeLabel" style="background-color:#fff;" for="m-size1">M</label>
<div class="size"><div class="inside"></div></div>
</li>
<li>
<input type="radio" class"item_size" id="l-size1" value="large" name="size1">
<label class="sizeLabel" style="background-color:#fff;" for="l-size1">L</label>
<div class="size"><div class="inside"></div></div>
</li>
</ul>
<a class="item_add" href="javascript:;"> ADD TO CART </a>
</div>
to add items in my cart; and in my cart.html I have the code
<div class="simpleCart_items"></div>
My problem is that when I click on "Your Cart" it brings me to an empty page but if i put the code into shop.html like so;
<div id="cart" style="clear: both;">
<a href="cart.html">YOUR CART ( <span class="simpleCart_quantity"></span> )</a>
</div>
<div class="simpleCart_items"></div>
it shows the cart on that page. So I'm thinking that there's a link problem, but i'm not sure as to how to link both pages together (I thought that putting the simpleCart.js in the header linked the both of them already). If anyone knows why it's not showing on the other page, it'll be such a big help. Thanks
Upvotes: 0
Views: 954
Reputation: 115
Upvotes: 0