[thelist] JSP question

Steve Lewis nepolon at worlddomination.net
Tue Oct 21 13:09:41 CDT 2003


Tom Dell'Aringa wrote:

>--- Steve Lewis <nepolon at worlddomination.net> wrote:
>  
>
>I do in fact want to decide whether to show a specific div in the
>"includes/dashboards.jsp" file. I may end up having 4-5 divs in there
>which will only show at certain times based on data in the calling
>page. (the page calling the include). All my pages in this app call
>this include.
>  
>
So to be clear, the setting which identifies the div to show is made in 
the calling page.  The dashboards file is interpreting the setting to 
chose a div.  That makes plenty of sense.

As others pointed out you had a variable scope problem when defining 
"showDiv" in one place and using it in another.  As an addendum, If you 
have more than three divs available to choose from you should probably 
abstract out another layer to keep the code from going to spagetti, not 
that I have a problem with pasta when its on my plate instead of on my 
screen. :)

Steve



More information about the thelist mailing list