Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > Print content on same page??

Reply
Thread Tools

Print content on same page??

 
 
JS
Guest
Posts: n/a
 
      05-30-2005
I have two forms, a textfield and a button in a jsp page, "search.jsp".
When I press the button the information in the forms and the textfields
should be send to a class that I include in a package in the JSP pages.

The result of the request should be printed on the same page. How do I make
this happen?


<body onload="createFirstMenu('sel1')">
<form name="sels" method="post" action="?page=search">
Category:&nbsp;&nbsp;&nbsp;
<select name="sel1" id="sel1" onchange="createSecondMenu('sel1','sel2');">
</select>
&nbsp;&nbsp;&nbsp;&nbsp;Criterion&nbsp;&nbsp;
<select name="sel2" id="sel2">
<option value="">-- Choose --</option>
</select>
&nbsp;Searchword:&nbsp;
<input name="search" type="text" id="search">
&nbsp;
<input type="submit" name="Submit" value="Search">
</form>

<%

int category = Integer.parseInt((String)request.getParameter("sel 1")) + 1;


%>



The above java code is not allowed. I have tried to make "action" point to
the same page, but I can't seem to understand how I get the results printed.


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
error: Only Content controls are allowed directly in a content page that contains Content controls. hazz ASP .Net 6 06-09-2010 01:54 PM
How do I manipulate the scroll bars so that a div with content thatchanges size shows the content at the same location? Shauniwthanau Javascript 1 03-25-2010 01:55 PM
print a vs print '%s' % a vs print '%f' a David Cournapeau Python 0 12-30-2008 03:19 AM
Problem - I want to print Current Output of Pdf file and should print once.I get print dialog box but it is not working keto Java 0 05-30-2007 11:27 AM
Unlarging the print to print using PDF file to print Bun Mui Computer Support 3 09-13-2004 03:15 AM



Advertisments