Results 1 to 2 of 2
  1. #1
    cajax is offline Member
    Join Date
    Dec 2011
    Posts
    2
    Rep Power
    0

    Default TABLEDATA---onclick--> SERVLET with TABLEDATA id/name/etc.

    Hi there!

    I'm encountering a problem while trying to give table-cells of a html table some button-like charakter.
    So I have this 14x7 table in my .jsp. All the TDs have the structure you can see below. What I'd like to do, is clicking on one of the TDs bringing me to my servlet and having a reference of what i clicked on in there (no matter if its the (name/value/ <- can those even be part of a TD's signature?) id of the cell).
    Is that even possible?
    Thanks a lot in advance!

    XML Code:
    <td onmouseover="style.backgroundColor='#EEEEEE'"
    onmouseout="style.backgroundColor='#FFFFFF'"
    onmousedown="style.backgroundColor='#DDDDDD'"
    onclick="location.href='controller'"
    id="(tag*100+std)">
    <%= stdpl.getterm((tag*100+std)) %></td>

  2. #2
    cajax is offline Member
    Join Date
    Dec 2011
    Posts
    2
    Rep Power
    0

    Default Re: TABLEDATA---onclick--> SERVLET with TABLEDATA id/name/etc.

    come on guys, i really need help here! i know you can do it =)

    ok maybe in other words:
    when i add a onclick to a html component and the onclick is defined as:

    onclick="location.href='controller'"
    or
    onclick="location.href='dialog.jsp'"

    , how do i get the component which sent me to my controller or dialog.jsp (in matter of name, id or anything else)?

    or is there another way to solve my problem?

    thanks a lot!
    Last edited by cajax; 12-17-2011 at 01:27 PM.

Similar Threads

  1. onclick event in jsp
    By happy in forum Java Servlet
    Replies: 4
    Last Post: 06-30-2011, 09:22 AM
  2. help with onclick
    By unplugged in forum Java Applets
    Replies: 4
    Last Post: 12-15-2009, 12:24 AM
  3. use of onclick function
    By m4tt in forum New To Java
    Replies: 1
    Last Post: 02-16-2008, 03:03 AM
  4. JButton onClick?
    By Joe2003 in forum AWT / Swing
    Replies: 2
    Last Post: 01-06-2008, 03:04 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •