Solved

html and jsp

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

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

Invest in your employees with these five simple steps to improve employee engagement and retention.
An introduction to the wonderful sport of Scam Baiting.  Learn how to help fight scammers by beating them at their own game. This great pass time helps the world, while providing an endless source of entertainment. Enjoy!
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…

738 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