×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

I want to add a menu to my website with values that add as selected

I want to add a menu to my website with values that add as selected

I want to add a menu to my website with values that add as selected

(OP)
I want to have a menu for my customers to use to choose the various services I have.  I may have 20 or 30 items to choose from.  I will assign a value to each and as the item is checked or selected using a radio button, the form would add and give a total.  Can someone help me with this?  Is there a form I can just modify?  I am not a programmer, just a novice Frontpage 2000 user.

RE: I want to add a menu to my website with values that add as selected

for basics, what you need is a table with the product names a check boxes, and the prices - it would probably be easiest to have each product have 3 seperate fields across the table.
then you need a form showing all these fields on your form.
then in the After Update property of each of the checkboxes, have a Macro that simply does a Refresh on the form.  and have an unbound textbox on the form for the total that has a formula to add all the prices together for all the fields that are checked.  the easiest way to do this would probably be to multiply the price*Yes/No (which is saved as -1/0, respectively) and then add all of those totals together, and then multiply by -1.

ok, this makes it sound harder than it is, but the formula for the total would look like:

= -1*([Item1Price]*[Item1Check]+[Item2Price]*[Item2Check]+[Item3Price]+[Item3Check])  
and so on.

Brian Famous
bfamous@ncdoi.net

RE: I want to add a menu to my website with values that add as selected

If you put the items in a database of somesort then it becomes very easy to:
1. Create a table to show the items
2. check to see if they are checked or not
3. to add them up if they are.
This would be done in a Loop for Next or Do Until:

Here is one I am using to do something similar: Now this requires your ISP to have Active Server Pages (.ASP)
-------------------------------------------------
<%@ Language=VBScript %>

<%
Set Conn = server.CreateObject("ADODB.Connection")
Conn.Open "driver=SQL Server;server=server.com;uid=UserID;pwd=password;database=databasename;"
Set RS1 = Conn.Execute("SELECT [STOCK_CODE], [Description], [SELLING_PRICE] FROM [Copy-PartMaster Lite]")
%>


  <tr>
    <td width="10%" align="left"> </td>
    <td width="18%" align="left"> </td>
    <td width="52%" align="left"> </td>
    <td width="12%" align="right"> </td>
   </tr>

<%If Not RS1.EOF Then
   Do
      <tr>
      <td width="10%" align="left">
           <p align="center"><input type="submit" value='Add <%=RS1("STOCK_CODE")%>' name="addtopo"></td>
<td width="18%" align="left">
       <p align="center"><%Response.Write RS1("STOCK_CODE")%></td>
      <td width="52%" align="left">
           <p align="center"><%Response.Write RS1("Description") %></td>
      <td width="12%" align="right">
       <p align="center"><%Response.Write RS1("SELLING_PRICE")></td>
      </tr>
     RS1.Movenext
   Loop Until RS1.EOF
End If%>
----------------------------------------

this puts a Command button in the first row of the table.

DougP
dposton@universal1.com

Ask me how Bar-codes can help you be more productive.

RE: I want to add a menu to my website with values that add as selected

(OP)
Thank you Doug.  I guess I need to get familiar with ASP and I will contact my ISP and see if ASP is supported.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login


Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close