473,543 Members | 1,975 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

I have a question on pulling a web page in javascript

I have a user preferences page where users select what city they're
with. Once they choose that a certain page shows in a portlet on their
intranet page. I can't get this to work. Here's the code I have for
it to show those corresponding pages. Does anyone know what i'm doing
wrong? Any help would be greatly appreciated.

<script type="text/javascript">

for (var i = 0; i < cityName; i++)
if (cityName.toLow erCase() ==
cityName[i].cityName.toLow erCase())
{
open (weatherURL);
break;
}

var cityName = [
{ cityName: 'austin',
weatherURL: "austin.htm l" },
{ cityName: "albany",
weatherURL: "albany.htm l" },
{ cityName: "amsterdam" ,
weatherURL: "amsterdam.html " },
{ cityName: "beijing",
weatherURL: "beijing.ht ml" },
{ cityName: "berlin",
weatherURL: "berlin.htm l" }

];
</script>
Thanks!
Brie

Feb 9 '06 #1
1 963
Brie wrote:
<script type="text/javascript">
for (var i = 0; i < cityName; i++)
So you loop through cityName ...
var cityName = [


.... /before/ cityName exists.

--
David Dorward <http://blog.dorward.me .uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is
Feb 9 '06 #2

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

Similar topics

1
2710
by: David Fraser | last post by:
I used this when trying to retrieve the McMillan site. Others might find it useful... David #!/usr/bin/env python import urlparse import urllib2 import os
3
3380
by: middletree | last post by:
I have a page where I allow the user to select one or more names of employees to send an email to, which is sent automatically when the form is submitted. I have a field called EmailSentTo, and if you sent it to Joe Smith, then it stores the employee's number, 200, which is the PK of the Employee table. And there is, of course, another page...
6
1355
by: fritz | last post by:
Hi, I am not doing too well here. In the head I have: <link type="text/css" rel="stylesheet" href="myfirst.css"> <script src="myfirst.js" type="text/javascript"></script> I have the following in 'myfirst.js' file: var writastring ="<table width="250" border="2"><tr> <td>Here is my first script text</td></tr></table>"
1
2703
by: bryanilton | last post by:
Hi guys, I hope that one of you gurus can help me out here. Basically what I'd like to do is be able to price harddrives. I'd like to have two drop-down boxes. One for the manufacturer and the other for the harddrive capacity and then spit out a price. I don't have access to any database or server side scripting so I think javascript is...
1
1582
by: govince | last post by:
Not sure this is realyy realted to access, but a least to asp scripting. This is what I am trying achieve, I'll try to make it as clear as possible: I am integrating a search page form a remote website (of which we are members, this is for realtor listings) into our website front page. (See http://denisonrealty.com.temp.omnis.com/) The...
1
1093
by: afadich | last post by:
Hi, Please be nice :) I don't exactly know how to explain this or if I am using the correct terminology. Some background: I am working on a signup page for my website. This page has a javascript src which is a query to a database which returns the results of the query as a java script array That array then populates all my
1
2870
by: xx75vulcan | last post by:
I have created an ASP page that will "on the fly" create an XML feed from my MS SQL database and the contents within a specified table. The Feed: http://www.rockwood.k12.mo.us/news/rss.asp You won't be able to see the code, b/c it returns xml, so I copied it below. The Problem: I can get every value to return from the database except the...
2
1105
by: Barney Rubble | last post by:
help please...... I have the following script. I would like to remove the images (plus.png and minus.png). I have removed the code: <img id="pm1" src="" alt=""where it appears, but each time I do, the menu no longer expands. I have tried removing various elements in the <scriptareas, but nothing works for me. Any ideas please? ...
1
1477
by: ephemie | last post by:
Hi all, Not sure whether this is a javascript or MySql issue. Have below javascript code of embedded flash player stored in text field in MySql, with php reading it into a variable and echoing it, however no player shows. Code is seen when a view source of page is done, so it's reading it out ok. Am I missing escape characters or...
0
7412
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7355
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...
0
7746
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...
1
7356
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7697
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...
0
5889
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...
1
5285
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...
0
4899
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
648
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...

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.