Jump to content

cmgmyr

Members
  • Posts

    1,278
  • Joined

  • Last visited

    Never

Posts posted by cmgmyr

  1. So, I'm still building this "hot or not" site for my client and I was thinking about how to handle all of the user images.

     

    I was thinking of having all of the images in 1 directory...but after a while it will get pretty full.

     

    What are your thoughts about:

    1. Keeping them all in one directory

    2. Having an image directory with indevidual directories that are named the userid or username (user_images/1/my_image.jpg)

    3. Having #2 broken down by first username initial. ex: username - admin (user_images/a/1/my_image.jpg), username - tom (user_images/t/1/my_image.jpg)

    4. any other ideas?

     

    I'm trying to make this as easy to manage (and practical) in all aspects as possible. Please let me know your thoughts.

     

    Thanks,

    -Chris

  2. I got it :)

     

    Look at your group1 and group2 arrays...you skipped over #6 in both arrays so it blew up the for loop.

     

    So it should look like:

    <form name="doublecombo">
    <p><select name="Main" size="12" onChange="redirect(this.options.selectedIndex)">
    <option>Select...</option>
    <option>For Sale</option>
    <option>Wanted</option>
    <option>Jobs</option>
    <option>Events</option>
    <option>Services</option>
    <option>Free!</option>
    <option>Other</option>
    </select>
    <select name="Category" size="12">
    <option value="http://javascriptkit.com">Select...</option>
    </select>
    </p>
    
    <script>
    <!--
    
    /*
    Double Combo Script Credit
    By JavaScript Kit (www.javascriptkit.com)
    Over 200+ free JavaScripts here!
    */
    
    var groups=document.doublecombo.Main.options.length
    var group=new Array(groups)
    for (i=0; i<groups; i++)
    group[i]=new Array()
    
    group[0][0]=new Option("Select from Main","No Category selected!")
    
    group[1][0]=new Option("Electrical devices","For Sale - Electrical devices")
    group[1][1]=new Option("Computers","For Sale - Computers")
    group[1][2]=new Option("Clothes","For Sale - Clothes")
    group[1][3]=new Option("Furniture","For Sale - Furniture")
    group[1][4]=new Option("Pets","For Sale - Pets")
    group[1][5]=new Option("Books & Magazines","For Sale - Books & Magazines")
    group[1][6]=new Option("Jewelery","For Sale - Jewelery")
    group[1][7]=new Option("Toys & Games","For Sale - Toys & Games")
    group[1][8]=new Option("Other","For Sale - Other")
    
    group[2][0]=new Option("Electrical devices","Wated - Electrical devices")
    group[2][1]=new Option("Computers","Wanted - Computers")
    group[2][2]=new Option("Clothes","Wanted - Clothes")
    group[2][3]=new Option("Furniture","For Sale - Furniture")
    group[2][4]=new Option("Pets","For Sale - Pets")
    group[2][5]=new Option("Books & Magazines","For Sale - Books & Magazines")
    group[2][6]=new Option("Jewelery","For Sale - Jewelery")
    group[2][7]=new Option("Toys & Games","For Sale - Toys & Games")
    group[2][8]=new Option("Other","For Sale - Other")
    
    group[3][0]=new Option("General Part-time","Jobs- General Part-time")
    group[3][1]=new Option("General Full-time","Jobs- General Full-time")
    group[3][2]=new Option("Engineering","Jobs - Engineering")
    group[3][3]=new Option("Business","Jobs - Business")
    group[3][4]=new Option("Voluntary work","Jobs - Voluntary work")
    
    group[4][0]=new Option("Shows","Events - Shows")
    group[4][1]=new Option("Meetings","Events - Meetings")
    group[4][2]=new Option("Special Offers","Events - Special offers")
    group[4][3]=new Option("Fun & Outdoors","Events - Fun & Outddors")
    group[4][4]=new Option("Night life","Events - Night life")
    
    group[5][0]=new Option("Removals","Services - Removals")
    group[5][1]=new Option("Electrical","Services - Electrical")
    group[5][2]=new Option("Mechanical","Services - Mechanical")
    group[5][3]=new Option("Building","Services - Building")
    
    group[6][0]=new Option("Stuff","Free - Stuff")
    group[6][1]=new Option("Services","Free - Services")
    group[6][2]=new Option("Pets","Free - Pets")
    group[6][3]=new Option("Other!","Free - Other!")
    
    group[7][0]=new Option("Advertising","Other - Advertising")
    group[7][1]=new Option("Websites","Other - Websites")
    
    var temp=document.doublecombo.Category
    
    function redirect(x){
    for (m=temp.options.length-1;m>0;m--)
    temp.options[m]=null
    for (i=0;i<group[x].length;i++){
    	temp.options[i]=new Option(group[x][i].text,group[x][i].value)
    }
    temp.options[0].selected=true
    }
    
    function go(){
    location=temp.options[temp.selectedIndex].value
    }
    //-->
    </script>
    </form>

  3. I'd say go for it and try it out for a little while, if you don't like it you can always get a full time job. I just made the switch recently to do this stuff full time and I love it. I do still have some clients that I do some inhouse stuff for, but most of it I do from home.

     

    Money is nice but I hate getting up in the morning for someone else, working on their time, and making THEM money. Why not work for yourself? I just think it's a lot more satisfying. :)

  4. Your logic looks wrong to me...

     

    Why don't you have a product table where you have the item code, description...and then have an order table where you have each record pointed to a product id.

     

    I think you will find that a lot easier to manage.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.