Results 1 to 6 of 6
  1. #1
    Cyberoxy is offline Member
    Join Date
    Jun 2011
    Posts
    5
    Rep Power
    0

    Default need last help - price list not shown up

    Hey guys / gals

    Everything is working expect the price is not shown up.

    When I inserted the java code for displaying image when selected item, it is working well but the prices was not shown up. Something with Java. Can you check my below code where is incorrect? That is the last thing I need your help. You are star! :-)

    Look at the red code (insert) below:

    <head>
    <script type="text/javascript">
    window.onload = function() {
    document.getElementById("dlist1").onchange = function() {
    var option = this.options[this.selectedIndex];
    document.getElementById("price_card").innerHTML = option.getAttribute("data-card") ? option.getAttribute("data-card") : "";
    document.getElementById("price_memo").innerHTML = option.getAttribute("data-memo") ? option.getAttribute("data-memo") : "";
    document.getElementById("price_tags1").innerHTML = option.getAttribute("data-tags1") ? option.getAttribute("data-tags1") : "";
    document.getElementById("price_tags4").innerHTML = option.getAttribute("data-tags4") ? option.getAttribute("data-tags4") : "";
    document.getElementById("price_key").innerHTML = option.getAttribute("data-key") ? option.getAttribute("data-key") : "";
    document.getElementById("price_fridge").innerHTML = option.getAttribute("data-fridge") ? option.getAttribute("data-fridge") : "";
    }
    }
    </script>

    <script type="text/javascript">
    function swapImage1() {
    var image = document.getElementById("imageToSwap1");
    var dropd = document.getElementById("dlist1");
    image.src = dropd.value;
    };
    </script>

    <script type="text/javascript">
    function swapImage2() {
    var image = document.getElementById("imageToSwap2");
    var dropd = document.getElementById("dlist2");
    image.src = dropd.value;
    };


    </script>

    </head>

    <body>

    <table width="700">

    <tr>
    <td>
    <p class="Card">ORDER 1:</p>

    </td>
    </tr>
    <tr>
    <td>
    <p class="Dropdown">
    <select name="ORDER1" size="12" multiple="multiple" id="dlist1" onchange="swapImage1()">
    <optgroup label="Sow Seeds of Love">
    <option value="None">None</option>
    <option data-card="32.00" data-memo="62.00" data-tags1="8.50" data-tags4="1.80" data-key="30.00" data-fridge="40.00" value="Images/Order_names/SowSeeds/Faith01_yellow.jpg">Faith</option>
    <option data-card="35.00" data-memo="65.00" data-tags1="9.50" data-tags4="1.80" data-key="20.00" data-fridge="40.00" value="Images/Order_names/SowSeeds/Grace01_green.jpg">Grace</option>
    <option data-card="1.00" data-memo="2.00" data-tags1="3.00" data-tags4="4.00" data-key="5.00" data-fridge="6.00" value="Images/Order_names/SowSeeds/Hope01_blue.jpg">Hope</option>
    <option data-card="6.00" data-memo="5.00" data-tags1="4.00" data-tags4="3.00" data-key="2.00" data-fridge="1.00" value="Images/Order_names/SowSeeds/Peace01_pink.jpg">Peace</option>
    <option data-card="21.00" data-memo="22.00" data-tags1="23.00" data-tags4="24.00" data-key="25.00" data-fridge="26.00" value="Images/Order_names/SowSeeds/FlowerSeedSachet01_two girls.jpg">Flower Seed</option>
    </optgroup>
    </select>

    </p>

    </td>
    <td>
    <img class="ImageToSwap" id="imageToSwap1" src="Images/DropdownImages.gif" width="147" height="207" />

    </td>

    </tr>
    </table>



    <table>
    <tr>
    <th>Description</th>
    <th>Price</th>
    </tr>
    <tr>
    <td><label><input type="radio" name="medium" value="card" /> Card A6 (blank)</label></td>
    <td id="price_card"></td>
    </tr>
    <tr>
    <td><label><input type="radio" name="medium" value="memo" /> Memo Book A6</label></td>
    <td id="price_memo"></td>
    </tr>
    <tr>
    <td><label><input type="radio" name="medium" value="tags4" /> Gift Tags (4 designs per packet)</label></td>
    <td id="price_tags4"></td>
    </tr>
    <tr>
    <td><label><input type="radio" name="medium" value="tags1" /> Gift Tags - Single - Assorted</label></td>
    <td id="price_tags1"></td>
    </tr>
    <tr>
    <td><label><input type="radio" name="medium" value="key" /> Key Rings Perspex</label></td>
    <td id="price_key"></td>
    </tr>
    <tr>
    <td><label><input type="radio" name="medium" value="fridge" /> Fridge Art</label></td>
    <td id="price_fridge"></td>
    </tr>
    </table>


    <table width="700">

    <tr>
    <td>
    <p class="Card">ORDER 2:</p>

    </td>
    </tr>
    <tr>
    <td>
    <p class="Dropdown">
    <select name="ORDER2" size="12" multiple="multiple" id="dlist2" onchange="swapImage2()">
    <optgroup label="Sow Seeds of Love">
    <option value="None">None</option>
    <option data-card="32.00" data-memo="62.00" data-tags1="8.50" data-tags4="1.80" data-key="30.00" data-fridge="40.00" value="Images/Order_names/SowSeeds/Faith01_yellow.jpg">Faith</option>
    <option data-card="35.00" data-memo="65.00" data-tags1="9.50" data-tags4="1.80" data-key="20.00" data-fridge="40.00" value="Images/Order_names/SowSeeds/Grace01_green.jpg">Grace</option>
    <option data-card="1.00" data-memo="2.00" data-tags1="3.00" data-tags4="4.00" data-key="5.00" data-fridge="6.00" value="Images/Order_names/SowSeeds/Hope01_blue.jpg">Hope</option>
    <option data-card="6.00" data-memo="5.00" data-tags1="4.00" data-tags4="3.00" data-key="2.00" data-fridge="1.00" value="Images/Order_names/SowSeeds/Peace01_pink.jpg">Peace</option>
    <option data-card="21.00" data-memo="22.00" data-tags1="23.00" data-tags4="24.00" data-key="25.00" data-fridge="26.00" value="Images/Order_names/SowSeeds/FlowerSeedSachet01_two girls.jpg">Flower Seed</option>
    </optgroup>
    </select>

    </p>

    </td>
    <td>
    <img class="ImageToSwap" id="imageToSwap2" src="Images/DropdownImages.gif" width="147" height="207" />

    </td>

    </tr>
    </table>


    <table>
    <tr>
    <th>Description</th>
    <th>Price</th>
    </tr>
    <tr>
    <td><label><input type="radio" name="medium" value="card" /> Card A6 (blank)</label></td>
    <td id="Td1"></td>
    </tr>
    <tr>
    <td><label><input type="radio" name="medium" value="memo" /> Memo Book A6</label></td>
    <td id="Td2"></td>
    </tr>
    <tr>
    <td><label><input type="radio" name="medium" value="tags4" /> Gift Tags (4 designs per packet)</label></td>
    <td id="Td3"></td>
    </tr>
    <tr>
    <td><label><input type="radio" name="medium" value="tags1" /> Gift Tags - Single - Assorted</label></td>
    <td id="Td4"></td>
    </tr>
    <tr>
    <td><label><input type="radio" name="medium" value="key" /> Key Rings Perspex</label></td>
    <td id="Td5"></td>
    </tr>
    <tr>
    <td><label><input type="radio" name="medium" value="fridge" /> Fridge Art</label></td>
    <td id="Td6"></td>
    </tr>
    </table>

    </body>

  2. #2
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,883
    Rep Power
    25

    Default

    Is this Java or javascript?
    This is a Java forum.

  3. #3
    Cyberoxy is offline Member
    Join Date
    Jun 2011
    Posts
    5
    Rep Power
    0

    Default need last help - price list not shown up

    it is javascript like you can read up on the top.

  4. #4
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,883
    Rep Power
    25

    Default

    Then you are in the wrong forum.

  5. #5
    Cyberoxy is offline Member
    Join Date
    Jun 2011
    Posts
    5
    Rep Power
    0

    Default

    am I on the wrong place? Where must I go to get help?

  6. #6
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,883
    Rep Power
    25

Similar Threads

  1. No result shown
    By Levian in forum JDBC
    Replies: 18
    Last Post: 07-04-2011, 03:53 AM
  2. I donít want my pages to be shown in the history at all
    By jaisingh.saini in forum JavaServer Pages (JSP) and JSTL
    Replies: 1
    Last Post: 11-19-2010, 09:55 AM
  3. Replies: 1
    Last Post: 12-23-2009, 01:24 AM
  4. uploaded image not shown
    By java_srinivasan in forum JavaServer Pages (JSP) and JSTL
    Replies: 0
    Last Post: 11-05-2008, 01:40 PM
  5. No output shown
    By ai_2007 in forum Advanced Java
    Replies: 4
    Last Post: 07-10-2007, 10:26 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •