Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New Coder
    Join Date
    Mar 2012
    Location
    Leicester
    Posts
    21
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Question Javascript Database Product Search and Display?

    hi,
    im fairly new to javascript but i know the basics.
    im just wondering is there a possibility to make a search that will connect to my databse with a product list in it, and then display any matches to what the user searched for?
    help is always helpful
    Last edited by fightapilotdean; 03-22-2012 at 11:30 AM. Reason: quick change

  • #2
    Senior Coder
    Join Date
    Dec 2010
    Posts
    2,398
    Thanks
    12
    Thanked 570 Times in 563 Posts
    You cannot do this with Javascript only. You'll need an intermediate server side script (like PHP or Perl etc) that will connect to the database, execute some query and return (output) the result. Javascript will then only request this server side script and can access the output of this script after the request finishes.

    Keyword: Ajax

  • #3
    New Coder
    Join Date
    Mar 2012
    Location
    Leicester
    Posts
    21
    Thanks
    2
    Thanked 0 Times in 0 Posts
    ahhh :/ is this easy to do then with php. but what is more reliable php or aspx. iv used php and i can do a log in system but for asp i find it confusing. thank you for reply

  • #4
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    26,198
    Thanks
    80
    Thanked 4,453 Times in 4,418 Posts
    Use what you are comfortable with. PHP, JSP, ASP, ASP.NET, CGI, etc.

    And don't forget you also have to choose a database system: SQL Server, Oracle, MySQL, etc.

    But also use what your server supports. Only Windows will support ASP or ASP.NET. Only Windows will support SQL Server. Linux systems usually come with PHP and MySQL already configured. So your choices may be constrained by what server you have available, anyway.
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.


  •  

    Posting Permissions

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