HTML or PHP Process Input Selects?

by d1ey0u
3 replies
Hello Warriors,

I come to you today with a simple request. I've tried searching the forum, and Google but no results. I can't really sum this question up in just 1 sentence.

So, this is my problem..

I have 3 drop down selection boxes on the homepage of my website, then a button that says "Check!" I will use 3 examples below.

1. Color
a. Red
b. Blue
c. Green

2. Size
a. Small
b. Medium
c. Large

3. Year
a. 2009
b. 2010
c. 2011

For this example we select: Red, Large, and 2010

When Check! is clicked I need a box to pop up and will show each step within the box.

Connecting to our servers....
Checking Red....
Checking Large....
Checking 2010....
Generating report....

This script doesn't really need to check anything. It only needs to show each "step" for a second or two before it moves on.

I'm trying to see if this will help my conversions by giving my potential buyers more confidence.

I'm pretty sure this can be done in HTML, and it seems like it wouldn't be too hard to figure out. If someone could help me with the processing box or point me in the right directions, I would greatly appreciate it!
#html #input #php #process #selects
  • Profile picture of the author JayBansal
    Originally Posted by d1ey0u View Post

    Hello Warriors,

    When Check! is clicked I need a box to pop up and will show each step.

    Connecting to our servers....
    Checking Red....
    Checking Large....
    Checking 2010....
    Generating report....
    You need to use Javascript for this. Use onchange event on each of your checkboxes and create a separate function or use variables which will call the popup box.

    Something like:
    HTML Code:
     <input type="radio"  name="color" value="red"  onchange="callfunction('red')">
     <input type="radio"  name="color" value="blue"  onchange="callfunction('blue')">
     <input type="radio"  name="color" value="green"  onchange="callfunction('green')">
    then in the javascript you can execute what you want:
    HTML Code:
    function callfunction(varname) {
    //your code to call popup box
    }
    For more help refer here onchange Event
    {{ DiscussionBoard.errors[7363972].message }}
  • Profile picture of the author d1ey0u
    Thanks for your share JayBansal.

    Unfortunately I don't think this is the case here. I tried playing around with this, and to from my knowledge this doesn't do what I'm asking.

    I a box to pop up as an overlay on the page after check is selected. That box will just have some texts that shows each step 1 by 1.

    Connecting to our servers.... (step 1)
    Checking Red.... (step 2)
    Checking Large.... (step 3)
    Checking 2010.... (step 4)
    Generating report.... (step 5)

    Each step should show for 1 - 2 seconds, then it shows the next step in the overlay box with no reloading. I know this is simple, but I'm new, and I'm probably making it more complicated then it needs to be.

    Thanks for your help Warriors.
    {{ DiscussionBoard.errors[7364013].message }}
    • Profile picture of the author Brandon Tanner
      There's no way to do this with just HTML, as HTML can not "interact" with the user. You would need to use Javascript or jQuery. The easiest way would be jQuery.

      Here are the methods you would need to implement:

      Run a function when something is clicked (ie your "Check" button)...

      .click() – jQuery API

      Get the values from the inputs (ie drop down boxes)...

      .val() – jQuery API

      Add time delays...

      .delay() – jQuery API

      Popup windows...

      Dialog | jQuery UI

      If you're not comfortable with Javascript/jQuery, then you can always pay someone to do it for you. Shouldn't require more than an hour or 2 of work.
      Signature

      {{ DiscussionBoard.errors[7365671].message }}

Trending Topics