JavaScript - Zebra Items Not Responding To Changes
I am building a shopping cart in Volusion. I've come really far and can find my way around HTML and CSS.
But the template I am using has a zebra function that it uses on the shopping cart screen. The colors it is using are terrible, and I can't figure out how to change them. By zebra, I mean it picks every other row in a table and assigns a different background color. I am noticing in firebug that the div-ids of the items in the cart have div-ids taht are not listed in any of the CSS files in the theme. I figured out that this type of coding is usually done in JavaScripting. I tried editing that file in every logical way, and I can get no response out of it aside from my browser hanging. I even tried commenting out different sections. Also, the div-ids coming up in firebug aren't found in the .js file either. I'm not sure if you are at all familiar with Volusion, but they provide absolutely no assistance and try very hard to make things as hard as possible so customers will be desperate for their design services. All support will say is, "we are prohibited from providing any coding information. Would you like me to transfer you to sales?" They routinely remove resources that were once helpful. Nice customer service. Anyway, I've been working at this for days and I've come so far I hate being stuck at this point even though I'm just about ready to dump V. Can anyone give me any ideas on what to try? I feel like I've tried everything. I attached the file and here is the URL to the test site: http://v806427.kp5zkqan3xyu.demo22.volusion.com/ Thanks in advance, I'm dying over here. Similar Tutorials1) I have a webpage that contains an iframe. The iframe is scrollable. 2) I have the main body of the page responding to onmouseup clicks: <body onmouseup="hideMenus(event)"> And I have the main body of the child page (displayed in the iframe) also responding to onmouseup clicks: <body onmouseup="parent.hideMenus(event)"> So clicks on both pages result in hideMenu() on the parent page being called. Now when the scroll bars on the iframe become visible (due to large amounts of content), I click on the scroll bar, and the hideMenus() function does not respond. I guess the scroll bar is not recognized as part of either the parent page or the iframe's page. I tried adding onmouseup="hideMenus(event)" to the iframe but that didn't help. How can I get mouse clicks on the iframe's scroll bar to result in hideMenu being called? The website can be viewed he http://www.shahspace.com/bow/home.html Hi, In the attached code the outcome always defaults to the first test, even if the condition is false. How would I alter the syntax so that both condtions are evalauted? Code: var res = document.calc.num1.value*100/document.calc.num2.value; function cost1() { if (isNaN(res)) { document.calc.result1.value=0; } else { document.calc.result1.value=document.calc.num1.value*100/document.calc.num2.value; } } Thanks Iain hi all, i have written a code for simple shopping cart with 4 items.when i selecting the quantity and clicking the add to cart button it is not taking the values.it is displaying the array values what i have given.kindly tell me what is the problem and how to solve it... below is my "index.html" [HTML] <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title> JavaScript jQuery</title> <script type="text/javascript" src="js/jquery-1.3.2.min.js"></script> <script type="text/javascript" src="js/jquery-1.6.2"></script> <script type="text/javascript"> $(document).ready(function() { // call the cart function $("#sc_cart").smartCart(); }); </script> <!--<link rel="stylesheet" type="text/css" href="css/cart.css" /> --> </head> <body> <center><h2>Select Your products</h2></center> <form method="post" action="results.php"> <div id="smartcart" class="Container"> <!-- open "contanier" class --> <div id="sc_productlist" class="ProductList"> <!-- open "ProductList" class" --> <div class="ProductListItem"> <!-- open apple Iphone --> <table border="0" cellpadding="2" cellspacing="2"> <tr> <td rowspan="3"><img width="100px" src="images/product0.jpg" /></td> <td><strong><span id="prod_name100">Apple IPhone 3G</span></strong></td> </tr> <tr> <td><label>Price:</label> $<span id="prod_price100" style="color:red">1450.75</span></td> </tr> <tr> <td><label>Quantity:</label> <input name="prod_qty" class="Text" id="prod_qty100" size="3" type="text"> <input type="button" rel="100" class="ItemButton Btn" value="Add Product"></td> </tr> </table> </div> <!-- close apple iphone --> <hr/> <div class="ProductListItem"> <!-- open icepot --> <table border="0" cellpadding="2" cellspacing="2"> <tr> <td rowspan="3"><img width="100px" src="images/product1.jpg" /></td> <td><strong><span id="prod_name101">Ice Pot</span></strong></td> </tr> <tr> <td><label>Price:</label> $<span id="prod_price101" style="color:red">10.25</span></td> </tr> <tr> <td><label>Quantity:</label> <input name="prod_qty" class="Text" id="prod_qty101" size="3" type="text"> <input type="button" rel="101" class="ItemButton Btn" value="Add Product"></td> </tr> </table> </div> <!-- close icepot --> <hr/> <div class="ProductListItem"> <!-- open "ProductListItem" style stand --> <table border="0" cellpadding="2" cellspacing="2"> <tr> <td rowspan="3"><img width="100px" src="images/product2.jpg" /></td> <td><strong><span id="prod_name102">Style Stand</span></strong></td> </tr> <tr> <td><label>Price:</label> $<span id="prod_price102" style="color:red">6.15</span></td> </tr> <tr> <td><label>Quantity:</label> <input name="prod_qty" class="Text" id="prod_qty102" size="3" type="text"> <input type="button" rel="102" class="ItemButton Btn" value="Add Product"></td> </tr> </table> </div> <!-- close style stand--> <hr/> <div class="ProductListItem"> <!-- for coffee maker --> <table border="0" cellpadding="2" cellspacing="2"> <tr> <td rowspan="3"><img width="100px" src="images/product3.jpg" /></td> <td><strong><span id="prod_name103">Coffe Maker</span></strong></td> </tr> <tr> <td><label>Price:</label> $<span id="prod_price103" style="color:red">120.35</span></td> </tr> <tr> <td><label>Quantity:</label> <input name="prod_qty" class="Text" id="prod_qty103" size="3" type="text"> <input type="button" rel="103" class="ItemButton Btn" value="Add Product"></td> </tr> </table> </div> <!-- close coffee maker --> <!-- end "ProductList" class" --> <!-- cart list--> <div id="sc_cart" class="Cart"> <select id="product_list" name="product_list[]" style="display:none;" multiple="multiple"> </select> <div class="CartListHead"> <table width='50%'> <tr> <td width='100px'>Product</td> <td width='100px'>Quantity</td> <td width='150px'>Amount($)</td> </tr> </table> </div> <div id="sc_cartlist" class="CartList"> </div> <div class="CartListHead"> <table width='100%'> <tr> <td><span id="message"></span></td> <td width='100px'>Subtotal($):</td> <td width='120px'><span id="subtotal"></span></td> </tr> </table> </div> </div> <br> <input style="width:200px;height:35px;float:right;" type="submit" class="Btn" value="Checkout"> </div> </div> </form> </body> </html> [/HTML] the array elements given here is displaying in the output.how to remove that one.below is my "results.php" Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title> JavaScript jQuery</title> <!-- <link rel="stylesheet" type="text/css" href="css/cart.css" /> --> </head> <body> <center><h2>Selected Products</h2></center> <div id="sc_cart" style="width:950px;" class="Container"> <?php // creating product array $product_array = array("100" =>array('product_id'=>'100', 'product_name'=>'Apple IPhone 3G', 'product_price'=>'1450.75', 'product_img'=>'images/product0.jpg'), "101" =>array('product_id'=>'101', 'product_name'=>'Ice Pot', 'product_price'=>'10.25', 'product_img'=>'images/product1.jpg'), "102" =>array('product_id'=>'102', 'product_name'=>'Style Stand', 'product_price'=>'6.15', 'product_img'=>'images/product2.jpg'), "103" =>array('product_id'=>'103', 'product_name'=>'Coffee Maker', 'product_price'=>'120.35', 'product_img'=>'images/product3.jpg')); // get the selected product array // here we get the selected product_id/quantity combination as an array $product_list = $_REQUEST['product_list']; if(!empty($product_list)) { ?> <div class="CartListHead"> <table width='100%'> <tr> <td> Product</td> <td width='80px'>Quantity</td> <td width='130px'>Amount($)</td> </tr></table> </div> <?php $sub_total = 0; foreach($product_list as $product) { $chunks = explode('|',$product); $product_id = $chunks[0]; $product_qty = $chunks[1]; $product_name = $product_array[$product_id]['product_name']; $product_amount = $product_array[$product_id]['product_price']*$product_qty; $sub_total = $sub_total + $product_amount; ?> <div class="CartListHead"> <table width='100%'> <tr> <td> <?php echo $product_name; ?></td> <td width='80px'><?php echo $product_qty; ?></td> <td width='130px'><?php echo $product_amount; ?></td> </tr> </table> </div> <?php } ?> <div class="CartListHead"> <table width='100%'> <tr> <td><span id="message"></span></td> <td width='100px'>Subtotal($):</td> <td width='120px'><span id="subtotal"><?php echo $sub_total; ?></span></td> </tr> </table> </div> <br> <form action="index.php" method="post"> <?php if(isset($product_list)) { foreach($product_list as $p_list) { $prod_options .='<input type="hidden" name="product_list[]" value="'.$p_list.'">'; } echo $prod_options; } ?> <input style="width:200px;height:35px;float:left;" type="submit" class="Btn" value="Continue Shopping"> </form> <?php } else { echo "<strong>Your Cart is Empty</strong>"; } ?> </div> </body> </html> here too below is my "index.php"..... Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title> JavaScript jQuery </title> <script type="text/javascript" src="js/jquery-1.3.2.min.js"></script> <script type="text/javascript"> $(document).ready(function() { // call the cart function $("#sc_cart").smartCart(); }); </script> <!--<link rel="stylesheet" type="text/css" href="css/cart.css" /> --> <?php // creating product array $product_array = array("100" =>array('product_id'=>'100', 'product_name'=>'Apple IPhone 3G', 'product_price'=>'1450.75', 'product_img'=>'images/product0.jpg'), "101" =>array('product_id'=>'101', 'product_name'=>'Ice Pot', 'product_price'=>'10.25', 'product_img'=>'images/product1.jpg'), "102" =>array('product_id'=>'102', 'product_name'=>'Style Stand', 'product_price'=>'6.15', 'product_img'=>'images/product2.jpg'), "103" =>array('product_id'=>'103', 'product_name'=>'Coffe Maker', 'product_price'=>'120.35', 'product_img'=>'images/product3.jpg')); // get the product list $product_list = $_REQUEST['product_list']; $prod_options =''; if(isset($product_list)){ foreach($product_list as $p_list){ $prod_options .='<option value="'.$p_list.'" SELECTED></option>'; } } ?> </head> <body> <center><h2>Select Your products</h2></center> <form action="results.php" method="post"> <div id="smartcart" class="Container"> <div id="sc_productlist" class="ProductList"> <?php foreach($product_array as $p) { ?> <div class="ProductListItem"> <table border="0" cellpadding="2" cellspacing="2"> <tr> <td rowspan="3"><img width="100px" src="<?php echo $p['product_img']; ?>" /></td> <td><strong><span id="prod_name<?php echo $p['product_id']; ?>"><?php echo $p['product_name']; ?></span></strong></td> </tr> <tr> <td><label>Price:</label> $<span id="prod_price<?php echo $p['product_id']; ?>"><? echo $p['product_price']; ?></span></td> </tr> <tr> <td><label>Quantity:</label> <input name="prod_qty" class="scText" id="prod_qty<?php echo $p['product_id']; ?>" size="3" type="text"> <input type="button" rel="<?php echo $p['product_id']; ?>" class="ItemButton Btn" value="Add Product"></td> </tr> </table> </div> <?php } ?> </div> <div id="sc_cart" class="Cart"> <select id="product_list" name="product_list[]" style="display:none;" multiple="multiple"> <?php echo $prod_options; ?> </select> <div class="CartListHead"> <table width='100%'> <tr> <td> Product</td> <td width='80px'>Quantity</td> <td width='140px'>Amount ($)</td> </tr> </table> </div> <div id="sc_cartlist" class="CartList"> </div> <div class="CartListHead"> <table width='100%'> <tr> <td><span id="message"></span></td> <td width='100px'>Subtotal ($):</td> <td width='120px'><span id="subtotal"></span></td> </tr> </table> </div> <br> <input style="width:200px;height:35px;float:right;" type="submit" class="Btn" value="Checkout"> </div> </div> </form> </body> </html> kindly tell me where went wrong and how to solve it....... Hi all, I having a problem. I am having 10 images, and I three places on a webpage where I want to show 3 out of those 10 images randomly. But when for example image 5 is shown on spot 1, it cannot be shown on spot 2 or 3 and the same for spot 2 and 3. Is this possible with Javascript? Greetz, Bob Essentially, I have an ASP.net page where I load a record set server side and upload it into a listbox. I'm trying to do all the movement functionalities of the listbox items client side. Specifically, I'm trying to figure out how to copy selected listbox items from one listbox to another -- on button click. I've searched for a while, but every example that I found moves the actual item into another listbox, I just want to copy the selected item to another listbox. I'm very new to JavaScript, so ff someone can provide an example or pseudo code, I would greatly appreciate it. I've been stuck on a piece of code for awhile. I have two items but they won't run at the same time only one will work: Code: function loadProductK ( prSrc, imgSrc, prDesc, pr$, prStock, prAnchor, rank ) { var product ='<div class="productDiv" id="'+prAnchor+'"><img src="'+imgSrc+'" width="150" height="150" title="'+prDesc+'"/><div class="productname">'+prDesc+'</div><div class="product$">€'+pr$+'</div><div class="productstock">'+prStock+'<div class="productvisit"><li onclick="loadPage("'+prSrc+'")">Check product >></li></div></div>' var productpage = document.getElementById("imgLoad") productpage.innerHTML=product loadProductK ('page/p/bead1.html','page/i/bead1.jpg','Round Bead','1,22','In Stock','Bead1','1' ) loadProductK ('page/p/Bead2.html','page/i/Bead2.jpg','Three Round Beads','6,99','In stock','Bead2','2' ) } Now i need the function loadProductK to work for both of the loadProductK's as seen below. Really need some help on this one. I am looking for a way to add multiple items with a single URL to my shopping cart. any ideas? cheers, Hi, I am new to development in javascript. I want to remove items in an array by passing index values. The index values may have 1 or more values. For example, i have the following array var arr1=new Array("aa","bb","cc","dd","ee","ff"); var index = new Array(); index[] = 3; index[] = 5 Using the above index values, i want the output as "aa","bb","cc","ee" when i used the slice function, i am not getting the desired output like the one above. Can someone please help me out? Thanks Raja I have a php web page with a list box. I select 4 items in the list and then submit to another php file to do some processing with those selected items. Then that script calls the original script - here's my question: Is there anyway to keep the four items selected when the original page is called again? Right now only one of the items is selected. I was thinking if the itemindex is 'remembered' then maybe the other items can be too? Or no? Thanks I would like to create a 2-level menu similar to the one use in: http://www.pagina12.com.ar/diario/principal/index.html It is done with CSS? Thanks! Hi, I would like to know how to add/remove items from listbox PERMANENTLY. Sad to say, all I have found are adding/removing items temporarily. Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" > <head> <title>Untitled Page</title> <script language="javascript" type="text/javascript" > function addOption(selectbox,text,value ) { var optn = document.createElement("OPTION"); optn.text = text; optn.value = value; selectbox.options.add(optn); } function addOption_list(selectbox) { addOption(document.drop_list.SubCat, "One","One"); addOption(document.drop_list.SubCat, "Two","Two"); addOption(document.drop_list.SubCat, "Three","Three"); addOption(document.drop_list.SubCat, "Four","Four"); addOption(document.drop_list.SubCat, "Five","Five"); addOption(document.drop_list.SubCat, "Six","Six"); } function removeOptions(selectbox) { var i; for(i=selectbox.options.length-1;i>=0;i--) { if(selectbox.options[i].selected) selectbox.remove(i); } } </script> </head> <body onload="addOption_list()";> <form name="drop_list" action="default.aspx" method="post" > <select id="SubCat" name="SubCat" MULTIPLE size="6" width="10"></select> <input type="button" onclick="removeOptions(SubCat)"; value='Remove Selected' /> <input type="button" onclick="addOption_list()"; value='Add All' /> </form> </body> </html> Please advise me on the problem. I create a webpage where i use pagination where it is predefined that i want to show 10 item per page.But i want to do that when a user logged in he have a option that how many items he wants to show per page?javascriptkit.com site use this type?please any one help me how can i do this?
I was recommended to vertically align these list items using javascript. I am needing to vertically align the "identity" and "web presence" list items with each other: http://shilohcreative.gethifi.com/work#/esque Thank you in advance! I am making a framework to easily set up javascript tabs that toggle content. For example, the button "homeButton" toggles the "home" section. This is a fragment of my code and I am having two problems with it: Code: for (var i = 0 in tabs) { document.getElementById(tabs[i] + "Button").onclick = function() { hideAll(tabs); document.getElementById(tabs[i]).style.visibility = 'visible'; } } Problem number 1: Regardless of which button I click, it always registers as the last button. Problem number 2: The hideAll(tabs), another function in the program works, but Code: document.getElementById(tabs[i]).style.visibility = 'visible'; doesn't. I get left with a blank page. Any help is greatly appreciated. BTW when I use something like Code: document.getElementById(tabs[0]).style.visibility = 'visible'; outside of the for loop, it works fine. I'm quite stumped. Julian So I'm pretty much new to JS, and I'm trying to write something, and I'm having a problem. It's a color picker. So I have an object that defines the default color, and then when the color is updated, the different css classes need to be updated as well. So here's what I was trying to do Code: var colorPicker = { mainColor: "red", backgroundColor: this.mainColor + "bkgd", } So problem 1 is I keep getting "undefined" returned for "this.mainColor". If I use colorPicker.mainColor, it hasn't been created yet so it throws an error. Problem two is if I update mainColor from another function, say to make mainColor = "green", then backgroundColor doesn't automatically update. Any help is appreciated. Thanks HI I am trying to get rid of this warning over and over. My pages are located in directory WEBSERVER\APPLICATIONS\WC Master pages in WEBSERVER\APPLICATIONS CSS and Javsasripts are in WEBSERVER and in css I have background:url(Images/GlowTab.png) no-repeat right top; Dont know even though the image gets accessed by Https. why it is still giving that warning. I want to compare items based on what the user picks there will be 3 drop down menus and the drop down menus should alter the HTML table each time it is changed, giving different option values and stuff. I am wondering how to go about this I have the basic stuff setup but I am not really sure how to add to a table that all 3 options use. Any help would be greatly appreciated. Here is my current code for the drop downs. Code: <form name="compare"> <select name="compare"> <option value="V1">Value 1</option> <option value="V2">Value 2</option> <option value="V3">Value 3</option> <option value="V4">Value 4</option> </select> <select name="compare2"> <option value="V1">Value 1</option> <option value="V2">Value 2</option> <option value="V3">Value 3</option> <option value="V4">Value 4</option> </select> <select name="compare3"> <option value="V1">Value 1</option> <option value="V2">Value 2</option> <option value="V3">Value 3</option> <option value="V4">Value 4</option> </select> <input type="button" onClick="location=document.jump.menu.options[document.jump.menu.selectedIndex].value;" value="Compare"> </form> I want the user to select one of the options from above and a table to show up showing the differences between the others for example; someone selects Value 1 for compare, and Value 2 for compare 2, and Value 3 for Compare 3, they should be shown a table which has the differences between Value 1, Value 2, Value 3. So lets say Value 1 and Value 3 offers you "Help" while value 2 doesn't. it should show a table that says Features Value 1 Value 2 Value 3 Help YES NO YES how would I go about doing this? I had trouble posting this problem on the forum so a full description of the problem, all the code and the test is also posted on: http://happinesshabitS.com/testroto4.htm I am trying to install a rotating banner on http://HappinessHabit.com How do I position the banner so it is NOT at the upper left hand corner of the page? I have tried wrapping it in <div> tags but that hasn't worked. I can get it rotating fine on the test page, but cannot place the rotating banner where I need it - see: http://happinesshabitS.com The code I placed on the test page is: Code: <script type="text/javascript" src="jshdrotate-1.js" ></script> </head> and Code: </head> <body onLoad="preloadImgs();randomImages();"> <img src="rotoimage1/ri-image-01.jpg" name="rotator" width="800" height="135" border="0" id="rotator"></a> Can I place this right above the </body> tag? The code I placed in a separate (jshdrotate-1.js) file is on http://happinesshabits.com/javahelp.pdf and below: Code: function MM_preloadImages() { //v3.0 var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array(); var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++) if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}} } function MM_swapImgRestore() { //v3.0 var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc; } function MM_findObj(n, d) { //v4.01 var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) { d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);} if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n]; for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); if(!x && d.getElementById) x=d.getElementById(n); return x; } function MM_swapImage() { //v3.0 var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3) if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];} } // Comma separated list of images to rotate var imgs = new Array('rotoimage1/ri-image-01.jpg','rotoimage1/ri-image-02.jpg','rotoimage1/ri-image-03.jpg','rotoimage1/ri-image-04.jpg','rotoimage1/ri-image-05.jpg', 'rotoimage1/ri-image-06.jpg', 'rotoimage1/ri-image-07.jpg', 'rotoimage1/ri-image-08.jpg','rotoimage1/ri-image-09.jpg', 'rotoimage1/ri-image-10.jpg','rotoimage1/ri-image-11.jpg', 'rotoimage1/ri-image-12.jpg'); // delay in milliseconds between image swaps 1000 = 1 second var delay = 6000; var counter = 0; function preloadImgs(){ for(var i=0;i<imgs.length;i++){ MM_preloadImages(imgs[i]); } } function randomImages(){ if(counter == (imgs.length)){ counter = 0; } MM_swapImage('rotator', '', imgs[counter++]); setTimeout('randomImages()', delay); } Many thanks for your help ! I am really in the dark about this. Ill tell you the story and then simplify it ok i have a computer site that you can build your own computer and whatnot but i just recently thought about how not everyone knows which parts are needed in a computer... my first design of the site had the name of the part in the select box as default but now i removed the name of each part outside of the select boxes but the problem now is i need some type of onLoad event to happen when the page loads to call out the functions that are associated with the selected boxes...... i have 2 fuctions in an external js file Code: function swapImage(sel,id){ document.getElementById(id).src = sel.value.split('#')[1]; } and Code: function Calculate(){ var a = parseFloat(document.comp.caseselect.value.split('#')[0]); var b = parseFloat(document.comp.powersupply.value.split('#')[0]); var sum = a+b; document.getElementById("total").innerHTML = '$'+sum; } when someone selects an item it adds the price to the price of other selected items and shows the total price elsewhere on the page... also shows a picture of the selected item on the page.. im just going to show the first select box to show you how all my select boxes are written Code: <p align="left">CASE</p> <center> <select name="caseselect" style="width:625px" onchange="Calculate(); swapImage(this,'caseimg');"> <option value="50#COOLER MASTER Elite 310red.jpg" selected="1">COOLER MASTER Elite 310 Red ($50.00)</option> <option value="50#COOLER MASTER Elite 310blue.jpg">COOLER MASTER Elite 310 Blue ($50.00)</option> <option value="50#COOLER MASTER Elite 310orange.jpg">COOLER MASTER Elite 310 Orange ($50.00)</option> <option value="50#COOLER MASTER Elite 310silver.jpg">COOLER MASTER Elite 310 Silver ($50.00)</option> </select> *not that it matters but yes there is an ending center in my html but its at the end of the group the image is sent here Code: <img src="start.jpg" id="caseimg" /> and the price is sent here Code: <span style="color:black; font-size:20pt">YOUR PRICE UPDATE</span><br /> <span id="total" style="color:white; font-size:32pt">$0 Nothing Selected</span> code works perfectly fine ONCE YOU SELECT SOMETHING ELSE but i need it to work when the page loads |