need help....never done this before

please if anyone know this could u help me. i need to complete this for a web site.

To Implement an online pot design tool using javascript.

- select pot color OR shape in a form dropdown list
- the approiate corresponding image should be displayed from the pot images provided
- image should immediately upon selection of color OR shape, without need for submit button
- image should be displayed on the same page as the form
- only 1 image should be displayed at a time, previous image should be replace by the latest image.

Comments

  • : please if anyone know this could u help me. i need to complete this for a web site.
    :
    : To Implement an online pot design tool using javascript.
    :
    : - select pot color OR shape in a form dropdown list
    : - the approiate corresponding image should be displayed from the pot images provided
    : - image should immediately upon selection of color OR shape, without need for submit button
    : - image should be displayed on the same page as the form
    : - only 1 image should be displayed at a time, previous image should be replace by the latest image.
    :

    Start with a blank image then change it depending on the users input, sorry i cant be any more detailed i'm at work :)



  • Hi,

    Why don't try this way:


    Select Shape:



    Shape 1
    Shape 2
    Shape 3
    Shape 4
    Shape 5


    Select Color:



    Red
    Green
    Blue


    image

     

    var max_shapes=5;
    var shapes=new Array(max_shapes);
    shapes[0]=Array("sh1colRed.gif","sh1colGreen.gif","sh1colBlue.gif");
    shapes[1]=Array("sh2colRed.gif","sh1co2Green.gif","sh2colBlue.gif");
    shapes[2]=Array("sh3colRed.gif","sh1co3Green.gif","sh3colBlue.gif");
    shapes[3]=Array("sh4colRed.gif","sh1co4Green.gif","sh4colBlue.gif");
    shapes[4]=Array("sh5colRed.gif","sh1co5Green.gif","sh5colBlue.gif");
    var sel_shape_id=0;
    function changeShape(obj){
    sel_shape_id=obj.selectedIndex;
    if(document.layers){
    document.forms["MyForm"].elements["selCol"].selectedIndex=0;
    }else document.getElementById("selCol").selectedIndex=0;
    changeImage(0);
    }
    function changeCol(obj){
    changeImage(obj.selectedIndex);
    }
    function changeImage(col_id){
    if(document.layers){
    document.images["myImg"].src=shapes[sel_shape_id][col_id];
    }else document.getElementById("myImg").src=shapes[sel_shape_id][col_id];

    alert(shapes[sel_shape_id][col_id]);
    }





    I suggest that it will be better if you customize and the colors for each shape.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories