SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Member Ltype's Avatar
    Join Date
    Oct 2004
    Location
    Montreal
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Javascript or not

    Hello all,
    I am not sure this post belongs in the Javascript section but here it goes:

    I need code that would let a visitor enter 2 numbers (ex: 600 for pressure and 1000 for volume) once they have entered those, a machine model is suggested to the visitor (ex: for your criterias, we suggest our model xyz).

    Can this be done with javascript or am I 'stuck' using php and mysql which I do not want to use?

    All I need here is to be told, yes you can do that with javascript or no and if you have an example, that would make my day!

    Thank you!
    Ltype

  2. #2
    SitePoint Wizard
    Join Date
    Nov 2004
    Location
    Portsmouth UK
    Posts
    1,498
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    assuming that all products have a pressure and volume range

    these ranges can be fields of a dimensioned array together with the product reference

    a search of this array will identify those products which match the entered pressure and volume and display the matching products.

    Not that difficult.

  3. #3
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    17,226
    Mentioned
    194 Post(s)
    Tagged
    2 Thread(s)

    javascript

    As long as the script is not essential, (maybe provide a chart for non-javascript-enabled users) and is not used for order transactions, (javascript can be altered by the user) I think using javascript would be an excellent choice. You would need to write code based on what the criteria is. For example model ABC for < 10,000 or model XYZ for >= 10,000 The when values are entered into the form inputs calculate and pass to a conditional.

  4. #4
    SitePoint Member Ltype's Avatar
    Join Date
    Oct 2004
    Location
    Montreal
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank you for your reply.
    I am happy to know it can be done.
    So I can move foward.


Bookmarks

Posting Permissions

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