#1
  1. No Profile Picture
    Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2000
    Location
    United Kingdom
    Posts
    26
    Rep Power
    0

    Unhappy Jsp - Javascript


    Hi All,
    Is there a way that i can pass a variable from JSP to Javascript?

    Actually, I'm planning to do a dynamic menu based on the valued i get from the database..... I don't have any clue to start with... Any help????

    Many Thanks,

    Nithya
  2. #2
  3. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2001
    Location
    Pittsburgh, PA
    Posts
    3
    Rep Power
    0
    I'm not clear on what you're asking. Do you mean something like this:

    <%
    String msg = "Hello, world";
    %>

    <html>
    <body>
    <script language="javascript">
    alert('<%= msg %>');
    </script>
    </body>
    </html>

IMN logo majestic logo threadwatch logo seochat tools logo