Results 1 to 8 of 8

Thread: Looking for a script as well...

  1. #1
    Join Date
    Sep 2007
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Looking for a script as well...

    I'm looking for a script that allows you to click radio buttons in different categories and then hit submit (or something like that). Then, based upon the buttons you have chosen, a certain page will load. Perhaps one of 3 different results pages. Any help would be appreciated.

    Thanks!

  2. #2
    Join Date
    Jan 2007
    Posts
    629
    Thanks
    10
    Thanked 28 Times in 28 Posts

    Default

    Which language are you interested in? I can give you an example in JavaScript or PHP, but I don't have time to do both

    Let me know, and I'll be happy to give you some sample code.
    --Jas
    function GreatMinds(){ return "Think Like Jas"; }
    I'm gone for a while, but in the meantime: Try using my FTP script | Fight Bot Form Submissions

  3. #3
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,162
    Thanks
    263
    Thanked 690 Times in 678 Posts

    Default

    Daniel - Freelance Web Design | <?php?> | <html>| espa˝ol | Deutsch | italiano | portuguŕs | catalÓ | un peu de franšais | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  4. #4
    Join Date
    Sep 2007
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Sorry about the bad post title. I didn't know...

    I'm looking for a JavaScript that will do my request. I think I'll be able to understand it enough to place it into the html then. I just don't know how to write JavaScript myself.

  5. #5
    Join Date
    Jan 2007
    Location
    The stage
    Posts
    568
    Thanks
    23
    Thanked 6 Times in 6 Posts

    Default

    Ok OptimusGeorge I'll give you a php version of the script right now:
    Code:
    <form action="Decide.php">
    <!-- Form Stuff -->
    <input type="checkbox" name="PageOne" value="1" />
    <input type="checkbox" name="PageTwo" value="2" />
    <input type="submit" value="GO TO THERE!">
    </form>
    Thats the PHP code now keep two things in mind:
    Code:
    name="PageOne" value="1"
    Here is the php code which goes on Decide.php
    Code:
    <?php
    function GotoOne(){
    echo "Page location: index.php, secret.htm, something.html, anything works just as long as its a real page...";
    $br = "<br />";
    }
    function GotoTwo(){
    echo "Second Page location: index.php, secret.htm, something.html, anything works just as long as its a real page...";
    $br = "<br />";
    }
    $GotoPageone = $_POST["PageOne"];
    //If you change PageOne in the form change it here!
    $GotoPagetwo = $_POST["PageTwo"];
    if($GotoPageone==1){
    echo "Please click here:";
    echo $br;
    GotoOne();
    }
    if($GotoPagetwo==2){
    GotoTwo();
    }
    ?>
    That should work... I don't know how to do it in javascript though cuz I am not good at it...

  6. #6
    Join Date
    Sep 2007
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I don't think that will work. I just got the "real" low down on what needs to occur. There will be 16 or 17 different check boxes. If the user chooses 3 or less it goes to one page, 4-6 it goes to a second page, 7 or above goes to a third page.

    Also, can a "submit" button be an image with a link instead of just a button? Or does it always have to be a button?

  7. #7
    Join Date
    Jan 2007
    Location
    The stage
    Posts
    568
    Thanks
    23
    Thanked 6 Times in 6 Posts

    Default

    Ok... I can do the image thing but its not really going to be an image...
    enter this CSS code into the head of your page:
    Code:
    <style type="text/css">
    .submit{
    background: transparent url(image.ext)fixed no-repeat;
    width: width in pixels;
    height: height in pixels;
    border: none;
    }
    </style>
    Now use this code for your submit button:
    Code:
    <input type="submit" class="submit" value=" " />
    That should help for the submit button...

    Hold on man I can solve the thing if you tell me how many check boxes there are total and how many need to be selected to go to page one, how many for page two, and so on...

    Hope that this helps!

  8. #8
    Join Date
    Sep 2007
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Alright...

    There are 16 or 17 boxes. If you choose 1-3 it goes to one page. If you choose 4-6 it goes to a second page. If you choose 7 or more it goes to a third page.

    I think that's it.

Bookmarks

Posting Permissions

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