473,598 Members | 3,018 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Javascript if else?

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.ut il.*, java.text.* " %>
<%@ page import="com.plu mtree.remote.po rtlet.*" %>
<%@ page import="com.plu mtree.remote.pr c.*" %>
<%
String path = request.getCont extPath();
String basePath =
request.getSche me()+"://"+request.getSe rverName()+":"+ request.getServ erPort()+path+"/";
%>
<% response.setHea der("Cache-Control", "max-age=3400"); %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePa th%>">

<title>Weathe r</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="keywor d1,keyword2,key word3">
<meta http-equiv="descript ion" content="This is my page">

<!--
<link rel="stylesheet " type="text/css" href="styles.cs s">
<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.co m/weather/oap/USTX0016?templa te=GENXH&par=nu ll&unit=0&key=b a8a960da1889129 5bbc4cfea6a0dbe 2");

}
else if(city="amster dam")
{
window.open("ht tp://voap.weather.co m/weather/oap/NLXX0002?templa te=GENXH&par=nu ll&unit=0&key=6 7d2b0264796112c e6d75944acad734 e")
}
else if(city="atlant a")
{

window.open("ht tp://voap.weather.co m/weather/oap/USGA0028?templa te=GENXH&par=nu ll&unit=0&key=6 7d2b0264796112c e6d75944acad734 e")
}
else if (city='austin')
{

String("http://voap.weather.co m/weather/oap/USTX0057?templa te=GENXH&par=nu ll&unit=0&key=6 7d2b0264796112c e6d75944acad734 e")
}
else if (city='beijing' )
{

String("http://voap.weather.co m/weather/oap/CHXX0008?templa te=GENXH&par=nu ll&unit=1&key=6 7d2b0264796112c e6d75944acad734 e")
}
else if (city='berlin')
{

String("http://voap.weather.co m/weather/oap/GMXX0007?templa te=GENXH&par=nu ll&unit=1&key=6 7d2b0264796112c e6d75944acad734 e")
}
else if (city='boston')
{

String("http://voap.weather.co m/weather/oap/USMA0046?templa te=GENXH&par=nu ll&unit=0&key=6 7d2b0264796112c e6d75944acad734 e")
}
else if (city='brussels ')
{

String("http://voap.weather.co m/weather/oap/BEXX0005?templa te=GENXH&par=nu ll&unit=1&key=6 7d2b0264796112c e6d75944acad734 e")
}
else if (city='buffalo' )
{

String("http://voap.weather.co m/weather/oap/USNY0181?templa te=GENXH&par=nu ll&unit=0&key=6 7d2b0264796112c e6d75944acad734 e")
}
else if (city='calgary' )
{

String("http://voap.weather.co m/weather/oap/CAXX0054?templa te=GENXH&par=nu ll&unit=1&key=6 7d2b0264796112c e6d75944acad734 e'")
}
else if (city='charlott e')
{

String("http://voap.weather.co m/weather/oap/USNC0121?templa te=GENXH&par=nu ll&unit=0&key=6 7d2b0264796112c e6d75944acad734 e'")
}
else if (city='chicago' )
{

String("http://voap.weather.co m/weather/oap/USIL0225?templa te=GENXH&par=nu ll&unit=0&key=6 7d2b0264796112c e6d75944acad734 e'")
}
else if (city='clevelan d')
{

String("http://voap.weather.co m/weather/oap/USOH0195?templa te=GENXH&par=nu ll&unit=0&key=6 7d2b0264796112c e6d75944acad734 e")
}
else if (city='dallas')
{

String("http://voap.weather.co m/weather/oap/USTX0327?templa te=GENXH&par=nu ll&unit=0&key=6 7d2b0264796112c e6d75944acad734 e")
}
else if (city='detroit' )
{

String("http://voap.weather.co m/weather/oap/USMI0229?templa te=GENXH&par=nu ll&unit=0&key=6 7d2b0264796112c e6d75944acad734 e")
}
else if (city='dublin')
{

String("http://voap.weather.co m/weather/oap/EIXX0014?templa te=GENXH&par=nu ll&unit=1&key=6 7d2b0264796112c e6d75944acad734 e")
}
else if (city='edinburg h')
{

String("http://voap.weather.co m/weather/oap/UKXX0052?templa te=GENXH&par=nu ll&unit=1&key=6 7d2b0264796112c e6d75944acad734 e'")
}
else if (city='edmonton ')
{

String("http://voap.weather.co m/weather/oap/ASXX0036?templa te=GENXH&par=nu ll&unit=1&key=6 7d2b0264796112c e6d75944acad734 e")
}
else if (city='frankfur t')
{

String("http://voap.weather.co m/weather/oap/GMXX0185?templa te=GENXH&par=nu ll&unit=1&key=6 7d2b0264796112c e6d75944acad734 e")
}
else if (city='hongkong ')
{

String("http://voap.weather.co m/weather/oap/CHXX0049?templa te=GENXH&par=nu ll&unit=1&key=6 7d2b0264796112c e6d75944acad734 e")
}
else if (city='houston' )
{

String("http://voap.weather.co m/weather/oap/USTX0617?templa te=GENXH&par=nu ll&unit=0&key=6 7d2b0264796112c e6d75944acad734 e")
}
else if (city='johannes burg')
{

String("http://voap.weather.co m/weather/oap/SFXX0023?templa te=GENXH&par=nu ll&unit=1&key=6 7d2b0264796112c e6d75944acad734 e")
}
else if (city='kansasci ty')
{

String("http://voap.weather.co m/weather/oap/USMO0460?templa te=GENXH&par=nu ll&unit=0&key=6 7d2b0264796112c e6d75944acad734 e")
}
else if (city='kualalum pur')
{

String("http://voap.weather.co m/weather/oap/MYXX0008?templa te=GENXH&par=nu ll&unit=1&key=6 7d2b0264796112c e6d75944acad734 e")
}
else if (city='london')
{

String("http://voap.weather.co m/weather/oap/UKXX0085?templa te=GENXH&par=nu ll&unit=1&key=6 7d2b0264796112c e6d75944acad734 e")
}
else if (city='losangel es')
{

String("http://voap.weather.co m/weather/oap/USCA0638?templa te=GENXH&par=nu ll&unit=0&key=6 7d2b0264796112c e6d75944acad734 e")
}
else if (city='madrid')
{

String("http://voap.weather.co m/weather/oap/SPXX0050?templa te=GENXH&par=nu ll&unit=1&key=6 7d2b0264796112c e6d75944acad734 e")
}
else if (city='manila')
{

String("http://voap.weather.co m/weather/oap/RPXX0017?templa te=GENXH&par=nu ll&unit=1&key=6 7d2b0264796112c e6d75944acad734 e")
}
else if (city='melbourn e')
{

String("http://voap.weather.co m/weather/oap/ASXX0075?templa te=GENXH&par=nu ll&unit=1&key=6 7d2b0264796112c e6d75944acad734 e")
}
else if (city='mexico')
{

String("http://voap.weather.co m/weather/oap/MXDF0132?templa te=GENXH&par=nu ll&unit=0&key=6 7d2b0264796112c e6d75944acad734 e")
}
else if (city='miami')
{

String("http://voap.weather.co m/weather/oap/USFL0316?templa te=GENXH&par=nu ll&unit=0&key=6 7d2b0264796112c e6d75944acad734 e")
}
else if (city='milan')
{

String("http://voap.weather.co m/weather/oap/ITXX0042?templa te=GENXH&par=nu ll&unit=1&key=6 7d2b0264796112c e6d75944acad734 e")
}
else if (city='minneapo lis')
{

String("http://voap.weather.co m/weather/oap/USMN0503?templa te=GENXH&par=nu ll&unit=0&key=6 7d2b0264796112c e6d75944acad734 e")
}
else if (city='montreal ')
{

String("http://voap.weather.co m/weather/oap/CAXX0301?templa te=GENXH&par=nu ll&unit=1&key=9 1722c3a3c6b8b30 2602ce2bf13950a e")
}
else if (city='munich')
{

String("http://voap.weather.co m/weather/oap/GMXX0087?templa te=GENXH&par=nu ll&unit=1&key=6 7d2b0264796112c e6d75944acad734 e")
}
else if (city='neworlea ns')
{

String("http://voap.weather.co m/weather/oap/USLA0338?templa te=GENXH&par=nu ll&unit=0&key=6 7d2b0264796112c e6d75944acad734 e")
}
else if (city='newyork' )
{

String("http://voap.weather.co m/weather/oap/USNY0996?templa te=GENXH&par=nu ll&unit=0&key=6 7d2b0264796112c e6d75944acad734 e")
}
else if (city='ottawa')
{

String("http://voap.weather.co m/weather/oap/CAXX0343?templa te=GENXH&par=nu ll&unit=1&key=6 7d2b0264796112c e6d75944acad734 e")
}
else if (city='paris')
{

String("http://voap.weather.co m/weather/oap/FRXX0076?templa te=GENXH&par=nu ll&unit=1&key=6 7d2b0264796112c e6d75944acad734 e")
}
else if (city='portland ')
{

String("http://voap.weather.co m/weather/oap/USOR0275?templa te=GENXH&par=nu ll&unit=0&key=6 7d2b0264796112c e6d75944acad734 e")
}
else if (city='prague')
{

String("http://voap.weather.co m/weather/oap/EZXX0012?templa te=GENXH&par=nu ll&unit=1&key=6 7d2b0264796112c e6d75944acad734 e")
}
else if (city='quebec')
{

String("http://voap.weather.co m/weather/oap/CAXX0385?templa te=GENXH&par=nu ll&unit=1&key=6 7d2b0264796112c e6d75944acad734 e")
}
else if (city='raleighd urham')
{

String("http://voap.weather.co m/weather/oap/USNC0558?templa te=GENXH&par=nu ll&unit=0&key=6 7d2b0264796112c e6d75944acad734 e")
}
else if (city='sacramen to')
{

String("http://voap.weather.co m/weather/oap/USCA0967?templa te=GENXH&par=nu ll&unit=0&key=6 7d2b0264796112c e6d75944acad734 e")
}
else if (city='sananton io')
{

String("http://voap.weather.co m/weather/oap/USTX1200?templa te=GENXH&par=nu ll&unit=0&key=6 7d2b0264796112c e6d75944acad734 e")
}
else if (city='sandiego ')
{

String("http://voap.weather.co m/weather/oap/USCA0982?templa te=GENXH&par=nu ll&unit=0&key=6 7d2b0264796112c e6d75944acad734 e")
}
else if (city='sanfranc isco')
{

String("http://voap.weather.co m/weather/oap/USCA0987?templa te=GENXH&par=nu ll&unit=0&key=6 7d2b0264796112c e6d75944acad734 e")
}
else if (city='sanjuan' )
{

String("http://voap.weather.co m/weather/oap/PEXX0047?templa te=GENXH&par=nu ll&unit=0&key=6 7d2b0264796112c e6d75944acad734 e")
}
else if (city='seattle' )
{

String("http://voap.weather.co m/weather/oap/USWA0395?templa te=GENXH&par=nu ll&unit=0&key=6 7d2b0264796112c e6d75944acad734 e")
}
else if (city='seoul')
{

String("http://voap.weather.co m/weather/oap/KSXX0037?templa te=GENXH&par=nu ll&unit=0&key=6 7d2b0264796112c e6d75944acad734 e")
}
else if (city='shanghai ')
{

String("http://voap.weather.co m/weather/oap/CHXX0116?templa te=GENXH&par=nu ll&unit=1&key=6 7d2b0264796112c e6d75944acad734 e")
}
else if (city='singapor e')
{

String("http://voap.weather.co m/weather/oap/SNXX0006?templa te=GENXH&par=nu ll&unit=1&key=6 7d2b0264796112c e6d75944acad734 e")
}
else if (city='StLouis' )
{

String("http://voap.weather.co m/weather/oap/63102?template= GENXH&par=null& unit=0&key=67d2 b0264796112ce6d 75944acad734e")
}
else if (city='sydney')
{

String("http://voap.weather.co m/weather/oap/ASXX0112?templa te=GENXH&par=nu ll&unit=1&key=6 7d2b0264796112c e6d75944acad734 e")
}
else if (city='tokyo')
{

String("http://voap.weather.co m/weather/oap/JAXX0085?templa te=GENXH&par=nu ll&unit=1&key=6 7d2b0264796112c e6d75944acad734 e")
}
else if (city='toronto' )
{

String("http://voap.weather.co m/weather/oap/CAXX0504?templa te=GENXH&par=nu ll&unit=1&key=6 7d2b0264796112c e6d75944acad734 e")
}
else if (city='vancouve r')
{

String("http://voap.weather.co m/weather/oap/CAXX0518?templa te=GENXH&par=nu ll&unit=1&key=6 7d2b0264796112c e6d75944acad734 e")
}
else if(city='warsaw ')
{

String("http://voap.weather.co m/weather/oap/PLXX0028?templa te=GENXH&par=nu ll&unit=1&key=6 7d2b0264796112c e6d75944acad734 e")
}
</script>

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

