This is a JavaScript issue, not a Webware one, but here is a quick pointer.

1) Setup a listbox on the page adn add a javascript function to add values to that listbox

function addopt2(nValue, sText){
  // this routine adds a new item to our listbox
  document.Groups.list2.options[document.Groups.list2.options.length] =
new Option(sText, nValue);
}

2) When the user clicks a button fire off this JavaScript

function getLevel2(sCode){
  if (sCode == 'NONE' || sCode == ''){
    // if they click on an label or empty value
  } else {
    // a non-empty area
    window.open("popfetchlevel2?level=2&code=" + sCode, + ",
gofetch","toolbar=no,menubar=no,location=no,directories=no,status=no,resizea
ble=no,width=100,height=100,left=100,top=100");
  }
}

This will pop up a window that will call a servlet to interact with the database and then call teh javascript from step 1 to update the page.

Webware Tip: Override writeHTML in the pop-up servlet to bypass yourr layout

step 3
Write your servlet to return an html page containing javascript such as:

<script>
window.opener.addopt2("aheld", "Aaron Held");
window.opener.addopt2("asd", "another name");
</script>

window.operner.addopt2 directly calls the javascript from step1

-Aaron




Paul Jessup wrote:


Dear Webware,

I am going to try out you system to-night. It seems similar to Cold Fusion
Application Server. I am interested in Python and Jython very much for
future projects. I write web applications for customers using Cold Fusion.

I am trying (with difficulty) to do the following, which I can of course do
one item at a time by posting the page, but not as follows.

The idea is to create a page, which the user enters a reference number, the
program looks up this in the database, puts the relevant description or "not
found" on the screen. The user enters the quantity, and the program work out
the total,, and puts the next input box on the screen, WITHOUT leaving the
page. Possible?

Anyway, if this can be done, I would be grateful for pointers!

Kind regards,
Paul Jessup




-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Webware-discuss mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/webware-discuss






-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Webware-discuss mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/webware-discuss

Reply via email to