Question about Lists- help!

I need to create a pull-down list that will allow someone to select a zip code. When the zip code is selected, I would like an html page to be displayed in the iFrame beneath the pull-down list. How do I do this? Any information will be greatly appreciated. Thanks in advance.

TB


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

How are you determining which page to show in the iframe? How does
the zip code figure into this? For example, if the possible pages
were named for the zip codes, such that you had a page named
19027.html or the like, then you could just do this:

function showme(zip){
	return document.getElementById('id_of_your_iframe').src =
		zip + '.html';
}

and in the onchange event of your select, do this:

onchange="showme(this.options[this.selectedIndex])"

That would be the barest-bones way to do this particular trick.

Now if you are going to need to do something more involved, like say
submit a form to a search engine or something like that, then you
would need to go further, probably using an Ajax call, and for that I
would direct you to Prototype.js to make this easier.

More info, and I can give you more suggestions.

Walter

On Mar 24, 2008, at 5:41 PM, twb716 wrote:

I need to create a pull-down list that will allow someone to select
a zip code. When the zip code is selected, I would like an html
page to be displayed in the iFrame beneath the pull-down list. How
do I do this? Any information will be greatly appreciated. Thanks
in advance.

TB


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

thanks for the response. That’s exactly how I want to do it- each zip will have its own page with an address in it. Couple of questions:

  1. where do I place the code that you suggested?
  2. how can I get the results to load in a iFrame?

Thanks again.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

I’ve tried everything that I could think of, and I can’t get this thing to work. Where do I put the code? Where do I put the “onchange” event? Thanks.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

You add it through the Extended dialog on the picking list containing
the Zip codes. Click once on the picking list. From the main menu,
select Item > Extended. In the resulting dialog, click on New, then
enter ‘onchange’ (without the quotes) for the Name, and ‘showme
(this.options[this.selectedIndex])’ for the Value.

Then, again from the main menu, choose Page > HTML Markup. Change the
picker at the bottom-left of the dialog to Before /head, and paste in
the function:

<script type="text/javascript">
function showme(zip){
	return document.getElementById('id_of_your_iframe').src =
		zip + '.html';
}
</script>

Okay the dialog, and publish. It might work in the Preview view, but
it will most likely work in a browser.

So that’s how to get the code into your page. Now there’s a final
hurdle. The iFrame action does not include an ID for the iframe it
generates, so this whole thing founders on the rocks and fails to
work. If you apply Source Code Snooper to the iframe <http://
freewayactions.com> then you will be able to add an ID. I’ll also
take a look at the iframe action and see if I can hack this in for you.

Walter

On Mar 28, 2008, at 5:52 PM, twb716 wrote:

I’ve tried everything that I could think of, and I can’t get this
thing to work. Where do I put the code? Where do I put the
“onchange” event? Thanks.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Walter,

I just can’t get this thing to work. Here is a link to a test FW project that I created. If you would be willing to take a look and let me know of any problems that you find, I would be very grateful. Thanks.

http://www.audicaentertainment.com/demo/zipsearch.zip

TB


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

The major issue with the code I posted was that the function call was
passing the option rather than the option’s value. This is the
corrected function call:

onchange="showme(this.options[this.selectedIndex].value)"

Walter

On Mar 29, 2008, at 1:58 PM, twb716 wrote:

Walter,

I just can’t get this thing to work. Here is a link to a test FW
project that I created. If you would be willing to take a look and
let me know of any problems that you find, I would be very
grateful. Thanks.

http://www.audicaentertainment.com/demo/zipsearch.zip

TB


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options