Jan 19 '06 #1
5 2045

Brie_Mana...@ho tmail.com 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.co m/weather/oap/USTX0016?templa te=GENXH&par=nu ll&unit=0&key=b a8a960da1889129 5bbc4cfea6a0dbe 2");

}
[...snip...]
else if(city='warsaw ')
{

String("http://voap.weather.co m/weather/oap/PLXX0028?templa te=GENXH&par=nu ll&unit=1&key=6 7d2b0264796112c e6d75944acad734 e")
}


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(ali nk, ...); //place other attributes that you need.

Jan 19 '06 #2
I'm not sure that I fully understand.

I changed these points:

<script type = "text/javascript">
if (city="albany")
{
open("http://voap.weather.co m/weather/oap/USTX0016?templa te=GENXH&par=nu ll&..."); }
[...snip...]
else if(city='warsaw ')
{ String("http://voap.weather.co m/weather/oap/PLXX0028?templa te=GENXH&par=nu ll&...")
}


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

<%@ page language="java" import="java.ut il.*, java.text.* " %>
<%@ page import="com.plu mtree.remote.po rtlet.*" %>
<%@ page import="com.plu mtree.remote.pr c.*" %>
<%
String path = request.getCont extPath();
String basePath =
request.getSche me()+"://"+request.getSe rverName()+":"+ request.getServ erPort()+path+"/";
%>
<% response.setHea der("Cache-Control", "max-age=3400"); %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePa th%>">

