Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > Javascript if else?

Reply
Thread Tools

Javascript if else?

 
 
Brie_Manakul@hotmail.com
Guest
Posts: n/a
 
      01-19-2006
Is there a way in javascript to do an if else that shows a script in an
iframe? Let me know if that doesn't make sense. We have a portal and
in a portlet I need to grab these javascript links to display in the
portlet if a user selects a certain city. Let me know if this can be
done. Below is my code. Any help would be greatly appreaciated.
Thanks!


<%@ page language="java" import="java.util.*, java.text.* " %>
<%@ page import="com.plumtree.remote.portlet.*" %>
<%@ page import="com.plumtree.remote.prc.*" %>
<%
String path = request.getContextPath();
String basePath =
request.getScheme()+"://"+request.getServerName()+":"+request.getServerPor t()+path+"/";
%>
<% response.setHeader("Cache-Control", "max-age=3400"); %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">

<title>Weather</title>

<!-- <meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0"> -->
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">

<!--
<link rel="stylesheet" type="text/css" href="styles.css">
<link rel='stylesheet'
href='pt://images/plumtree/portal/custom/fh_styles/style.css'>
-->
<body>
<table>
<tr></td>
<script>

if (city="albany")
{
open("http://voap.weather.com/weather/oap/USTX0016?template=GENXH&par=null&unit=0&key=ba8a96 0da18891295bbc4cfea6a0dbe2");

}
else if(city="amsterdam")
{
window.open("http://voap.weather.com/weather/oap/NLXX0002?template=GENXH&par=null&unit=0&key=67d2b0 264796112ce6d75944acad734e")
}
else if(city="atlanta")
{

window.open("http://voap.weather.com/weather/oap/USGA0028?template=GENXH&par=null&unit=0&key=67d2b0 264796112ce6d75944acad734e")
}
else if (city='austin')
{

String("http://voap.weather.com/weather/oap/USTX0057?template=GENXH&par=null&unit=0&key=67d2b0 264796112ce6d75944acad734e")
}
else if (city='beijing')
{

String("http://voap.weather.com/weather/oap/CHXX0008?template=GENXH&par=null&unit=1&key=67d2b0 264796112ce6d75944acad734e")
}
else if (city='berlin')
{

String("http://voap.weather.com/weather/oap/GMXX0007?template=GENXH&par=null&unit=1&key=67d2b0 264796112ce6d75944acad734e")
}
else if (city='boston')
{

String("http://voap.weather.com/weather/oap/USMA0046?template=GENXH&par=null&unit=0&key=67d2b0 264796112ce6d75944acad734e")
}
else if (city='brussels')
{

String("http://voap.weather.com/weather/oap/BEXX0005?template=GENXH&par=null&unit=1&key=67d2b0 264796112ce6d75944acad734e")
}
else if (city='buffalo')
{

String("http://voap.weather.com/weather/oap/USNY0181?template=GENXH&par=null&unit=0&key=67d2b0 264796112ce6d75944acad734e")
}
else if (city='calgary')
{

String("http://voap.weather.com/weather/oap/CAXX0054?template=GENXH&par=null&unit=1&key=67d2b0 264796112ce6d75944acad734e'")
}
else if (city='charlotte')
{

String("http://voap.weather.com/weather/oap/USNC0121?template=GENXH&par=null&unit=0&key=67d2b0 264796112ce6d75944acad734e'")
}
else if (city='chicago')
{

String("http://voap.weather.com/weather/oap/USIL0225?template=GENXH&par=null&unit=0&key=67d2b0 264796112ce6d75944acad734e'")
}
else if (city='cleveland')
{

String("http://voap.weather.com/weather/oap/USOH0195?template=GENXH&par=null&unit=0&key=67d2b0 264796112ce6d75944acad734e")
}
else if (city='dallas')
{

String("http://voap.weather.com/weather/oap/USTX0327?template=GENXH&par=null&unit=0&key=67d2b0 264796112ce6d75944acad734e")
}
else if (city='detroit')
{

String("http://voap.weather.com/weather/oap/USMI0229?template=GENXH&par=null&unit=0&key=67d2b0 264796112ce6d75944acad734e")
}
else if (city='dublin')
{

String("http://voap.weather.com/weather/oap/EIXX0014?template=GENXH&par=null&unit=1&key=67d2b0 264796112ce6d75944acad734e")
}
else if (city='edinburgh')
{

String("http://voap.weather.com/weather/oap/UKXX0052?template=GENXH&par=null&unit=1&key=67d2b0 264796112ce6d75944acad734e'")
}
else if (city='edmonton')
{

String("http://voap.weather.com/weather/oap/ASXX0036?template=GENXH&par=null&unit=1&key=67d2b0 264796112ce6d75944acad734e")
}
else if (city='frankfurt')
{

String("http://voap.weather.com/weather/oap/GMXX0185?template=GENXH&par=null&unit=1&key=67d2b0 264796112ce6d75944acad734e")
}
else if (city='hongkong')
{

String("http://voap.weather.com/weather/oap/CHXX0049?template=GENXH&par=null&unit=1&key=67d2b0 264796112ce6d75944acad734e")
}
else if (city='houston')
{

String("http://voap.weather.com/weather/oap/USTX0617?template=GENXH&par=null&unit=0&key=67d2b0 264796112ce6d75944acad734e")
}
else if (city='johannesburg')
{

String("http://voap.weather.com/weather/oap/SFXX0023?template=GENXH&par=null&unit=1&key=67d2b0 264796112ce6d75944acad734e")
}
else if (city='kansascity')
{

String("http://voap.weather.com/weather/oap/USMO0460?template=GENXH&par=null&unit=0&key=67d2b0 264796112ce6d75944acad734e")
}
else if (city='kualalumpur')
{

String("http://voap.weather.com/weather/oap/MYXX0008?template=GENXH&par=null&unit=1&key=67d2b0 264796112ce6d75944acad734e")
}
else if (city='london')
{

String("http://voap.weather.com/weather/oap/UKXX0085?template=GENXH&par=null&unit=1&key=67d2b0 264796112ce6d75944acad734e")
}
else if (city='losangeles')
{

String("http://voap.weather.com/weather/oap/USCA0638?template=GENXH&par=null&unit=0&key=67d2b0 264796112ce6d75944acad734e")
}
else if (city='madrid')
{

String("http://voap.weather.com/weather/oap/SPXX0050?template=GENXH&par=null&unit=1&key=67d2b0 264796112ce6d75944acad734e")
}
else if (city='manila')
{

String("http://voap.weather.com/weather/oap/RPXX0017?template=GENXH&par=null&unit=1&key=67d2b0 264796112ce6d75944acad734e")
}
else if (city='melbourne')
{

String("http://voap.weather.com/weather/oap/ASXX0075?template=GENXH&par=null&unit=1&key=67d2b0 264796112ce6d75944acad734e")
}
else if (city='mexico')
{

String("http://voap.weather.com/weather/oap/MXDF0132?template=GENXH&par=null&unit=0&key=67d2b0 264796112ce6d75944acad734e")
}
else if (city='miami')
{

String("http://voap.weather.com/weather/oap/USFL0316?template=GENXH&par=null&unit=0&key=67d2b0 264796112ce6d75944acad734e")
}
else if (city='milan')
{

String("http://voap.weather.com/weather/oap/ITXX0042?template=GENXH&par=null&unit=1&key=67d2b0 264796112ce6d75944acad734e")
}
else if (city='minneapolis')
{

String("http://voap.weather.com/weather/oap/USMN0503?template=GENXH&par=null&unit=0&key=67d2b0 264796112ce6d75944acad734e")
}
else if (city='montreal')
{

String("http://voap.weather.com/weather/oap/CAXX0301?template=GENXH&par=null&unit=1&key=91722c 3a3c6b8b302602ce2bf13950ae")
}
else if (city='munich')
{

String("http://voap.weather.com/weather/oap/GMXX0087?template=GENXH&par=null&unit=1&key=67d2b0 264796112ce6d75944acad734e")
}
else if (city='neworleans')
{

String("http://voap.weather.com/weather/oap/USLA0338?template=GENXH&par=null&unit=0&key=67d2b0 264796112ce6d75944acad734e")
}
else if (city='newyork')
{

String("http://voap.weather.com/weather/oap/USNY0996?template=GENXH&par=null&unit=0&key=67d2b0 264796112ce6d75944acad734e")
}
else if (city='ottawa')
{

String("http://voap.weather.com/weather/oap/CAXX0343?template=GENXH&par=null&unit=1&key=67d2b0 264796112ce6d75944acad734e")
}
else if (city='paris')
{

String("http://voap.weather.com/weather/oap/FRXX0076?template=GENXH&par=null&unit=1&key=67d2b0 264796112ce6d75944acad734e")
}
else if (city='portland')
{

String("http://voap.weather.com/weather/oap/USOR0275?template=GENXH&par=null&unit=0&key=67d2b0 264796112ce6d75944acad734e")
}
else if (city='prague')
{

String("http://voap.weather.com/weather/oap/EZXX0012?template=GENXH&par=null&unit=1&key=67d2b0 264796112ce6d75944acad734e")
}
else if (city='quebec')
{

String("http://voap.weather.com/weather/oap/CAXX0385?template=GENXH&par=null&unit=1&key=67d2b0 264796112ce6d75944acad734e")
}
else if (city='raleighdurham')
{

String("http://voap.weather.com/weather/oap/USNC0558?template=GENXH&par=null&unit=0&key=67d2b0 264796112ce6d75944acad734e")
}
else if (city='sacramento')
{

String("http://voap.weather.com/weather/oap/USCA0967?template=GENXH&par=null&unit=0&key=67d2b0 264796112ce6d75944acad734e")
}
else if (city='sanantonio')
{

String("http://voap.weather.com/weather/oap/USTX1200?template=GENXH&par=null&unit=0&key=67d2b0 264796112ce6d75944acad734e")
}
else if (city='sandiego')
{

String("http://voap.weather.com/weather/oap/USCA0982?template=GENXH&par=null&unit=0&key=67d2b0 264796112ce6d75944acad734e")
}
else if (city='sanfrancisco')
{

String("http://voap.weather.com/weather/oap/USCA0987?template=GENXH&par=null&unit=0&key=67d2b0 264796112ce6d75944acad734e")
}
else if (city='sanjuan')
{

String("http://voap.weather.com/weather/oap/PEXX0047?template=GENXH&par=null&unit=0&key=67d2b0 264796112ce6d75944acad734e")
}
else if (city='seattle')
{

String("http://voap.weather.com/weather/oap/USWA0395?template=GENXH&par=null&unit=0&key=67d2b0 264796112ce6d75944acad734e")
}
else if (city='seoul')
{

String("http://voap.weather.com/weather/oap/KSXX0037?template=GENXH&par=null&unit=0&key=67d2b0 264796112ce6d75944acad734e")
}
else if (city='shanghai')
{

String("http://voap.weather.com/weather/oap/CHXX0116?template=GENXH&par=null&unit=1&key=67d2b0 264796112ce6d75944acad734e")
}
else if (city='singapore')
{

String("http://voap.weather.com/weather/oap/SNXX0006?template=GENXH&par=null&unit=1&key=67d2b0 264796112ce6d75944acad734e")
}
else if (city='StLouis')
{

String("http://voap.weather.com/weather/oap/63102?template=GENXH&par=null&unit=0&key=67d2b0264 796112ce6d75944acad734e")
}
else if (city='sydney')
{

String("http://voap.weather.com/weather/oap/ASXX0112?template=GENXH&par=null&unit=1&key=67d2b0 264796112ce6d75944acad734e")
}
else if (city='tokyo')
{

String("http://voap.weather.com/weather/oap/JAXX0085?template=GENXH&par=null&unit=1&key=67d2b0 264796112ce6d75944acad734e")
}
else if (city='toronto')
{

String("http://voap.weather.com/weather/oap/CAXX0504?template=GENXH&par=null&unit=1&key=67d2b0 264796112ce6d75944acad734e")
}
else if (city='vancouver')
{

String("http://voap.weather.com/weather/oap/CAXX0518?template=GENXH&par=null&unit=1&key=67d2b0 264796112ce6d75944acad734e")
}
else if(city='warsaw')
{

String("http://voap.weather.com/weather/oap/PLXX0028?template=GENXH&par=null&unit=1&key=67d2b0 264796112ce6d75944acad734e")
}


