Jump to content

JSP, Java, Javascript, and HTML


alanschu

Recommended Posts

To anybody experienced with HTML/JSP/JavaScript,

 

Is there a way to dynamically update what a user sees on the webpage based on the options he selects (I know there must be...I just don't know it haha).

 

 

In my DB course I have to provide an interface to a DB for a user. It involves digging up tar sands oil, and they need to be able to use an interface that allows for them to essentially create their SQL "Where" condition from a series of combo boxes (based upon what predicate they want to set up). The issue here, is that the user should be able to establish as many predicates as they see fit, based on the information.

 

 

Soooooooo, how can I make the webpage update so that when I take the last combo box, I update the page shown, and allow another predicate's options to be selected.

 

I'll also need to get the information from every single combo box, to construct my SQL query.

 

 

Thanks!

Link to comment
Share on other sites

  • 3 weeks later...

Whoops, I missed this!

 

What you want is called 'AJAX' (plenty of info for it on Google). And your problem sounds perfectly doable.

 

I'm assuming you already know PHP and SQL right? Let me know if you need help.

 

P.S. **** me, it's half past midnight and the temperature is 20 degrees Celsius outside!.

Link to comment
Share on other sites

Ajax will work nicely for this, but it can be done through other means as well. In asp.net you could just use viewstate to reset the controls after the page reloads (postback). And then keep on selecting.

 

I'm sure you can do something similar in PHP.

 

The AJAX solution is more elegant though, but also a bit trickier to get to work properly.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...