www.webdeveloper.com
Results 1 to 2 of 2

Thread: tr class not working

  1. #1
    Join Date
    Apr 2007
    Location
    Italy
    Posts
    104

    tr class not working

    Hi to All,

    I have this problem:

    in my webpage I have a table with different rows that contain a menu fields as these:

    <head>
    <style type="text/css" media="print">
    .exclude {visibility:hidden;display:none;}
    </style>
    </head>

    <body><form><table>

    <tr id="act2" class="exclude">
    <td width="31&#37;" align="center">
    <p align="left">
    <select size="1" name="act_2" id="act_2" style="font-family: Arial; font-size: 10 pt">
    <option value="<%=objRS("Act_2")%>" selected><%=objRS("Act_2")%></option>
    <option value="Click here">Click here</option>
    </select></td>


    <tr id="act3" class="exclude">
    <td width="31%" align="center">
    <p align="left">
    <select size="1" name="act_3" id="act_3" style="font-family: Arial; font-size: 10 pt">
    <option value="<%=objRS("Act_3")%>" selected><%=objRS("Act_3")%></option>
    <option value="Click here">Click here</option>
    </select></td>

    When I generate PDF file both tr don' t appear and it' s correct ...

    But I want to do this thing:

    When the client select the option "Click Here", ONLY in this case, the class must be "exclude", in other choices menu I' d like that tr remain visible in the print phase ...


    Thanks a lot in advance !!!

  2. #2
    Join Date
    Apr 2007
    Location
    Italy
    Posts
    104
    I have solved the problem in this way:

    <head>
    <style type="text/css" media="print">
    .exclude {visibility:hidden;display:none;}
    </style>
    </head>

    <body><form>

    <form method="POST" name="FrontPage_Form1">

    <input type="hidden" name="act2_db" id="act2_db" value="<&#37;=objRS("Act_2")%>">
    <input type="hidden" name="act3_db" id="act3_db" value="<%=objRS("Act_3")%>">

    <table>

    <script language=javascript>
    if (!document.getElementById('act2_db').value.match(/^Click/)) { document.write("<tr id='act2'>"); } else { document.write("<tr id='act2' class='exclude'>"); }
    </script>
    <td width="31%" align="center">
    <p align="left">
    <select size="1" name="act_2" id="act_2" style="font-family: Arial; font-size: 10 pt">
    <option value="<%=objRS("Act_2")%>" selected><%=objRS("Act_2")%></option>
    <option value="Click here">Click here</option>
    </select></td>


    <script language=javascript>
    if (!document.getElementById('act3_db').value.match(/^Click/)) { document.write("<tr id='act3'>"); } else { document.write("<tr id='act3' class='exclude'>"); }
    </script>
    <tr id="act3" class="exclude">
    <td width="31%" align="center">
    <p align="left">
    <select size="1" name="act_3" id="act_3" style="font-family: Arial; font-size: 10 pt">
    <option value="<%=objRS("Act_3")%>" selected><%=objRS("Act_3")%></option>
    <option value="Click here">Click here</option>
    </select></td>


Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles