Solved

html and jsp

Posted on 2004-04-29
3
318 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
immutable object concept 5 111
how to exclude a file using regex 5 117
main method of string class 3 103
I get error: useBean: Duplicate bean name: {0} 1 121
Large Outlook files lead to various unwanted errors and corruption issues. Furthermore, large outlook files can also make Outlook take longer to start-up, search, navigate, and shut-down. So, In this article, i will discuss a method to make your Out…
In 2017, ransomware will become so virulent and widespread that if you aren’t a victim yourself, you will know someone who is.
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
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…

867 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now