Solved

html and jsp

Posted on 2004-04-29
3
320 Views
Last Modified: 2013-12-03
How can I do this in jsp?

if(priv.equals("1"){

<b><center> <font face="Arial" style="font-size: 9pt"><input type="radio" name= "searchBy" value = "y" ></font></b>
<b><font style="font-size: 9pt">Yes</font></b></font>
<font face="Arial" style="font-size: 9pt; font-weight: 700"><input type="radio" name= "searchBy" value = "n"></font>
<font face="Arial" style="font-size: 9pt"><b>No</b></font>
}

else{

//////other html//////////
}
0
Comment
Question by:CtrlCtrlV
3 Comments
 
LVL 4

Accepted Solution

by:
indigostark earned 50 total points
ID: 10950534
Try this
<%
if(priv.equals("1")
{
%>

<b>
 <center>
<font face="Arial" style="font-size: 9pt"><input type="radio" name= "searchBy" value = "y" ></font>
</b>

<b><font style="font-size: 9pt">Yes</font></b></font>
<font face="Arial" style="font-size: 9pt; font-weight: 700"><input type="radio" name= "searchBy" value = "n"></font>
<font face="Arial" style="font-size: 9pt"><b>No</b></font>

<%
}
else
{
%>

//////other html//////////

<%
}
%>
0
 
LVL 32

Expert Comment

by:ldbkutty
ID: 10950627
<html>
<head>
<body>
<%

// other JSP codes....

if(priv.equals("1"))
{

out.println("<b><center> <font face= \"Arial\" style=\"font-size: 9pt\"><input type=\"radio\" name= \"searchBy\" value = \"y\" ></font></b>");
out.println("<b><font style=\"font-size: 9pt\">Yes</font></b></font>");
out.println("<font face=\"Arial\" style=\"font-size: 9pt; font-weight: 700\"><input type=\"radio\" name= \"searchBy\" value = \"n\"></font>");
out.println("<font face=\"Arial\" style=\"font-size: 9pt\"><b>No</b></font>");
}

else{
%>
//////other html//////////

<%
}

%>

</body>
</html>
0
 

Author Comment

by:CtrlCtrlV
ID: 10951109

Thanks for all that. Indigostark your code works perfect.
Thanks :)
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

The business world is becoming increasingly integrated with tech. It’s not just for a select few anymore — but what about if you have a small business? It may be easier than you think to integrate technology into your small business, and it’s likely…
The Nano Server Image Builder helps you create a custom Nano Server image and bootable USB media with the aid of a graphical interface. Based on the inputs you provide, it generates images for deployment and creates reusable PowerShell scripts that …
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question