</script>

</td></tr></table>
</body>

 
Reply With Quote
 
 
 
 
web.dev
Guest
Posts: n/a
 
      01-19-2006

(E-Mail Removed) wrote:
> Is there a way in javascript to do an if else that shows a script in an
> iframe? Let me know if that doesn't make sense. We have a portal and
> in a portlet I need to grab these javascript links to display in the
> portlet if a user selects a certain city. Let me know if this can be
> done. Below is my code. Any help would be greatly appreaciated.
> Thanks!


Before proceeding to finding you a solution, let's fix your script
first.

> <script>


You're missing the type attribute:

<script type = "text/javascript">

>
> if (city="albany")
> {
> open("http://voap.weather.com/weather/oap/USTX0016?template=GENXH&par=null&unit=0&key=ba8a96 0da18891295bbc4cfea6a0dbe2");
>
> }


[...snip...]

> else if(city='warsaw')
> {
>
> String("http://voap.weather.com/weather/oap/PLXX0028?template=GENXH&par=null&unit=1&key=67d2b0 264796112ce6d75944acad734e")
> }


In situations like these where you have many if..else statements, using
a switch statement would be more efficient. Also, there is no need to
create a new String, just do something like the following:

var alink = "";

switch(city)
{
case "albany":
alink = "http://URI";
break;
case "warsaw":
alink = "http://URI";
break;
}

