Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4253638
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T04:58:21+00:00 2026-05-21T04:58:21+00:00

I have a site that I built with jsp’s and I would like to

  • 0

I have a site that I built with jsp’s and I would like to implement css. I am a noob when it comes to jsp’s so any help on how to implement it would be great. I know css is pretty easy and I have worked with it before in wordpress and other things, the implementation is the hard part for me.

Here a sample jsp of mine:

<%@page import="java.util.List"%>
<%@page import="ttp.data.Physical_PackageDAO"%>
<%@page import="ttp.data.Physical_Package"%>
<%@page import="ttp.data.Conceptual_PackageDAO"%>
<%@page import="ttp.data.Conceptual_Package"%>
<%@page import="ttp.data.ProductionDAO"%>
<%@page import="ttp.data.Production"%>
<%@page import="ttp.data.VenueDAO"%>
<%@page import="ttp.data.Venue"%>
<jsp:include page="/header.jsp">
  <jsp:param name="title" value="Choose a Production" />
</jsp:include>


<script type="text/javascript">

function doAjax(responseFunc, url, parameters) {
  // create the AJAX object
  var xmlHttp = undefined;
  if (window.ActiveXObject){
    try {
      xmlHttp = new ActiveXObject("MSXML2.XMLHTTP");
    } catch (othermicrosoft){
      try {
        xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
      } catch (failed) {}
    }
  }
  if (xmlHttp == undefined && window.XMLHttpRequest) {
    // If IE7+, Mozilla, Safari, etc: Use native object
    xmlHttp = new XMLHttpRequest();
  }
  if (xmlHttp != undefined) {
    // open the connections
    xmlHttp.open("POST", url, true);
    // callback handler
    xmlHttp.onreadystatechange = function() {
      // test if the response is finished coming down
      if (xmlHttp.readyState == 4 && xmlHttp.status == 200) {
        // create a JS object out of the response text
            var obj = eval("(" + xmlHttp.responseText + ")");
        // call the response function
        responseFunc(obj);
      }
    }

    // create the parameter string
    // iterate the parameters array
    var parameterString = "";
    for (var i = 0; i < parameters.length; i++) {
      parameterString += (i > 0 ? "&" : "") + parameters[i][0] + "=" + encodeURI(parameters[i][1]);
    }

    // set the necessary request headers
    xmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
    xmlHttp.setRequestHeader("Content-length", parameterString.length);
    xmlHttp.setRequestHeader("Connection", "close");

    // send the parameters
    xmlHttp.send(parameterString);
  }
}//doAjax

function getSeats() {
  var packInput = document.getElementById("packid");
  var packid = packInput.value;
  doAjax(receiveAnswer, "ttp.actions.Sale3PackAction.action", [["packid", packid]]);
}

function receiveAnswer(response) {

  var aSeats = document.getElementById("aSeats");
  //var checks = document.getElementById("checks");
    while (aSeats.childNodes.length > 0) { // clear it out
    aSeats.removeChild(aSeats.childNodes[0]);
  }

   for (var i = 0; i < response.aSeats.length; i++) { // add the items back in

    var check = aSeats.appendChild(document.createElement("input"));
    check.type = "checkbox";
    check.id = i;
    check.name = "aSeats";
    check.value = i;
    var input = aSeats.appendChild(document.createElement("text"));
    var br = aSeats.appendChild(document.createElement("br"));
    input.appendChild(document.createTextNode(response.aSeats[i]));    
  }
}

//function addToCart(){
//    var select = document.getElementById('aSeats');
//    var selectedOption = select.options[select.selectedIndex];
//    //alert("Selected option: " + selectedOption.value);
//    //select.removeChild(selectedOption);
//    var option = document.getElementById("seat2");
//    option.appendChild(selectedOption);
//
//}
//
//function removeFromCart(){
//    var select = document.getElementById('seat2');
//    var selectedOption = select.options[select.selectedIndex];
//    //alert("Selected option: " + selectedOption.value);
//    //select.removeChild(selectedOption);
//
//    var option = document.getElementById("aSeats");
//    option.appendChild(selectedOption);
//}
</script>


<% Venue v = (Venue)session.getAttribute("currentVenue"); %>
<% List<Conceptual_Package> cpList = Conceptual_PackageDAO.getInstance().getByVenue(v.getId()); %>

What Packages do you want to see?

 <form method="post" action="ttp.actions.Sale3PackAction.action">
 <select name="packid" id="packid">
     <% for (Conceptual_Package cp: cpList) { %>
    <option value="<%=cp.getId()%>"><%=cp.getName1()%></option>
    <% } %>


 </select>

    <input type="button" value="  next  " onclick="getSeats();"/>

    </form>


<!--new-->


Available Seats:

<div>

</div>

<form method="post" action="ttp.actions.finalizeSaleAction.action">

<div name="aSeats" id="aSeats">
</div>
    <br>


Customer Information:

<br>
<input name="name" value="Name">
<br>
<input name="address" value="Address">
<br>
<input name="telephone" value="Telephone">
<br>


    <input type="submit" value="  Buy Tickets  "/>

    </form>



<jsp:include page="/footer.jsp"/>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T04:58:22+00:00Added an answer on May 21, 2026 at 4:58 am

    In header.jsp (or wherever you generate your <head> element:

    <link rel="stylesheet" type="text/css" href="/path/to/your/style.css">
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a very complicated site built on CSS3 that has html elements 3d-transformed,
We have a site that is serving some RSS feeds, and we'd like to
I have a web site that built on Visual studio 2008 and i need
I have a simple php site that I built, but for some reason my
I have an existing site that I'd like to convert to use routing, and
I have a legacy web-site that I am maintaining (built mostly in classic ASP
I need a little help. I want to built a user interactive site that
I am usuing CKEditor (version 3.0.2) in a site that I built. I have
I have a web site that built from the ground up, and im seriously
I have built a site that when a user fills in a form correctly

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.