views:

279

answers:

1

I am using a javascript function (F) (jquery )which uses 3 select values selected by the user to calculates a value - R(result)

R is a number ranging from (1 through 9), (11) and (22);

I need 2 extra steps one before the calculation and one after.

a. Before calculation takes place: Make sure all three select values are changed before function(F) takes place. If not prompt the user with a notice ( create dom element/ I am using jquery)

b. After the value R is calculated show an element corresponding to the result e.g. if R is 1 show an element ( a predetermined "link" element corresponding to each result value)

thanks a lot.

A: 

It does sound like your problem in general is that you simply don't know how to code. You should be able to solve your problem if you know and understand how an if statement works.

Here is a little reading to get you started: http://javascript.about.com/library/bltut04.htm and http://www.w3schools.com/js/js_if_else.asp

There is a lot of good stuff on W3schools, so if you have any other problems, that may be a good place to start.

You also might want to hold back a little with the use of jQuery. It is not a programming language in it's own right, it is only a tool to use with JavaScript, and it is a lot better tool if you have got a solid base in JavaScript, or at least some other real programming language.

eBusiness