<title>Weathe r</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="keywor d1,keyword2,key word3">
<meta http-equiv="descript ion" content="This is my page">

<!--
<link rel="stylesheet " type="text/css" href="styles.cs s">
<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.co m/weather/oap/USTX0016?templa te=GENXH&par=nu ll&unit=0&key=b a8a960da1889129 5bbc4cfea6a0dbe 2";
break;
case "warsaw":
alink =
"http://voap.weather.co m/weather/oap/PLXX0028?templa te=GENXH&par=nu ll&unit=1&key=6 7d2b0264796112c e6d75944acad734 e";
break;

}

</script>

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

Then city is undefined?

Jan 19 '06 #3

Brie_Mana...@ho tmail.com wrote:
<script type = "text/javascript">
var alink = "";

switch(city)
{
case "albany":
alink =
"http://voap.weather.co m/weather/oap/USTX0016?templa te=GENXH&par=nu ll&unit=0&key=b a8a960da1889129 5bbc4cfea6a0dbe 2";
break;
case "warsaw":
alink =
"http://voap.weather.co m/weather/oap/PLXX0028?templa te=GENXH&par=nu ll&unit=1&key=6 7d2b0264796112c e6d75944acad734 e";
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?

Jan 19 '06 #4
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.ut il.*" %>
<%@ page import="com.plu mtree.remote.po rtlet.*" %>
<%@ page import="com.plu mtree.remote.pr c.*" %>
<%
String path = request.getCont extPath();
String basePath =
request.getSche me()+"://"+request.getSe rverName()+":"+ request.getServ erPort()+path+"/";
%>

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

<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="keywor d1,keyword2,key word3">
<meta http-equiv="descript ion" content="This is my page">

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

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

<script LANGUAGE="JavaS cript">
<!--
window.moveTo(1 00,100);
if (window.screen) self.resizeTo(W idth=700,Height =400);

//-->
</script>

</head>

<body>
<%
String cityName = null;
try
{
//get portlet context obj
IPortletContext portletContext =
PortletContextF actory.createPo rtletContext(re quest, response);
IRemoteSession remoteSession =
portletContext. getRemotePortal Session();

//Get portlet context object
IPortletRequest portletRequest = portletContext. getRequest();
cityName = portletRequest. getSettingValue (SettingType.Us er,
"cityName") ;
if (cityName != null)
{
System.out.prin tln("FHWeather: userPrefs: previous selected
cityName = " + cityName);
}
}
catch(Exception ex)
{
ex.printStackTr ace();
}
%>
<form name="userprefs " method="post" action="setUser Prefs.jsp"
id="userPrefs" >
<table width="100%" cellspacing="0" cellpadding="0" >
<tr>
<td colspan=4
background="pt://images/plumtree/portal/custom/fh_images/rec_port_graphi cs/horiz_greyrule. gif">
<img
src="pt://images/plumtree/portal/custom/fh_images/rec_port_graphi cs/tr.gif"
width="1" height="1"></td>
</tr>
<tr><td colspan=4><p class="pagetitl e">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%">&nb sp;</td></tr>
<tr>
<td colspan=4
background="pt://images/plumtree/portal/custom/fh_images/rec_port_graphi cs/horiz_greyrule. gif">
<img
src="pt://images/plumtree/portal/custom/fh_images/rec_port_graphi cs/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.equals IgnoreCase("alb any"))
{
%>
<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%"><ta ble>
<% if (cityName != null &&
cityName.equals IgnoreCase("ams terdam"))
{
%>
<tr>
<td align="left" class="bodytext "><input type="radio"
name="cityName" value="Amsterda m" checked>
Amsterdam</td>
</tr>
<% }
else
{ %>
<tr>
<td height="21" align="left" class="bodytext "><input
type="radio" name="cityName" value="Amsterda m" >
Amsterdam</td>
</tr>
<% } %>
</table></td>
<td valign="top" align="left" width="20%"><ta ble>
<% if (cityName != null &&
cityName.equals IgnoreCase("atl anta"))
{
%>
<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.equals IgnoreCase("aus tin"))
{
%>
<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"><t able>
<% if (cityName != null &&
cityName.equals IgnoreCase("bei jing"))
{
%>
<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"><t able>
<% if (cityName != null &&
cityName.equals IgnoreCase("ber lin"))
{
%>
<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.equals IgnoreCase("bos ton"))
{
%>
<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"><t able>
<% if (cityName != null &&
cityName.equals IgnoreCase("bru ssels"))
{
%>
<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"><t able>
<% if (cityName != null &&
cityName.equals IgnoreCase("buf falo"))
{
%>
<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.equals IgnoreCase("cal gary"))
{
%>
<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"><t able>
<% if (cityName != null &&
cityName.equals IgnoreCase("cha rlotte"))
{
%>
<tr>
<td align="left" class="bodytext "><input type="radio"
name="cityName" value="Charlott e" checked>
Charlotte</td>
</tr>
<% }
else
{ %>
<tr>
<td height="21" align="left" class="bodytext "><input
type="radio" name="cityName" value="Charlott e" >
Charlotte</td>
</tr>
<% } %>
</table></td>
<td valign="top" align="left"><t able>
<% if (cityName != null &&
cityName.equals IgnoreCase("chi cago"))
{
%>
<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.equals IgnoreCase("cle veland"))
{
%>
<tr>
<td width="146" align="left" class="bodytext "><input
type="radio" name="cityName" value="Clevelan d" checked>
Albany</td>
</tr>
<% }
else
{ %>
<tr>
<td align="left" class="bodytext "><input type="radio"
name="cityName" value="Clevelan d" >
Cleveland</td>
</tr>
<% } %>
</table></td>
<td valign="top" align="left"><t able>
<% if (cityName != null &&
cityName.equals IgnoreCase("dal las"))
{
%>
<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"><t able>
<% if (cityName != null &&
cityName.equals IgnoreCase("det roit"))
{
%>
<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.equals IgnoreCase("dub lin"))
{
%>
<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"><t able>
<% if (cityName != null &&
cityName.equals IgnoreCase("edi nburgh"))
{
%>
<tr>
<td align="left" class="bodytext "><input type="radio"
name="cityName" value="Edinburg h" checked>
Edinburgh</td>
</tr>
<% }
else
{ %>
<tr>
<td height="21" align="left" class="bodytext "><input
type="radio" name="cityName" value="Edinburg h" >
Edinburgh</td>
</tr>
<% } %>
</table></td>
<td valign="top" align="left"><t able>
<% if (cityName != null &&
cityName.equals IgnoreCase("edm onton"))
{
%>
<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.equals IgnoreCase("fra nkfurt"))
{
%>
<tr>
<td width="146" align="left" class="bodytext "><input
type="radio" name="cityName" value="Frankfur t" checked>
Frankfurt</td>
</tr>
<% }
else
{ %>
<tr>
<td align="left" class="bodytext "><input type="radio"
name="cityName" value="Frankfur t" >
Frankfurt</td>
</tr>
<% } %>
</table></td>
<td valign="top" align="left"><t able>
<% if (cityName != null &&
cityName.equals IgnoreCase("hon gkong"))
{
%>
<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"><t able>
<% if (cityName != null &&
cityName.equals IgnoreCase("hou ston"))
{
%>
<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.equals IgnoreCase("joh annesburg"))
{
%>
<tr>
<td width="146" align="left" class="bodytext "><input
type="radio" name="cityName" value="Johannes burg" checked>
Johannesburg</td>
</tr>
<% }
else
{ %>
<tr>
<td align="left" class="bodytext "><input type="radio"
name="cityName" value="Johannes burg" >
Johannesburg</td>
</tr>
<% } %>
</table></td>
<td valign="top" align="left"><t able>
<% if (cityName != null &&
cityName.equals IgnoreCase("kan sascityName"))
{
%>
<tr>
<td align="left" class="bodytext "><input type="radio"
name="cityName" value="Kansasci tyName" checked>
Kansas cityName</td>
</tr>
<% }
else
{ %>
<tr>
<td height="21" align="left" class="bodytext "><input
type="radio" name="cityName" value="Kansasci tyName" >
Kansas cityName</td>
</tr>
<% } %>
</table></td>
<td valign="top" align="left"><t able>
<% if (cityName != null &&
cityName.equals IgnoreCase("kua lalumpur"))
{
%>
<tr>
<td align="left" class="bodytext "><input type="radio"
name="cityName" value="KualaLum pur" 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.equals IgnoreCase("lon don"))
{
%>
<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"><t able>
<% if (cityName != null &&
cityName.equals IgnoreCase("los angeles"))
{
%>
<tr>
<td align="left" class="bodytext "><input type="radio"
name="cityName" value="LosAngel es" 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"><t able>
<% if (cityName != null &&
cityName.equals IgnoreCase("mad rid"))
{
%>
<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.equals IgnoreCase("man ila"))
{
%>
<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"><t able>
<% if (cityName != null &&
cityName.equals IgnoreCase("mel bourne"))
{
%>
<tr>
<td align="left" class="bodytext "><input type="radio"
name="cityName" value="Melbourn e" checked>
Melbourne</td>
</tr>
<% }
else
{ %>
<tr>
<td height="21" align="left" class="bodytext "><input
type="radio" name="cityName" value="Melbourn e" >
Melbourne</td>
</tr>
<% } %>
</table></td>
<td valign="top" align="left"><t able>
<% if (cityName != null &&
cityName.equals IgnoreCase("mex ico"))
{
%>
<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.equals IgnoreCase("mia mi"))
{
%>
<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"><t able>
<% if (cityName != null &&
cityName.equals IgnoreCase("mil an"))
{
%>
<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"><t able>
<% if (cityName != null &&
cityName.equals IgnoreCase("min neapolis"))
{
%>
<tr>
<td align="left" class="bodytext "><input type="radio"
name="cityName" value="Minneapo lis" checked>
Minneapolis/St. Paul</td>
</tr>
<% }
else
{ %>
<tr>
<td align="left" class="bodytext "><input type="radio"
name="cityName" value="Minneapo lis" >
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.equals IgnoreCase("mon treal"))
{
%>
<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"><t able>
<% if (cityName != null &&
cityName.equals IgnoreCase("mun ich"))
{
%>
<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"><t able>
<% if (cityName != null &&
cityName.equals IgnoreCase("new orleans"))
{
%>
<tr>
<td align="left" class="bodytext "><input type="radio"
name="cityName" value="NewOrlea ns" 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.equals IgnoreCase("new york"))
{
%>
<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"><t able>
<% if (cityName != null &&
cityName.equals IgnoreCase("ott awa"))
{
%>
<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"><t able>
<% if (cityName != null &&
cityName.equals IgnoreCase("par is"))
{
%>
<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.equals IgnoreCase("por tland"))
{
%>
<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"><t able>
<% if (cityName != null &&
cityName.equals IgnoreCase("pra gue"))
{
%>
<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"><t able>
<% if (cityName != null &&
cityName.equals IgnoreCase("que bec"))
{
%>
<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.equals IgnoreCase("ral eighdurham"))
{
%>
<tr>
<td width="146" align="left" class="bodytext "><input
type="radio" name="cityName" value="RaleighD urham" checked>
Raleigh-Durham</td>
</tr>
<% }
else
{ %>
<tr>
<td align="left" class="bodytext "><input type="radio"
name="cityName" value="RaleighD urham" >
Raleigh Durham</td>
</tr>
<% } %>
</table></td>
<td valign="top" align="left"><t able>
<% if (cityName != null &&
cityName.equals IgnoreCase("sac ramento"))
{
%>
<tr>
<td align="left" class="bodytext "><input type="radio"
name="cityName" value="Sacramen to" checked>
Sacramento</td>
</tr>
<% }
else
{ %>
<tr>
<td height="21" align="left" class="bodytext "><input
type="radio" name="cityName" value="Sacramen to" >
Sacramento</td>
</tr>
<% } %>
</table></td>
<td valign="top" align="left"><t able>
<% if (cityName != null &&
cityName.equals IgnoreCase("san antonio"))
{
%>
<tr>
<td align="left" class="bodytext "><input type="radio"
name="cityName" value="SanAnton io" 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.equals IgnoreCase("san diego"))
{
%>
<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"><t able>
<% if (cityName != null &&
cityName.equals IgnoreCase("san francisco"))
{
%>
<tr>
<td align="left" class="bodytext "><input type="radio"
name="cityName" value="SanFranc isco" checked>
San Francisco</td>
</tr>
<% }
else
{ %>
<tr>
<td height="21" align="left" class="bodytext "><input
type="radio" name="cityName" value="SanFranc isco" >
San Francisco</td>
</tr>
<% } %>
</table></td>
<td valign="top" align="left"><t able>
<% if (cityName != null &&
cityName.equals IgnoreCase("san juan"))
{
%>
<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.equals IgnoreCase("sea ttle"))
{
%>
<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"><t able>
<% if (cityName != null &&
cityName.equals IgnoreCase("seo ul"))
{
%>
<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"><t able>
<% if (cityName != null &&
cityName.equals IgnoreCase("sha nghai"))
{
%>
<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.equals IgnoreCase("sin gapore"))
{
%>
<tr>
<td width="146" align="left" class="bodytext "><input
type="radio" name="cityName" value="Singapor e" checked>
Singapore</td>
</tr>
<% }
else
{ %>
<tr>
<td align="left" class="bodytext "><input type="radio"
name="cityName" value="Singapor e" >
Singapore</td>
</tr>
<% } %>
</table></td>
<td valign="top" align="left"><t able>
<% if (cityName != null &&
cityName.equals IgnoreCase("StL ouis"))
{
%>
<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"><t able>
<% if (cityName != null &&
cityName.equals IgnoreCase("syd ney"))
{
%>
<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.equals IgnoreCase("tok yo"))
{
%>
<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"><t able>
<% if (cityName != null &&
cityName.equals IgnoreCase("tor onto"))
{
%>
<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"><t able>
<% if (cityName != null &&
cityName.equals IgnoreCase("van couver"))
{
%>
<tr>
<td align="left" class="bodytext "><input type="radio"
name="cityName" value="Vancouve r" checked>
Vancouver</td>
</tr>
<% }
else
{ %>
<tr>
<td align="left" class="bodytext "><input type="radio"
name="cityName" value="Vancouve r" >
Vancouver</td>
</tr>
<% } %>
</table></td>
</tr>
<tr>
<td valign="top" class="bodytext ">&nbsp;</td>
<td valign="top" align="left">
<table>
<% if (cityName != null &&
cityName.equals IgnoreCase("war saw"))
{
%>
<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"><t able>
<% if (cityName != null &&
cityName.equals IgnoreCase("was hington"))
{
%>
<tr>
<td align="left" class="bodytext "><input type="radio"
name="cityName" value="Washingt on" checked>
Washington D.C.</td>
</tr>
<% }
else
{ %>
<tr>
<td height="21" align="left" class="bodytext "><input
type="radio" name="cityName" value="Washingt on" >
Washington D.C.</td>
</tr>
<% } %>
</table></td>
<td valign="top" align="left"><t able>
<% if (cityName != null &&
cityName.equals IgnoreCase("alb any"))
{
%>
<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="SubmitBut ton"
id="SubmitButto n" value="Submit"> </td>
</tr>
<tr><td>&nbsp ;</td></tr>
<tr>
<td colspan=4
background="pt://images/plumtree/portal/custom/fh_images/rec_port_graphi cs/horiz_greyrule. gif">
<img
src="pt://images/plumtree/portal/custom/fh_images/rec_port_graphi cs/tr.gif"
width="1" height="1"></td>
</tr>
</table>
</form>
<jsp:include page="FHFooter. jsp"/>

</body>
</html>
Set UserPrefs:
<%@ page language="java" import="com.plu mtree.remote.po rtlet.*"
contentType="te xt/html;charset=UT F-8" %>
<%
String path = request.getCont extPath();
String basePath =
request.getSche me()+"://"+request.getSe rverName()+":"+ request.getServ erPort()+path+"/";
%>

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

<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="keywor d1,keyword2,key word3">
<meta http-equiv="descript ion" content="This is my page">

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

<body>
<%
//Get portlet context object
IPortletContext portletContext =
PortletContextF actory.createPo rtletContext(re quest,response) ;
IPortletRespons e portletResponse = portletContext. getResponse();

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

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

IPortletRequest portletRequest = portletContext. getRequest();
portletResponse .setSettingValu e(SettingType.U ser, "cityName",
cityName);

System.out.prin tln("FHWeather: setUserPrefs: cityName = " +
portletRequest. getSettingValue (SettingType.Us er, "cityName") );

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

Jan 19 '06 #5
On 2006-01-19, web.dev <we********@gma il.com> wrote:

var alink = "";

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

using an object can be even more efficient.

var alink={ albany:"http://URI"
, warsaw:"http://URI"
/* many more ... */
}[city]
Bye.
Jasen
Jan 20 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
3829
by: JesusFreak | last post by:
From: us_traveller@yahoo.com (JesusFreak) Newsgroups: microsoft.public.scripting.jscript Subject: toolbar script problem NNTP-Posting-Host: 192.92.126.136 Recently, I downloaded the following beautiful script "http://javascript.internet.com/navigation/toolbar-menu.html". It works like a charm. I made my webpage in frames, where the nav-frame shows the menubar, so whenever I click a link in the menubar, it opens in the frame below. But...
10
2021
by: John Ortt | last post by:
Hi Everyone, I have created a Javascript menu for my site which uses frames. The first stage loads fine but I want two drill down menus ("About Me Menu" and "Projects Menu"). The pages load fine, but the images aren't displayed, instead the alt text is shown. The images come up after you "Mouse Over" them but not before......can anybody spot any errors in my code which could be doing this please. For info, I have 4 images for each...
2
3874
by: Jackson Yap | last post by:
can someone kind enough to help me look at the attached html and js file? Why is it that the javascript menu could not work at www.apchosting.net but could work at http://home.pacific.net.sg/~jacksony ? (the drop down bar could not work at www.apchosting.net but can drop at home.pacific.net.sg. I suspect it is a server problem but was told it is not possible, therefore assuming it is a client script problem? the script works last time...
1
2832
by: oreng | last post by:
Hey all, I have some problems detecting whether the client's browser javascript is enabled at the server side. While Request.Browser.JavaScript only check if the browser enable java script (and so on with Request.Browser.Cookies). I saw some server controls that register a startup script on the page_load and then perform a postback and run the javascript,changing a hidden
4
3498
by: John Boy | last post by:
Hi, Can anyone help. This is really doing my nut in. 3 years ASP exp. and now doing .DOT which is a step in the wrong direction. Basically I am left with the code of a guy who has left. When I click a button on a pop-up window the javascript for that button click does a 'button.form.submit'. On the Server side there is a Button click event for this button, but for some reason it no longer fires. It worked fine before and everything...
2
3144
by: sorobor | last post by:
dear sir .. i am using cakephp freamwork ..By the way i m begener in php and javascript .. My probs r bellow I made a javascript calender ..there is a close button ..when i press close button then the calender gone actually i want if i click outside off the calender then it should me removed ..How kan i do this ... Pls inform me as early as possible .. I am waiting for ur quick replay ...Here i attached the source code .... <!DOCTYPE...
6
2451
The1corrupted
by: The1corrupted | last post by:
I don't know if this is the right forum or not, but right now, my Javascript, that is embedded in PHP, is not working! It works everywhere else but not here. HELP!! <?php $soldnumber=$_POST; $cavnumber=$_POST; $artnumber=$_POST; if ($marray==1) { $tanknumber=$_POST;
1
2565
by: KRISHNA PRAVI | last post by:
the error is "runtime error object expected" here is the code....................................................................................... <script language="javascript" src="../Scripts/calender.js"></script> </HEAD> <body bgColor="white" MS_POSITIONING="GridLayout"> <form id="Form1" style="LEFT: 0px; POSITION: absolute; TOP: 0px" method="post" runat="server"> <!--<table width="100%" style="LEFT: 0px; POSITION:...
1
2722
by: critchey1 | last post by:
Hey everyone, i've been playing around with trying to get some scripts to work with detecting whether flash player is installed on your computer or not. I found a flash detection kit on the adobe site which had a client side detection method using javascript. Basically what im trying to get it to do is if flash player is installed, use the style property display="none" to hide my static content, and if flash is not installed hide the flash...
0
7894
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8392
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8262
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6711
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
5847
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
3894
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
3938
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1500
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1245
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.