Solved

html and jsp

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

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Suggested Solutions

In this article, I will show you HOW TO: Suppress Configuration Issues and Warnings Alert displayed in Summary status for ESXi 6.5 after enabling SSH or ESXi Shell.
For cloud, the “train has left the station” and in the Microsoft ERP & CRM world, that means the next generation of enterprise software from Microsoft is here: Dynamics 365 is Microsoft’s new integrated business solution that unifies CRM and ERP fun…
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 tutorial demonstrates a quick way of adding group price to multiple Magento products.

762 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