Ways to create pricing forms with drop-down and automatic summation with Java

Asked By 10 points N/A Posted on -
qa-featured

What java code do I need create pricing forms on my web page alongside drop-down menus to easen selection and a field automating the item price total of the selected products?

 
 
SHARE
Best Answer by Taylor Laura
Answered By 0 points N/A #148248

Ways to create pricing forms with drop-down and automatic summation with Java

qa-featured

 

Java is an imperative, object-oriented, generic, reflective computer language designed mainly for application, web programming.Java code in an HTML page by using the special delimiter<% and %>. A JSP is compiled to a Java servlet, a Java application in its own right, the first time it is accessed. After that, the generated servlet creates the response

Best Answer
Best Answer
Answered By 15 points N/A #197931

Ways to create pricing forms with drop-down and automatic summation with Java

qa-featured

Hello,

Adding drop-down menu and forms in your website won’t be a problem if you’re familiar with Java and JavaScript.
 
They’re basically famous for creating GUIs and gadgets on your website to make it more dynamic and functional.
 
For Java you can use the power of Combo Boxes. Combo Box is one of the applications of Java programming.
 
Here you can create a menu which allows the user to choose from several selections.
 
The default here is uneditable form, but you can program it to make it editable if you want.
 
The other kind of combo Box is the Custom renderer. This will display each item in its menu.
 
If just want to display prices, I suggest that you use the uneditable combo box.
 
Custom Renderer is good if your application includes graphics or images.
 
 
You can use JavaScript for your needs as well. It is much simpler than Java but it can be a little bit limited. The code below show an example of a JavaScript program for dropdown:
 
SCRIPT LANGUAGE="javascript">
<!–
function OnChange(dropdown)
{
var myindex = dropdown.selectedIndex
var SelValue = dropdown.options[myindex].value
var baseURL = <Some value based on SelValue>
top.location.href = baseURL;
 
return true;
}
//–>
</SCRIPT>
 
 
You need to insert this program in the HTML code of your Web page.
 
Regards,
Taylor

Related Questions