Solved

html and jsp

Posted on 2004-04-29
3
321 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Enabling the Skype for Business Meeting Scheduler in Hybrid OWA
This article shows the steps required to install WordPress on Azure. Web Apps, Mobile Apps, API Apps, or Functions, in Azure all these run in an App Service plan. WordPress is no exception and requires an App Service Plan and Database to install
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…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

735 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