Passing information / strings between methods
- From: ChrisW <c.c.wood@xxxxxxxxx>
- Date: Wed, 22 Jul 2009 10:26:35 -0700 (PDT)
Hi,
Apologies if this is the wrong place to post this.
I've got a small site - http://www.srcf.ucam.org/~ccw34/ostests/index.php
- where I've got an OS Map (using the Openspace API -
http://openspace.ordnancesurvey.co.uk/openspace/index.html). I can
use HTML links to navigate to places on the map, and open information
windows. I can then use jQuery to open a popup window (which is
essentially a hidden div), via the HTML links on the information
window.
However, I want the content of this popup box to reflect the current
location (at the moment, this information is jsut stored as variables
on that page, but I plan to write a JSON file for all the data) . At
the moment, when I click the HTML link on the information window on
the map, I use onclick="openPopup()", which then loads the popup using
loadPopup(). I was hoping to run a function (writeContent(placeName))
within loadPopup() method to write the content in the div, but this
doesn't work.
Essentially, I've got no problem in getting the name of the current
place during the loadPopup() method, just passing this information to
the div before it loads. (At the moment, I've got all my tests
commented out, and the popup loads when the links on the information
window is clicked - if any of my test functions are uncommented, the
popup stops working totally, and just doesn't load).
I hope my problem makes sense - if anyone can give any help, I'd be
most grateful.
Thanks,
Chris
.
- Follow-Ups:
- Prev by Date: Re: Should we use 'new' or 'create' to create new objects
- Next by Date: Re: best method to "hide" a whole <table> column ?
- Previous by thread: submitting form multiple times
- Next by thread: Re: Passing information / strings between methods
- Index(es):
Relevant Pages
|