Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 8 of 8
  1. #1
    New Coder
    Join Date
    May 2012
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Completely noob question

    Hey all I am new to all this and just have a few ideas for a website in my head and was just wondering how easy it was to do something. Basically the user will select options from drop down boxes basically what I want is for each drop down box to eliminate a final result. Sorry if I'm not being clear it's basically like the guess who game.

    So you can get result 1 by selecting options 1a 2b and 3a and result 2 if you select 1b 2b 3a.

    If this still isn't clear let me know

    Sorry if it's posted in the wrong place!

  • #2
    New Coder
    Join Date
    May 2012
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Another example is when going onto a football website there will be say four drop down boxes. One for country so I select UK so the options in the next box change to specific country's so I pick England so the next box then has all the leagues in England so I pick premiership and then in the final box that leaves all the teams in the premiership.

  • #3
    New Coder
    Join Date
    May 2012
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I would basically like something like the DNA style builder on this website http://www.stylepilot.com/home/dnasetting how easy would it be to replicate that at home with no code experience?

  • #4
    Master Coder felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Posts
    6,462
    Thanks
    0
    Thanked 633 Times in 623 Posts
    Quote Originally Posted by Asjames View Post
    how easy would it be to replicate that at home with no code experience?
    That depends on how long it takes you to get the necessary coding experience. What you want will require custom coding for your particular requirements and so you will either need to learn enough to be able to write it yourself or pay someone to write it for you.

    If you manage to get close to what you want but it doesn't quite work properly then you can post your code and those on the forum will help you fix it - but you have to at least have something written to start with if you want help without paying for it.
    Stephen
    Learn Modern JavaScript - http://javascriptexample.net/
    Helping others to solve their computer problem at http://www.felgall.com/

    Don't forget to start your JavaScript code with "use strict"; which makes it easier to find errors in your code.

  • #5
    New Coder
    Join Date
    May 2012
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks for the response.

    So what codes would I need to learn HTML and CSS or others?
    Are these hard to learn? How long would it take me to get to the level where I could produce that roughly.

    Also finally how much roughly would it cost for someone to code that sort of thing for me.

    Sorry for all the noob questions! But gotta start somewhere thanks in advance

  • #6
    Master Coder felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Posts
    6,462
    Thanks
    0
    Thanked 633 Times in 623 Posts
    You need to know HTML, CSS, and JavaScript in order to be able to create web pages.

    Changing the values in one select based on the selection in another select is done using JavaScript.

    You will also need a server side language to process the submitted form.
    Stephen
    Learn Modern JavaScript - http://javascriptexample.net/
    Helping others to solve their computer problem at http://www.felgall.com/

    Don't forget to start your JavaScript code with "use strict"; which makes it easier to find errors in your code.

  • #7
    New Coder
    Join Date
    May 2012
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Ok how advanced is that sort of thing then?
    If I already had my full website but just needed the code for that tool how would I go about working out how to do that.

  • #8
    New Coder
    Join Date
    May 2012
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts
    So would it be this?

    <?php

    print_r($_POST);

    ?>


    <html xmlns="http://www.w3.org/1999/xhtml">

    <head></head>

    <body>

    <script type="text/javascript">

    function setOptions(chosen){

    var selbox = document.formName.table;
    selbox.options.length = 0;

    if (chosen == " ") {
    selbox.options[selbox.options.length] = new Option('No database selected',' ');
    }
    if (chosen == "1") {
    selbox.options[selbox.options.length] = new Option('first choice - option one','oneone');
    selbox.options[selbox.options.length] = new Option('first choice - option two','onetwo');
    }
    if (chosen == "2") {
    selbox.options[selbox.options.length] = new Option('second choice - option one','twoone');
    selbox.options[selbox.options.length] = new Option('second choice - option two','twotwo');
    selbox.options[selbox.options.length] = new Option('second choice - option three','twothree');
    selbox.options[selbox.options.length] = new Option('second choice - option four','twofour');
    }
    if (chosen == "3") {
    selbox.options[selbox.options.length] = new Option('third choice - option one','threeone');
    selbox.options[selbox.options.length] = new Option('third choice - option two','threetwo');
    }
    }

    </script>


    <form name="formName" method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>">

    <select name="optone" size="1" onchange="setOptions(document.formName.optone.options[document.formName.optone.selectedIndex].value);">
    <option value=" " selected="selected"></option>
    <option value="1">First Choice</option>
    <option value="2">Second Choice</option>
    <option value="3">Third Choice</option>
    </select>

    <select name="table" size="1">
    <option value=" " selected="selected">No database selected</option>
    </select>

    <input type="submit" />

    </form>


    </body>

    </html>


  •  

    Posting Permissions

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