Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 10 of 10
  1. #1
    Junior Member rango's Avatar
    Join Date
    Mar 2011
    Posts
    2
    Member #
    27144
    Hi all,
    I'm making an HTML website for a local restaurant and they have asked me to include a search bar for allergies. So when a person types in their allergy it excludes menu items that they can't eat. Or at least makes them aware of what dishes they can't eat.
    Any suggestions for this kind of search function? If this isn't possible any alternatives would be greatly appreciated

    Thanks

  2.  

  3. #2
    Senior Member Harmonic's Avatar
    Join Date
    Jan 2011
    Location
    Toronto
    Posts
    291
    Member #
    26468
    Liked
    23 times
    this is impossible with pure HTML.

    What you can do is include Google search instead.
    http://www.google.com/cse/

  4. #3
    Junior Member rango's Avatar
    Join Date
    Mar 2011
    Posts
    2
    Member #
    27144
    I know it's not possible with only HTML but is there and kinda of java that I could incorporate maybe?

  5. #4
    Senior Member Harmonic's Avatar
    Join Date
    Jan 2011
    Location
    Toronto
    Posts
    291
    Member #
    26468
    Liked
    23 times
    no. Unless you want to use a database or PHP, ASP.Net etc etc you can't do it.

  6. #5
    Unpaid WDF Intern TheGAME1264's Avatar
    Join Date
    Dec 2002
    Location
    Not from USA
    Posts
    14,483
    Member #
    425
    Liked
    2783 times
    What Harmonic said. This basically requires some form of server side programming and a database. You could do something involving AJAX, but that's ultimately going to have a server-side component as well.
    If I've helped you out in any way, please pay it forward. My wife and I are walking for Autism Speaks. Please donate, and thanks.

    If someone helped you out, be sure to "Like" their post and/or help them in kind. The "Like" link is on the bottom right of each post, beside the "Share" link.

    My stuff (well, some of it): My bowling alley site | Canadian Postal Code Info (beta)

  7. #6
    Member
    Join Date
    Jan 2011
    Location
    Edmonton, Alberta
    Posts
    82
    Member #
    26483
    Liked
    2 times
    Database would be the easiest for this. You could query the database based on the searches and tell it to negate the searched items from the results. This would require a fair knowledge of PHP and have a database handy. This would be quite a bit of work. I would consider perhaps a page on allergies or something that can just be hard-coded in if you do not want to spend the time working with a database.
    Check out some of my work: http://www.jr-webdesigns.com

  8. #7
    Senior Member Harmonic's Avatar
    Join Date
    Jan 2011
    Location
    Toronto
    Posts
    291
    Member #
    26468
    Liked
    23 times
    Database would be the easiest for this
    This would require a fair knowledge of PHP
    This would be quite a bit of work
    aha, OR you could just include Google Search and NOT have to recode the entire site in a database which would 'require an extensive knowledge of PHP' and 'would be quite a bit of work'.

  9. #8
    Member
    Join Date
    Jan 2011
    Location
    Edmonton, Alberta
    Posts
    82
    Member #
    26483
    Liked
    2 times
    The only thing I wonder about using Google Search is if it can be set up to accomplish the goals that rango mentioned. He would need it to either exclude menu items that are associated to the allergy or give the user information on which dishes they should avoid. I suppose if you included information on each menu item regarding the associated allergies, then the Google Search could find those when the user types in the specific allergy.

    And when I said that the database would be the easiest, I actually meant the best (not to take away from the Google Search, I merely mean from a personally coded viewpoint). :P
    Check out some of my work: http://www.jr-webdesigns.com

  10. #9
    Unpaid WDF Intern TheGAME1264's Avatar
    Join Date
    Dec 2002
    Location
    Not from USA
    Posts
    14,483
    Member #
    425
    Liked
    2783 times
    Quote Originally Posted by Jeffrey Rank, post: 200600
    I would consider perhaps a page on allergies or something that can just be hard-coded in if you do not want to spend the time working with a database.
    I'd agree with that if I hadn't visited a daycare or elementary school in the last 5-10 years. I actually did some IT work in a daycare a few years back for a client (because they were stuck and had nowhere else to turn). There were 12 kids in the daycare, and 5 of them had Epipens.

    The poor chef at the place had a five-page list of the things he couldn't serve the kids because someone was allergic to whatever. And we're talking some of the strangest things, too, like strawberries and pepperoni (I didn't even know pepperoni could cause allergies). He made a pizza the first day I did work and I ended up having to eat half of it myself because he couldn't serve it to the kids since he missed the pepperoni instruction. Not that I minded...I didn't have to do anything other than reheat my dinner for three days straight.

    Seriously, though, there are some messed up allergies out there. There's no way a hard-coded page would work for this. You'd pretty well have to get a database and keep it updated.
    If I've helped you out in any way, please pay it forward. My wife and I are walking for Autism Speaks. Please donate, and thanks.

    If someone helped you out, be sure to "Like" their post and/or help them in kind. The "Like" link is on the bottom right of each post, beside the "Share" link.

    My stuff (well, some of it): My bowling alley site | Canadian Postal Code Info (beta)

  11. #10
    Senior Member Harmonic's Avatar
    Join Date
    Jan 2011
    Location
    Toronto
    Posts
    291
    Member #
    26468
    Liked
    23 times
    So when a person types in their allergy it excludes menu items that they can't eat. Or at least makes them aware of what dishes they can't eat.
    I was thinking that Google Search could help with the latter. If someone is allergic to strawberries then searching the site for "strawberry" would bring up all the recipes with strawberries in them, making them aware of what dishes they can't eat


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 06:56 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com