This is a proto type of a much larger project. I have items that different values and only on needs to be seleced. Then I want to compile alll selected components to new html window for printing or export to .pdf. I have gottent to the end of my knowledge on this. Can one help me to export one or all of the check boxes to a new window or pdf?

<!DOCTYPE html>

    <meta charset="utf-8">
    <script src="tabcontent.js" type="text/javascript"></script>
    <!--- <script src="printselected.js" type="text/javascript"></script>  -->
    <link href="template5/tabcontent.css" rel="stylesheet" type="text/css" />


    <style type="text/css">
    body {
        padding-bottom: 800px;
        background-color: rgb(80,204,204)


    p {
        -webkit-user-select: none;  
        -moz-user-select: none;    
        -ms-user-select: none;      
        user-select: none;

    .bg_color {
        background-color: rgb(255,0,0)
    h2 span {
        margin-top: 300px;
        padding-bottom: 300px;
        display: block;
    .title-text {
        text-align: center;
        background-color: gray;
        padding: 5%;

    /*----- Tabs -----*/
    .tabs {
        background-color: blue;
        -webkit-user-select: none;  
        -moz-user-select: none;    
        -ms-user-select: none;      
        user-select: none;



This is the original code I found for the output check boxes.

Soccer: <input type="checkbox" name="sports" value="soccer"  /><br />

I have  included the check boxes in each definition type and changed the name to the General, High, Low according to the tab that it is under.  I do not know how to define the value but I attempted any how.


    <div style="width: 75%; margin: 0 auto; padding-left: 22%;">
    <h2><strong>Information: Choose one of the following.</strong></h2>
        <h3 id="complex-link">How to be happy!</h3>
        <ul class="tabs" data-persist="true">
            <!---<li><a href="#viewGENERAL">General</a></li>
            <li><a href="#viewA">A</a></li>
            <li><a href="#viewB">B</a></li>
            <li><a href="#viewC">C</a></li>

        <div class="tabcontents">
            <div id="viewGENERAL">
                <p> This is a general overview of how to be happy.<br><br>

                Output interpretation <strong>General</strong>:<input type="checkbox" name="General" value="viewGENERAL"  /><br /></p>

            <div id="viewA">
                <p> A.  Be nice.<br><br>

                Output interpretation <strong>A</strong>:<input type="checkbox" name="A" value="viewA"  /><br /></p>

             <div id="viewB">
                <p> B. Work hard.<br><br>

                Output interpretation <strong>B</strong>:<input type="checkbox" name="B" value="viewB"  /><br /></p>

            <div id="viewC">
                <p> C. You must excercise!<br><br>

                Output interpretation <strong>C</strong>:<input type="checkbox" name="C" value="viewC"  /><br /></p>


    <p> Use this button to export your selections to a print window.<p>
    <input type="button" onclick="sayHello()" value="Print" />


Recommended Answers

All 2 Replies

you don't just mix html files and Java. You would need jsp or jsf files for that. Maybe you would do better to post with the jsp tag instead.

How does one go about adding a jsp tag? Thanks in advance.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.