window.open(alink, ...); //place other attributes that you need.

 
Reply With Quote
 
 
 
 
Brie_Manakul@hotmail.com
Guest
Posts: n/a
 
      01-19-2006
I'm not sure that I fully understand.

I changed these points:

<script type = "text/javascript">

> if (city="albany")
> {
> open("http://voap.weather.com/weather/oap/USTX0016?template=GENXH&par=null&...");


> }


[...snip...]

> else if(city='warsaw')
> {


> String("http://voap.weather.com/weather/oap/PLXX0028?template=GENXH&par=null&...")
> }


To set up the switch i'm a little confused Sorry!! Do you mean like
this:

<%@ page language="java" import="java.util.*, java.text.* " %>
<%@ page import="com.plumtree.remote.portlet.*" %>
<%@ page import="com.plumtree.remote.prc.*" %>
<%
String path = request.getContextPath();
String basePath =
request.getScheme()+"://"+request.getServerName()+":"+request.getServerPor t()+path+"/";
%>
<% response.setHeader("Cache-Control", "max-age=3400"); %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">

<title>Weather</title>

<!-- <meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0"> -->
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">

<!--
<link rel="stylesheet" type="text/css" href="styles.css">
<link rel='stylesheet'
href='pt://images/plumtree/portal/custom/fh_styles/style.css'>
-->
<body>


<table>
<tr><td>
<script type = "text/javascript">
var alink = "";

switch(city)
{
case "albany":
alink =
"http://voap.weather.com/weather/oap/USTX0016?template=GENXH&par=null&unit=0&key=ba8a96 0da18891295bbc4cfea6a0dbe2";
break;
case "warsaw":
alink =
"http://voap.weather.com/weather/oap/PLXX0028?template=GENXH&par=null&unit=1&key=67d2b0 264796112ce6d75944acad734e";
break;

}

</script>

</td></tr></table>
</body>

Then city is undefined?

 
Reply With Quote
 
web.dev
Guest
Posts: n/a
 
      01-19-2006

(E-Mail Removed) wrote:
> <script type = "text/javascript">
> var alink = "";
>
> switch(city)
> {
> case "albany":
> alink =
> "http://voap.weather.com/weather/oap/USTX0016?template=GENXH&par=null&unit=0&key=ba8a96 0da18891295bbc4cfea6a0dbe2";
> break;
> case "warsaw":
> alink =
> "http://voap.weather.com/weather/oap/PLXX0028?template=GENXH&par=null&unit=1&key=67d2b0 264796112ce6d75944acad734e";
> break;
>
> }


Don't forget to add the cases for your other cities.

> Then city is undefined?


Correct. In your original script, city was undefined. Where are you
getting this value from?

 
Reply With Quote
 
Brie_Manakul@hotmail.com
Guest
Posts: n/a
 
      01-19-2006
This is actually a portlet within a portal. So I had to set up two
other pages to go with it. I'll paste the code in so you can see it.

Userprefs:


<%@ page language="java" import="java.util.*" %>
<%@ page import="com.plumtree.remote.portlet.*" %>
<%@ page import="com.plumtree.remote.prc.*" %>
<%
String path = request.getContextPath();
String basePath =
request.getScheme()+"://"+request.getServerName()+":"+request.getServerPor t()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">

<title>Edit Preferences</title>

<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">

<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->

<link rel='stylesheet'
href='pt://images/plumtree/portal/custom/fh_styles/style.css'>

<script LANGUAGE="JavaScript">
<!--
window.moveTo(100,100);
if (window.screen) self.resizeTo(Width=700,Height=400);

//-->
</script>

</head>

