yeah, it can be done with ASP because COM objects are put into the HTML
document using the <object> tag, which is part of the DOM and can be
manipulated as such. JavaBeans never end up as objects in the rendered HTML
page, the <jsp:usebean> tag is processed on the server and ripped out of the
rendered file. View source shows this to be true.  As such, the bean id is
only accessable to JSP scripts, whereas the COM object id is accessable to
JScript/VBScript.

As for the display stuff, I messed up the syntax. It should be <div
style="display:none|block"> - there are other options, but these are the two
most often used. The "display" style is similar to the "visibility" style,
except that "visibility" keeps the whitespace allocated for the div on the
page, even if it's set to "invisible". "display" will dynamically reformat
the page when you switch from "none" to "block", dropping everything below
the div down to accommodate it.

Here's the example of what I'm trying to do:
http://www.microsoft.com/downloads/search.asp?
(Note, you need to be using IE5+)

select a product and click "find it". Notice that the page does not refresh,
but instead the table is populated with the relevant data and built on the
fly? Also, switching to the "next" or "previous" pages simply updates the
table, it doesn't reload the entire page.  This is great for complicated
page structures with lots of nested tables, especially pages designed with a
leftnav, as tables only display on the brower once the entire table has been
parsed (unless you use the "table-layout: fixed" style, which only works
under certain circumstances")... Instead of waiting for an entire new page
to load, jut modify the relevant area.

Anyway, it's not that big of a deal, more of a "nice to have", but as we
start seeing more ASP sites doing this, people are going to want to be able
to do the same thing with Java, I'm sure.

david

----- Original Message -----
From: "Richard Yee" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, September 21, 2001 2:43 PM
Subject: Re: how to access servlet from the jsp page


> DAVID,
> (In the last email I confused your name w/ one from another email.  Sorry)
> I'm not that familiar with using the display= in a div tag.  Perhaps you
> could elaborate more on how it works.  One question, can your ideal
> solution be done in ASP now?  What you described seems to be able to be
> done w/ JSP's. Have you done it before?
>
> -Richard
>
> At 01:52 PM 9/21/01 -0400, you wrote:
> > > Dick,
> >
> >hey, there's no need for name-calling ;p
> >
> > > I can't imagine anyone ever trying to tie an event such as a rollover
to a
> > > server-side class.  The network latency would make the UI not very
> > > useable.  What is supposed to happen on the UI when the rollover or
click
> > > event happens?
> >
> >actually, I was planning on using it for an onClick event, rollovers
would
> >be too slow, definitely. Here's what would happen in my perfect world: A
> >user would enter some search criteria, and hit "submit'. The server would
> >then invoke a method on a bean, which would return a result set (note:
> >without forwarding or refreshing the page), and I'd populate a <div
> >display="none"> with that result set, and then set display to "block" to
> >show it. oooooh.....
> >
> >instead, what I'll probably end up doing is nesting an iframe within a
<div
> >display="none">, and when the user clicks submit, it'll forward the src
of
> >the IFRAME to the necessary servlet or jsp, which will set div display to
> >"block" onLoad.
> >
> >david
> >
> > > -Richard
> >
>
>===========================================================================
> >To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> >JSP-INTEREST".
> >For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
DIGEST".
> >Some relevant FAQs on JSP/Servlets can be found at:
> >
> >  http://java.sun.com/products/jsp/faq.html
> >  http://www.esperanto.org.nz/jsp/jspfaq.html
> >  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
> >  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
>
>
===========================================================================
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
> For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
DIGEST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
>
>

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to