September 02, 2010, 09:25:04 pm *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Alternative FF download location here !
 
   Home   Help Search Login Register  
Pages: [1]   Go Down
  Print  
Author Topic: receive values from open.window()  (Read 1162 times)
allegrande
Newbie

Offline Offline

Posts: 6


« on: September 13, 2006, 12:56:40 pm »

Hey,
first of all, this is a great component, and has helped me a lot!

I have made a simple form (BreedRegist) with a button "open map" (it opens ' kart.html' with open.window()),
where users can place a marker. When the users click add, the values should be stored in
the two hidden variables lng and lat in the BreedRegist-form.


But when I click "add" I get this error
Error: window.opener.document.BreedRegist has no properties

My form name is BreedRegist and the hidden-field names are lng and lat

Here is part of the code inside kart.html:
Code:
function add(longitude,latitude) {
  if (window.opener && !window.opener.closed){
    window.opener.document.BreedRegist.lng.value = longitude;
    window.opener.document.BreedRegist.lat.value = latitude;
  }
  window.close();
}

<input type="text" id="location_lat" style="width:10;" >
<input type="text" id="location_lng" style="width:10;" >
<span onclick="add(document.getElementById('location_lng'),document.getElementById('location_lat'));">add</span>

please help me Smiley
thx


* kart.jpg (47.42 KB, 475x439 - viewed 188 times.)
« Last Edit: September 13, 2006, 01:04:16 pm by allegrande » Logged
fvds
Administrator
Living Legend
*****
Offline Offline

Posts: 2322



WWW
« Reply #1 on: September 14, 2006, 12:37:00 am »

In order to address the form, don't use the form name. The form is named ff_form99 where 99 is the number you find in the column ScriptID in the Manage Forms screen. You can check this f.i by looking at your page's source.
Logged

Fred

Please read the forum rules first!
Please do not use PM for generic questions!
Visit me at OverTheWeb
Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by SMF © 2001-2006 Lewis Media
| Terms of Use | Privacy | Sitemap |