<body>
<%
String cityName = null;
try
{
//get portlet context obj
IPortletContext portletContext =
PortletContextFactory.createPortletContext(request , response);
IRemoteSession remoteSession =
portletContext.getRemotePortalSession();

//Get portlet context object
IPortletRequest portletRequest = portletContext.getRequest();
cityName = portletRequest.getSettingValue(SettingType.User,
"cityName");
if (cityName != null)
{
System.out.println("FHWeather: userPrefs: previous selected
cityName = " + cityName);
}
}
catch(Exception ex)
{
ex.printStackTrace();
}
%>
<form name="userprefs" method="post" action="setUserPrefs.jsp"
id="userPrefs">
<table width="100%" cellspacing="0" cellpadding="0">
<tr>
<td colspan=4
background="pt://images/plumtree/portal/custom/fh_images/rec_port_graphics/horiz_greyrule.gif">
<img
src="pt://images/plumtree/portal/custom/fh_images/rec_port_graphics/tr.gif"
width="1" height="1"></td>
</tr>
<tr><td colspan=4><p class="pagetitle">Edit Preferences</p>
<p class="pagetext">Use this page to Edit preferences for this
portlet. Click Submit to return to the previous page.</p></td></tr>
<tr><td width="29%">&nbsp;</td></tr>
<tr>
<td colspan=4
background="pt://images/plumtree/portal/custom/fh_images/rec_port_graphics/horiz_greyrule.gif">
<img
src="pt://images/plumtree/portal/custom/fh_images/rec_port_graphics/tr.gif"
width="1" height="1"></td>
</tr>


<tr>
<td valign="top" class="bodytext">Select the cities weather:</td>
<td valign="top" align="left" width="20%"> <table>
<% if (cityName != null && cityName.equalsIgnoreCase("albany"))
{
%>
<tr><td width="126" align="left" class="bodytext"><input
type="radio" name="cityName" value="Albany" checked>Albany</td></tr>
<% }
else
{ %>
<tr><td align="left" class="bodytext"><input type="radio"
name="cityName" value="Albany" >Albany</td></tr>
<% } %>


</table></td>
<td valign="top" align="left" width="20%"><table>
<% if (cityName != null &&
cityName.equalsIgnoreCase("amsterdam"))
{
%>
<tr>
<td align="left" class="bodytext"><input type="radio"
name="cityName" value="Amsterdam" checked>
Amsterdam</td>
</tr>
<% }
else
{ %>
<tr>
<td height="21" align="left" class="bodytext"><input
type="radio" name="cityName" value="Amsterdam" >
Amsterdam</td>
</tr>
<% } %>
</table></td>
<td valign="top" align="left" width="20%"><table>
<% if (cityName != null &&
cityName.equalsIgnoreCase("atlanta"))
{
%>
<tr>
<td align="left" class="bodytext"><input type="radio"
name="cityName" value="Atlanta" checked>
Atlanta</td>
</tr>
<% }
else
{ %>
<tr>
<td align="left" class="bodytext"><input type="radio"
name="cityName" value="Atlanta" >
Atlanta</td>
</tr>
<% } %>
</table></td>
</tr>
<tr>
<td valign="top" class="bodytext">&nbsp;</td>
<td valign="top" align="left">
<table>
<% if (cityName != null &&
cityName.equalsIgnoreCase("austin"))
{
%>
<tr>
<td width="146" align="left" class="bodytext"><input
type="radio" name="cityName" value="Austin" checked>
Austin</td>
</tr>
<% }
else
{ %>
<tr>
<td align="left" class="bodytext"><input type="radio"
name="cityName" value="Austin" >
Austin</td>
</tr>
<% } %>
</table></td>
<td valign="top" align="left"><table>
<% if (cityName != null &&
cityName.equalsIgnoreCase("beijing"))
{
%>
<tr>
<td align="left" class="bodytext"><input type="radio"
name="cityName" value="Beijing" checked>
Beijing</td>
</tr>
<% }
else
{ %>
<tr>
<td height="21" align="left" class="bodytext"><input
type="radio" name="cityName" value="Beijing" >
Beijing</td>
</tr>
<% } %>
</table></td>
<td valign="top" align="left"><table>
<% if (cityName != null &&
cityName.equalsIgnoreCase("berlin"))
{
%>
<tr>
<td align="left" class="bodytext"><input type="radio"
name="cityName" value="Berlin" checked>
Berlin</td>
</tr>
<% }
else
{ %>
<tr>
<td align="left" class="bodytext"><input type="radio"
name="cityName" value="Berlin" >
Berlin</td>
</tr>
<% } %>
</table></td>
</tr>
<tr>
<td valign="top" class="bodytext">&nbsp;</td>
<td valign="top" align="left">
<table>
<% if (cityName != null &&
cityName.equalsIgnoreCase("boston"))
{
%>
<tr>
<td width="143" align="left" class="bodytext"><input
type="radio" name="cityName" value="Boston" checked>
Boston</td>
</tr>
<% }
else
{ %>
<tr>
<td align="left" class="bodytext"><input type="radio"
name="cityName" value="Boston" >
Boston</td>
</tr>
<% } %>
</table></td>
<td valign="top" align="left"><table>
<% if (cityName != null &&
cityName.equalsIgnoreCase("brussels"))
{
%>
<tr>
<td align="left" class="bodytext"><input type="radio"
name="cityName" value="Brussels" checked>
Brussels</td>
</tr>
<% }
else
{ %>
<tr>
<td height="21" align="left" class="bodytext"><input
type="radio" name="cityName" value="Daily" >
Brussels</td>
</tr>
<% } %>
</table></td>
<td valign="top" align="left"><table>
<% if (cityName != null &&
cityName.equalsIgnoreCase("buffalo"))
{
%>
<tr>
<td align="left" class="bodytext"><input type="radio"
name="cityName" value="Buffalo" checked>
Buffalo</td>
</tr>
<% }
else
{ %>
<tr>
<td align="left" class="bodytext"><input type="radio"
name="cityName" value="Buffalo" >
Buffalo</td>
</tr>
<% } %>
</table></td>
</tr>
<tr>
<td valign="top" class="bodytext">&nbsp;</td>
<td valign="top" align="left">
<table>
<% if (cityName != null &&
cityName.equalsIgnoreCase("calgary"))
{
%>
<tr>
<td width="146" align="left" class="bodytext"><input
type="radio" name="cityName" value="Calgary" checked>
Calgary</td>
</tr>
<% }
else
{ %>
<tr>
<td align="left" class="bodytext"><input type="radio"
name="cityName" value="Calgary" >
Calgary</td>
</tr>
<% } %>
</table></td>
<td valign="top" align="left"><table>
<% if (cityName != null &&
cityName.equalsIgnoreCase("charlotte"))
{
%>
<tr>
<td align="left" class="bodytext"><input type="radio"
name="cityName" value="Charlotte" checked>
Charlotte</td>
</tr>
<% }
else
{ %>
<tr>
<td height="21" align="left" class="bodytext"><input
type="radio" name="cityName" value="Charlotte" >
Charlotte</td>
</tr>
<% } %>
</table></td>
<td valign="top" align="left"><table>
<% if (cityName != null &&
cityName.equalsIgnoreCase("chicago"))
{
%>
<tr>
<td align="left" class="bodytext"><input type="radio"
name="cityName" value="Chicago" checked>
Chicago</td>
</tr>
<% }
else
{ %>
<tr>
<td align="left" class="bodytext"><input type="radio"
name="cityName" value="Chicago" >
Chicago</td>
</tr>
<% } %>
</table></td>
</tr>
<tr>
<td valign="top" class="bodytext">&nbsp;</td>
<td valign="top" align="left">
<table>
<% if (cityName != null &&
cityName.equalsIgnoreCase("cleveland"))
{
%>
<tr>
<td width="146" align="left" class="bodytext"><input
type="radio" name="cityName" value="Cleveland" checked>
Albany</td>
</tr>
<% }
else
{ %>
<tr>
<td align="left" class="bodytext"><input type="radio"
name="cityName" value="Cleveland" >
Cleveland</td>
</tr>
<% } %>
</table></td>
<td valign="top" align="left"><table>
<% if (cityName != null &&
cityName.equalsIgnoreCase("dallas"))
{
%>
<tr>
<td align="left" class="bodytext"><input type="radio"
name="cityName" value="Dallas" checked>
Dallas</td>
</tr>
<% }
else
{ %>
<tr>
<td height="21" align="left" class="bodytext"><input
type="radio" name="cityName" value="Dallas" >
Dallas</td>
</tr>
<% } %>
</table></td>
<td valign="top" align="left"><table>
<% if (cityName != null &&
cityName.equalsIgnoreCase("detroit"))
{
%>
<tr>
<td align="left" class="bodytext"><input type="radio"
name="cityName" value="Detroit" checked>
Detroit</td>
</tr>
<% }
else
{ %>
<tr>
<td align="left" class="bodytext"><input type="radio"
name="cityName" value="Detroit" >
Detroit</td>
</tr>
<% } %>
</table></td>
</tr>
<tr>
<td valign="top" class="bodytext">&nbsp;</td>
<td valign="top" align="left">
<table>
<% if (cityName != null &&
cityName.equalsIgnoreCase("dublin"))
{
%>
<tr>
<td width="146" align="left" class="bodytext"><input
type="radio" name="cityName" value="Dublin" checked>
Dublin</td>
</tr>
<% }
else
{ %>
<tr>
<td align="left" class="bodytext"><input type="radio"
name="cityName" value="Dublin" >
Dublin</td>
</tr>
<% } %>
</table></td>
<td valign="top" align="left"><table>
<% if (cityName != null &&
cityName.equalsIgnoreCase("edinburgh"))
{
%>
<tr>
<td align="left" class="bodytext"><input type="radio"
name="cityName" value="Edinburgh" checked>
Edinburgh</td>
</tr>
<% }
else
{ %>
<tr>
<td height="21" align="left" class="bodytext"><input
type="radio" name="cityName" value="Edinburgh" >
Edinburgh</td>
</tr>
<% } %>
</table></td>
<td valign="top" align="left"><table>
<% if (cityName != null &&
cityName.equalsIgnoreCase("edmonton"))
{
%>
<tr>
<td align="left" class="bodytext"><input type="radio"
name="cityName" value="Edmonton" checked>
Edmonton</td>
</tr>
<% }
else
{ %>
<tr>
<td align="left" class="bodytext"><input type="radio"
name="cityName" value="Edmonton" >
Edmonton</td>
</tr>
<% } %>
</table></td>
</tr>
<tr>
<td valign="top" class="bodytext">&nbsp;</td>
<td valign="top" align="left">
<table>
<% if (cityName != null &&
cityName.equalsIgnoreCase("frankfurt"))
{
%>
<tr>
<td width="146" align="left" class="bodytext"><input
type="radio" name="cityName" value="Frankfurt" checked>
Frankfurt</td>
</tr>
<% }
else
{ %>
<tr>
<td align="left" class="bodytext"><input type="radio"
name="cityName" value="Frankfurt" >
Frankfurt</td>
</tr>
<% } %>
</table></td>
<td valign="top" align="left"><table>
<% if (cityName != null &&
cityName.equalsIgnoreCase("hongkong"))
{
%>
<tr>
<td align="left" class="bodytext"><input type="radio"
name="cityName" value="HongKong" checked>
Hong Kong</td>
</tr>
<% }
else
{ %>
<tr>
<td height="21" align="left" class="bodytext"><input
type="radio" name="cityName" value="HongKong" >
Hong Kong</td>
</tr>
<% } %>
</table></td>
<td valign="top" align="left"><table>
<% if (cityName != null &&
cityName.equalsIgnoreCase("houston"))
{
%>
<tr>
<td align="left" class="bodytext"><input type="radio"
name="cityName" value="Houston" checked>
Houston</td>
</tr>
<% }
else
{ %>
<tr>
<td align="left" class="bodytext"><input type="radio"
name="cityName" value="Houston" >
Houston</td>
</tr>
<% } %>
</table></td>
</tr>
<tr>
<td valign="top" class="bodytext">&nbsp;</td>
<td valign="top" align="left">
<table>
<% if (cityName != null &&
cityName.equalsIgnoreCase("johannesburg"))
{
%>
<tr>
<td width="146" align="left" class="bodytext"><input
type="radio" name="cityName" value="Johannesburg" checked>
Johannesburg</td>
</tr>
<% }
else
{ %>
<tr>
<td align="left" class="bodytext"><input type="radio"
name="cityName" value="Johannesburg" >
Johannesburg</td>
</tr>
<% } %>
</table></td>
<td valign="top" align="left"><table>
<% if (cityName != null &&
cityName.equalsIgnoreCase("kansascityName"))
{
%>
<tr>
<td align="left" class="bodytext"><input type="radio"
name="cityName" value="KansascityName" checked>
Kansas cityName</td>
</tr>
<% }
else
{ %>
<tr>
<td height="21" align="left" class="bodytext"><input
type="radio" name="cityName" value="KansascityName" >
Kansas cityName</td>
</tr>
<% } %>
</table></td>
<td valign="top" align="left"><table>
<% if (cityName != null &&
cityName.equalsIgnoreCase("kualalumpur"))
{
%>
<tr>
<td align="left" class="bodytext"><input type="radio"
name="cityName" value="KualaLumpur" checked>
Kuala Lumpur</td>
</tr>
<% }
else
{ %>
<tr>
<td align="left" class="bodytext"><input type="radio"
name="cityName" value="Kuala Lumpur" >
Kuala Lumpur</td>
</tr>
<% } %>
</table></td>
</tr>
<tr>
<td valign="top" class="bodytext">&nbsp;</td>
<td valign="top" align="left">
<table>
<% if (cityName != null &&
cityName.equalsIgnoreCase("london"))
{
%>
<tr>
<td width="146" align="left" class="bodytext"><input
type="radio" name="cityName" value="London" checked>
London</td>
</tr>
<% }
else
{ %>
<tr>
<td align="left" class="bodytext"><input type="radio"
name="cityName" value="London" >
London</td>
</tr>
<% } %>
</table></td>
<td valign="top" align="left"><table>
<% if (cityName != null &&
cityName.equalsIgnoreCase("losangeles"))
{
%>
<tr>
<td align="left" class="bodytext"><input type="radio"
name="cityName" value="LosAngeles" checked>
Los Angeles</td>
</tr>
<% }
else
{ %>
<tr>
<td height="21" align="left" class="bodytext"><input
type="radio" name="cityName" value="Los Angeles" >
Los Angeles</td>
</tr>
<% } %>
</table></td>
<td valign="top" align="left"><table>
<% if (cityName != null &&
cityName.equalsIgnoreCase("madrid"))
{
%>
<tr>
<td align="left" class="bodytext"><input type="radio"
name="cityName" value="Madrid" checked>
Madrid</td>
</tr>
<% }
else
{ %>
<tr>
<td align="left" class="bodytext"><input type="radio"
name="cityName" value="Madrid" >
Madrid</td>
</tr>
<% } %>
</table></td>
</tr>
<tr>
<td valign="top" class="bodytext">&nbsp;</td>
<td valign="top" align="left">
<table>
<% if (cityName != null &&
cityName.equalsIgnoreCase("manila"))
{
%>
<tr>
<td width="146" align="left" class="bodytext"><input
type="radio" name="cityName" value="Manila" checked>
Manila</td>
</tr>
<% }
else
{ %>
<tr>
<td align="left" class="bodytext"><input type="radio"
name="cityName" value="Manila" >
Manila</td>
</tr>
<% } %>
</table></td>
<td valign="top" align="left"><table>
<% if (cityName != null &&
cityName.equalsIgnoreCase("melbourne"))
{
%>
<tr>
<td align="left" class="bodytext"><input type="radio"
name="cityName" value="Melbourne" checked>
Melbourne</td>
</tr>
<% }
else
{ %>
<tr>
<td height="21" align="left" class="bodytext"><input
type="radio" name="cityName" value="Melbourne" >
Melbourne</td>
</tr>
<% } %>
</table></td>
<td valign="top" align="left"><table>
<% if (cityName != null &&
cityName.equalsIgnoreCase("mexico"))
{
%>
<tr>
<td align="left" class="bodytext"><input type="radio"
name="cityName" value="Mexico" checked>
Mexico</td>
</tr>
<% }
else
{ %>
<tr>
<td align="left" class="bodytext"><input type="radio"
name="cityName" value="Mexico" >
Mexico</td>
</tr>
<% } %>
</table></td>
</tr>
<tr>
<td valign="top" class="bodytext">&nbsp;</td>
<td valign="top" align="left">
<table>
<% if (cityName != null &&
cityName.equalsIgnoreCase("miami"))
{
%>
<tr>
<td width="146" align="left" class="bodytext"><input
type="radio" name="cityName" value="Miami" checked>
Miami</td>
</tr>
<% }
else
{ %>
<tr>
<td align="left" class="bodytext"><input type="radio"
name="cityName" value="Miami" >
Miami</td>
</tr>
<% } %>
</table></td>
<td valign="top" align="left"><table>
<% if (cityName != null &&
cityName.equalsIgnoreCase("milan"))
{
%>
<tr>
<td align="left" class="bodytext"><input type="radio"
name="cityName" value="Milan" checked>
Milan</td>
</tr>
<% }
else
{ %>
<tr>
<td height="21" align="left" class="bodytext"><input
type="radio" name="cityName" value="Milan" >
Milan</td>
</tr>
<% } %>
</table></td>
<td valign="top" align="left"><table>
<% if (cityName != null &&
cityName.equalsIgnoreCase("minneapolis"))
{
%>
<tr>
<td align="left" class="bodytext"><input type="radio"
name="cityName" value="Minneapolis" checked>
Minneapolis/St. Paul</td>
</tr>
<% }
else
{ %>
<tr>
<td align="left" class="bodytext"><input type="radio"
name="cityName" value="Minneapolis" >
Minneapolis/St. Paul</td>
</tr>
<% } %>
</table></td>
</tr>
<tr>
<td valign="top" class="bodytext">&nbsp;</td>
<td valign="top" align="left">
<table>
<% if (cityName != null &&
cityName.equalsIgnoreCase("montreal"))
{
%>
<tr>
<td width="146" align="left" class="bodytext"><input
type="radio" name="cityName" value="Montreal" checked>
Montreal</td>
</tr>
<% }
else
{ %>
<tr>
<td align="left" class="bodytext"><input type="radio"
name="cityName" value="Montreal" >
Montreal</td>
</tr>
<% } %>
</table></td>
<td valign="top" align="left"><table>
<% if (cityName != null &&
cityName.equalsIgnoreCase("munich"))
{
%>
<tr>
<td align="left" class="bodytext"><input type="radio"
name="cityName" value="Munich" checked>
Munich</td>
</tr>
<% }
else
{ %>
<tr>
<td height="21" align="left" class="bodytext"><input
type="radio" name="cityName" value="Munich" >
Munich</td>
</tr>
<% } %>
</table></td>
<td valign="top" align="left"><table>
<% if (cityName != null &&
cityName.equalsIgnoreCase("neworleans"))
{
%>
<tr>
<td align="left" class="bodytext"><input type="radio"
name="cityName" value="NewOrleans" checked>
New Orleans</td>
</tr>
<% }
else
{ %>
<tr>
<td align="left" class="bodytext"><input type="radio"
name="cityName" value="New Orleans" >
New Orleans</td>
</tr>
<% } %>
</table></td>
</tr>
<tr>
<td valign="top" class="bodytext">&nbsp;</td>
<td valign="top" align="left">
<table>
<% if (cityName != null &&
cityName.equalsIgnoreCase("newyork"))
{
%>
<tr>
<td width="146" align="left" class="bodytext"><input
type="radio" name="cityName" value="NewYork" checked>
New York</td>
</tr>
<% }
else
{ %>
<tr>
<td align="left" class="bodytext"><input type="radio"
name="cityName" value="New York" >
NewYork</td>
</tr>
<% } %>
</table></td>
<td valign="top" align="left"><table>
<% if (cityName != null &&
cityName.equalsIgnoreCase("ottawa"))
{
%>
<tr>
<td align="left" class="bodytext"><input type="radio"
name="cityName" value="Ottawa" checked>
Ottawa</td>
</tr>
<% }
else
{ %>
<tr>
<td height="21" align="left" class="bodytext"><input
type="radio" name="cityName" value="Ottawa" >
Ottawa</td>
</tr>
<% } %>
</table></td>
<td valign="top" align="left"><table>
<% if (cityName != null &&
cityName.equalsIgnoreCase("paris"))
{
%>
<tr>
<td align="left" class="bodytext"><input type="radio"
name="cityName" value="Paris" checked>
Paris</td>
</tr>
<% }
else
{ %>
<tr>
<td align="left" class="bodytext"><input type="radio"
name="cityName" value="Paris" >
Paris</td>
</tr>
<% } %>
</table></td>
</tr>
<tr>
<td valign="top" class="bodytext">&nbsp;</td>
<td valign="top" align="left">
<table>
<% if (cityName != null &&
cityName.equalsIgnoreCase("portland"))
{
%>
<tr>
<td width="146" align="left" class="bodytext"><input
type="radio" name="cityName" value="Portland" checked>
Portland</td>
</tr>
<% }
else
{ %>
<tr>
<td align="left" class="bodytext"><input type="radio"
name="cityName" value="Portland" >
Portland</td>
</tr>
<% } %>
</table></td>
<td valign="top" align="left"><table>
<% if (cityName != null &&
cityName.equalsIgnoreCase("prague"))
{
%>
<tr>
<td align="left" class="bodytext"><input type="radio"
name="cityName" value="Prague" checked>
Prague</td>
</tr>
<% }
else
{ %>
<tr>
<td height="21" align="left" class="bodytext"><input
type="radio" name="cityName" value="Prague" >
Prague</td>
</tr>
<% } %>
</table></td>
<td valign="top" align="left"><table>
<% if (cityName != null &&
cityName.equalsIgnoreCase("quebec"))
{
%>
<tr>
<td align="left" class="bodytext"><input type="radio"
name="cityName" value="Quebec" checked>
Albany</td>
</tr>
<% }
else
{ %>
<tr>
<td align="left" class="bodytext"><input type="radio"
name="cityName" value="Quebec" >
Quebec</td>
</tr>
<% } %>
</table></td>
</tr>
<tr>
<td valign="top" class="bodytext">&nbsp;</td>
<td valign="top" align="left">
<table>
<% if (cityName != null &&
cityName.equalsIgnoreCase("raleighdurham"))
{
%>
<tr>
<td width="146" align="left" class="bodytext"><input
type="radio" name="cityName" value="RaleighDurham" checked>
Raleigh-Durham</td>
</tr>
<% }
else
{ %>
<tr>
<td align="left" class="bodytext"><input type="radio"
name="cityName" value="RaleighDurham" >
Raleigh Durham</td>
</tr>
<% } %>
</table></td>
<td valign="top" align="left"><table>
<% if (cityName != null &&
cityName.equalsIgnoreCase("sacramento"))
{
%>
<tr>
<td align="left" class="bodytext"><input type="radio"
name="cityName" value="Sacramento" checked>
Sacramento</td>
</tr>
<% }
else
{ %>
<tr>
<td height="21" align="left" class="bodytext"><input
type="radio" name="cityName" value="Sacramento" >
Sacramento</td>
</tr>
<% } %>
</table></td>
<td valign="top" align="left"><table>
<% if (cityName != null &&
cityName.equalsIgnoreCase("sanantonio"))
{
%>
<tr>
<td align="left" class="bodytext"><input type="radio"
name="cityName" value="SanAntonio" checked>
San Antonio</td>
</tr>
<% }
else
{ %>
<tr>
<td align="left" class="bodytext"><input type="radio"
name="cityName" value="San Antonio" >
San Antonio</td>
</tr>
<% } %>
</table></td>
</tr>
<tr>
<td valign="top" class="bodytext">&nbsp;</td>
<td valign="top" align="left">
<table>
<% if (cityName != null &&
cityName.equalsIgnoreCase("sandiego"))
{
%>
<tr>
<td width="146" align="left" class="bodytext"><input
type="radio" name="cityName" value="SanDiego" checked>
San Diego</td>
</tr>
<% }
else
{ %>
<tr>
<td align="left" class="bodytext"><input type="radio"
name="cityName" value="SanDiego" >
San Diego</td>
</tr>
<% } %>
</table></td>
<td valign="top" align="left"><table>
<% if (cityName != null &&
cityName.equalsIgnoreCase("sanfrancisco"))
{
%>
<tr>
<td align="left" class="bodytext"><input type="radio"
name="cityName" value="SanFrancisco" checked>
San Francisco</td>
</tr>
<% }
else
{ %>
<tr>
<td height="21" align="left" class="bodytext"><input
type="radio" name="cityName" value="SanFrancisco" >
San Francisco</td>
</tr>
<% } %>
</table></td>
<td valign="top" align="left"><table>
<% if (cityName != null &&
cityName.equalsIgnoreCase("sanjuan"))
{
%>
<tr>
<td align="left" class="bodytext"><input type="radio"
name="cityName" value="SanJuan" checked>
San Juan</td>
</tr>
<% }
else
{ %>
<tr>
<td align="left" class="bodytext"><input type="radio"
name="cityName" value="SanJuan" >
San Juan</td>
</tr>
<% } %>
</table></td>
</tr>
<tr>
<td valign="top" class="bodytext">&nbsp;</td>
<td valign="top" align="left">
<table>
<% if (cityName != null &&
cityName.equalsIgnoreCase("seattle"))
{
%>
<tr>
<td width="146" align="left" class="bodytext"><input
type="radio" name="cityName" value="Seattle" checked>
Seattle</td>
</tr>
<% }
else
{ %>
<tr>
<td align="left" class="bodytext"><input type="radio"
name="cityName" value="Seattle" >
Seattle</td>
</tr>
<% } %>
</table></td>
<td valign="top" align="left"><table>
<% if (cityName != null &&
cityName.equalsIgnoreCase("seoul"))
{
%>
<tr>
<td align="left" class="bodytext"><input type="radio"
name="cityName" value="Seoul" checked>
Seoul</td>
</tr>
<% }
else
{ %>
<tr>
<td height="21" align="left" class="bodytext"><input
type="radio" name="cityName" value="Seoul" >
Seoul</td>
</tr>
<% } %>
</table></td>
<td valign="top" align="left"><table>
<% if (cityName != null &&
cityName.equalsIgnoreCase("shanghai"))
{
%>
<tr>
<td align="left" class="bodytext"><input type="radio"
name="cityName" value="Shanghai" checked>
Shanghai</td>
</tr>
<% }
else
{ %>
<tr>
<td align="left" class="bodytext"><input type="radio"
name="cityName" value="Shanghai" >
Shanghai</td>
</tr>
<% } %>
</table></td>
</tr>
<tr>
<td valign="top" class="bodytext">&nbsp;</td>
<td valign="top" align="left">
<table>
<% if (cityName != null &&
cityName.equalsIgnoreCase("singapore"))
{
%>
<tr>
<td width="146" align="left" class="bodytext"><input
type="radio" name="cityName" value="Singapore" checked>
Singapore</td>
</tr>
<% }
else
{ %>
<tr>
<td align="left" class="bodytext"><input type="radio"
name="cityName" value="Singapore" >
Singapore</td>
</tr>
<% } %>
</table></td>
<td valign="top" align="left"><table>
<% if (cityName != null &&
cityName.equalsIgnoreCase("StLouis"))
{
%>
<tr>
<td align="left" class="bodytext"><input type="radio"
name="cityName" value="StLouis" checked>
St. Louis</td>
</tr>
<% }
else
{ %>
<tr>
<td height="21" align="left" class="bodytext"><input
type="radio" name="cityName" value="StLouis" >
St. Louis</td>
</tr>
<% } %>
</table></td>
<td valign="top" align="left"><table>
<% if (cityName != null &&
cityName.equalsIgnoreCase("sydney"))
{
%>
<tr>
<td align="left" class="bodytext"><input type="radio"
name="cityName" value="Sydney" checked>
Sydney</td>
</tr>
<% }
else
{ %>
<tr>
<td align="left" class="bodytext"><input type="radio"
name="cityName" value="Sydney" >
Sydney</td>
</tr>
<% } %>
</table></td>
</tr>
<tr>
<td valign="top" class="bodytext">&nbsp;</td>
<td valign="top" align="left">
<table>
<% if (cityName != null &&
cityName.equalsIgnoreCase("tokyo"))
{
%>
<tr>
<td width="146" align="left" class="bodytext"><input
type="radio" name="cityName" value="Tokyo" checked>
Tokyo</td>
</tr>
<% }
else
{ %>
<tr>
<td align="left" class="bodytext"><input type="radio"
name="cityName" value="Tokyo" >
Tokyo</td>
</tr>
<% } %>
</table></td>
<td valign="top" align="left"><table>
<% if (cityName != null &&
cityName.equalsIgnoreCase("toronto"))
{
%>
<tr>
<td align="left" class="bodytext"><input type="radio"
name="cityName" value="Toronto" checked>
Toronto</td>
</tr>
<% }
else
{ %>
<tr>
<td height="21" align="left" class="bodytext"><input
type="radio" name="cityName" value="Toronto" >
Toronto</td>
</tr>
<% } %>
</table></td>
<td valign="top" align="left"><table>
<% if (cityName != null &&
cityName.equalsIgnoreCase("vancouver"))
{
%>
<tr>
<td align="left" class="bodytext"><input type="radio"
name="cityName" value="Vancouver" checked>
Vancouver</td>
</tr>
<% }
else
{ %>
<tr>
<td align="left" class="bodytext"><input type="radio"
name="cityName" value="Vancouver" >
Vancouver</td>
</tr>
<% } %>
</table></td>
</tr>
<tr>
<td valign="top" class="bodytext">&nbsp;</td>
<td valign="top" align="left">
<table>
<% if (cityName != null &&
cityName.equalsIgnoreCase("warsaw"))
{
%>
<tr>
<td width="146" align="left" class="bodytext"><input
type="radio" name="cityName" value="Warsaw" checked>
Warsaw</td>
</tr>
<% }
else
{ %>
<tr>
<td align="left" class="bodytext"><input type="radio"
name="cityName" value="Warsaw" >
Warsaw</td>
</tr>
<% } %>
</table></td>
<td valign="top" align="left"><table>
<% if (cityName != null &&
cityName.equalsIgnoreCase("washington"))
{
%>
<tr>
<td align="left" class="bodytext"><input type="radio"
name="cityName" value="Washington" checked>
Washington D.C.</td>
</tr>
<% }
else
{ %>
<tr>
<td height="21" align="left" class="bodytext"><input
type="radio" name="cityName" value="Washington" >
Washington D.C.</td>
</tr>
<% } %>
</table></td>
<td valign="top" align="left"><table>
<% if (cityName != null &&
cityName.equalsIgnoreCase("albany"))
{
%>
<tr>
<td align="left" class="bodytext"><input type="radio"
name="cityName" value="Albany" checked>
Albany</td>
</tr>
<% }
else
{ %>
<tr>
<td align="left" class="bodytext"><input type="radio"
name="cityName" value="Daily" >
Albany</td>
</tr>
<% } %>
</table></td>
</tr>
<tr>
<td class="bodytext"><input type="submit" name="SubmitButton"
id="SubmitButton" value="Submit"></td>
</tr>
<tr><td>&nbsp;</td></tr>
<tr>
<td colspan=4
background="pt://images/plumtree/portal/custom/fh_images/rec_port_graphics/horiz_greyrule.gif">
<img
src="pt://images/plumtree/portal/custom/fh_images/rec_port_graphics/tr.gif"
width="1" height="1"></td>
</tr>
</table>
</form>
<jsp:include page="FHFooter.jsp"/>

</body>
</html>


Set UserPrefs:


<%@ page language="java" import="com.plumtree.remote.portlet.*"
contentType="text/html;charset=UTF-8" %>
<%
String path = request.getContextPath();
String basePath =
request.getScheme()+"://"+request.getServerName()+":"+request.getServerPor t()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">

<title>My JSP 'setAdminPrefs.jsp' starting page</title>

<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">

<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
</head>

<body>
<%
//Get portlet context object
IPortletContext portletContext =
PortletContextFactory.createPortletContext(request ,response);
IPortletResponse portletResponse = portletContext.getResponse();

//Get user name from incoming form, and set it into the
portletResponse
String cityName = request.getParameter("cityName");
if (cityName == null)
{
System.out.println("FHWeather: setUserPrefs: selected cityName is
null, set default StLouis");
cityName = "StLouis";
}

System.out.println("FHWeather: setUserPrefs: cityName = " +
cityName);

IPortletRequest portletRequest = portletContext.getRequest();
portletResponse.setSettingValue(SettingType.User, "cityName",
cityName);

System.out.println("FHWeather: setUserPrefs: cityName = " +
portletRequest.getSettingValue(SettingType.User, "cityName"));

portletResponse.returnToPortal();
%>
</body>
</html>


Thanks!

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Generated JavaScript vs. Manually Created JavaScript: Which one comes first? Nathan Sokalski ASP .Net 4 11-08-2007 07:24 AM
JavaScript or not JavaScript Mark Rae ASP .Net 36 09-09-2006 01:12 PM
href="javascript:func()" vs href="#" onclick="javascript:func()" CRON HTML 24 06-20-2006 08:05 PM
Javascript -> Applet: variable reset after method call from javascript?! mcdeveloper Java 1 06-13-2006 08:34 AM
To Javascript, or not to Javascript Shane NZ Computing 5 08-30-2005 09:33 PM



Advertisments