1. Hello! You are currently viewing our community as a guest. Register today and apply to be a member of one of the longest standing gaming communities around. Once you have registered learn about our team and how to apply!

HTML/JavaScript help

Discussion in 'General Open/Public Discussion' started by Duffman, 10 Dec 2006.


  1. Hey to you programmers out there. This might be easy but i cant find a way. I run a sharepoint for my unit and i am trying to get it so there is a drop down menu with 3 colors(red,green,yellow) symbolizing their status.

    I have 3 gifs (rsquare, gsquad, ysquad) what i was think was that i would have them select the color they want and then it would change say status.gif then the square next to the sections name would change color.

    If anyone could help me out i would be pleased. I have the drop down box made in JS but dont know how to get it to change a image.

    The script wont work because its a secure site but you get the picture.


    PHP:
    <html>

        <
    head>

    <
    script language="javascript">
    <!--
    var 
    color
    function showimage()
    {
    if (!
    document.images)
    return
    document.images.pictures.src=
    document.mygallery.picture.options[document.mygallery.picture.selectedIndex].value


    }
    fuction changeColor(color)
    {
        

        
    //-->
    </script>

    </
    head>


    <
    body>

    <
    table border="0" cellspacing="0" cellpadding="0">
    <
    tr>
    <
    td width="100%"><form name="mygallery"><p><select
    name
    ="picture" size="1" onChange="showimage()">

    <
    option selected value="https://138.168.224.82/clr35/S1%20Test%20Status%20Pic/_t/rsquare_gif.jpg">Red</option>

    <
    option value="https://138.168.224.82/clr35/S1%20Test%20Status%20Pic/_t/gsquare_gif.jpg">Green</option>

    <
    option value="https://138.168.224.82/clr35/S1%20Test%20Status%20Pic/_t/ysquare_gif.jpg">Yellow</option>


    </
    select></p>
    </
    form>
    </
    td>
    </
    tr>
    <
    tr>
    <
    td width="100%"><p align="center"><img src="status.gif" name="pictures" width="5"
    height="6"></td>
    </
    tr>
    </
    table>

    </
    body>
     

  2. I'm no expert on the subject, but this might be part of the problem:

     
  3. If you have any other sharepoint related questions give me a holler. I'm one of the sharepoint administrators for Fort Carson Colorado, we run a ton of portals, both team sites and areas.
     
  4. Thank god i will hit you up on that offer in about a month prolly. I'm going on leave in a day so, right now I'm at the i don't care point.

    And that above really didnt help out. That part works arg but i dont know what to put in to get the actually color to change on a different page.
     
    Last edited: 13 Dec 2006

Share This Page