iEntry 10th Anniversary Forum Rules Search
WebProWorld
Register FAQ Calendar Mark Forums Read
Web Programming Discussion Forum Working with an API? Developing a plugin? Writing a Mod or script for your favorite blog, Web 2.0 site or Forum? Welcome.

Share Thread: & Tags

Share Thread:

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 05-31-2005, 03:44 PM
Bohak's Avatar
WebProWorld Pro
 
Join Date: May 2004
Location: FL
Posts: 116
Bohak RepRank 0
Default basic html order form question

I have an order form that allows customers the option to choose products from two seperate drop down menus. Either 1 of the fields or both of the fields should be allowed to be selected. Both of them should not be required to be selected. How do I set these drop down menus up so that either one or the other, or both can be selected? I guess that both fields need to be named the same name.

Let me know if this makes sense.

Below is the order form url:

https://www.keysecure.com/physicians...ssproducts.htm


Thanks
__________________
BohakGraphics.com
Reply With Quote
  #2 (permalink)  
Old 05-31-2005, 05:32 PM
WebProWorld MVP
WebProWorld MVP
 
Join Date: Jul 2004
Location: Omaha
Posts: 2,714
brian.mark RepRank 3brian.mark RepRank 3
Default Took a look...

I took a look at your form, but I don't see what fields you were meaning. I got confused by your description anyway, but that's probably lack of sleep setting in. Being a new parent is such fun.

Brian.
__________________
ToolBarn.com, an Internet Retailer Top 500 and Inc. 500 Company | Tool Parts | Pet Supplies
Reply With Quote
  #3 (permalink)  
Old 06-02-2005, 10:08 AM
Bohak's Avatar
WebProWorld Pro
 
Join Date: May 2004
Location: FL
Posts: 116
Bohak RepRank 0
Default fields

These are the 2 fields I am referring to:
http://www.physiciansselect.com/fields.jpg

The first drop down menu (located just below the text that says Herbal Weight Loss Products(see image above), allows the customer to select a product directly related to Weight Loss Supplements. In an attempt to sell them additional supplements, there is another drop down below it, named "Related Supplements".

Basicly, the customer needs to be prompted if they do not select at least one product from either of these 2 drop down menus. However, it does not need to be required that they select a product from both of them.

Let me know if this helps you.......to help me.
__________________
BohakGraphics.com
Reply With Quote
  #4 (permalink)  
Old 06-02-2005, 04:16 PM
Bohak's Avatar
WebProWorld Pro
 
Join Date: May 2004
Location: FL
Posts: 116
Bohak RepRank 0
Default helloooooooooooo.............

Anybody out there?
__________________
BohakGraphics.com
Reply With Quote
  #5 (permalink)  
Old 06-02-2005, 11:47 PM
WebProWorld MVP
WebProWorld MVP
 
Join Date: Jul 2004
Location: Omaha
Posts: 2,714
brian.mark RepRank 3brian.mark RepRank 3
Default You'll need...

You'll need either JavaScript to check them when the submit button is clicked, or you'll need to handle it server side.

According to our web stats, 85% of people have JavaScript enabled on our site, so that would leave 15% of people still broken if you choose JavaScript and the same is true on your site.

Server side would depend on what you're using to process the form and would require a much greater knowledge of programming, but it would work for everyone after the form post.

If you want to use JavaScript, you'd need to do something similar to the following:

Code:
<Script Language="JavaScript">
<!--
function validate()
{
    if (page.formOrder.field1.value <> "" OR page.formOrder.field2.value <> "")
    {
        return true;
    } else {
        alert('Please select one or the other');
        return false;
    }
}
//-->
</Script>
My JavaScript is a bit rusty as I do everything server side for the past several years, but it should be fairly close. The only other thing you'd have to do is call the function from your submit button.

Brian.
__________________
ToolBarn.com, an Internet Retailer Top 500 and Inc. 500 Company | Tool Parts | Pet Supplies
Reply With Quote
  #6 (permalink)  
Old 06-03-2005, 01:18 PM
Bohak's Avatar
WebProWorld Pro
 
Join Date: May 2004
Location: FL
Posts: 116
Bohak RepRank 0
Default yaromat

Thanks Brian,

Im going to try that.
I dloaded a Dreamweaver extension at:
http://www.yaromat.com/dw/?ex=Check%20Form%20MX

This is very easy to use, however, for some reason the extension will not recognize the drop down menus as fields and therefore will not allow them to be checked. In other words. How do I make these drop down menus required fields?

Thanks again for the advice.

Im gonna try out that script, but Im pretty sure I will have the same problem.

-Bohak
__________________
BohakGraphics.com
Reply With Quote
  #7 (permalink)  
Old 06-03-2005, 02:29 PM
WebProWorld MVP
WebProWorld MVP
 
Join Date: Jul 2004
Location: Omaha
Posts: 2,714
brian.mark RepRank 3brian.mark RepRank 3
Default Never tried...

I've never tried Deamweaver. Personally, I use vi through ssh sessions, but I don't recommend this for anyone that hasn't grown up with UNIX.

The problem with any HTML generator is that it is only as good as the people who wrote it.

Brian.
__________________
ToolBarn.com, an Internet Retailer Top 500 and Inc. 500 Company | Tool Parts | Pet Supplies
Reply With Quote
Reply

  WebProWorld > Webmaster, IT and Security Discussion > Web Programming Discussion Forum

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 02:58 PM.



Search Engine Optimization by vBSEO 3.3.0