how to show the particular div in a jsp page?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • techuse
    New Member
    • May 2010
    • 19

    how to show the particular div in a jsp page?

    link 1:compose
    link 2: readmail


    Code:
    <div name="compose" id="compose">
    
      //code for compose mail
    
    </div>

    Code:
    <div name="readmail" id="readmail">
    
      //code for readmail
    
    </div>
    I don't know how to show the particular div in a jsp page.

    If we click link 1 it should render the compose mail div.if we click link 2 it should render readmail div.
    Last edited by Frinavale; Aug 31 '10, 06:52 PM. Reason: Please post code in [code] ... [/code] tags in the future. Added code tags.
  • chaarmann
    Recognized Expert Contributor
    • Nov 2007
    • 785

    #2
    You are in the wrong forum!
    This is a Javascript question, not a Java question.

    By the way, to show the div, just add an onClick-event to your link1 with:
    Code:
    document.getElementbyId("compose").style.display="";
    document.getElementbyId("readmail").style.display="none";

    Comment

    Working...