P
pbd22
Hi.
I am having problems figuring out how to save data as it is being
dynamically updated inside a hidden input field. If more code is
needed please let me know (this is a repost - my post disappeared
after I posted a lot of code).
The function that updates the disabled input field, showPosition, is
called whenever a google maps marker gets moved and the coordinates
get written:
function showPosition(form, pos) {
var coords = document.getElementById('coords');
if (coords) coords.value = pos.toUrlValue();
}
What I want to do is save the point where the marker has been moved
(one marker per map for many maps) to an array.
In my file selector, I have the following loop which determines which
file has been selected and saves the marker position to its associated
array value.
var last_click;
for(i=2;i<=max_count.length;i++) {
if(i == active) {
video_location.onchange = function(){
arrLocation[last_click] = video_location.value;
}
last_click = i;
}
}
Of course, my problem is that the onchange event for the disabled
input field "video_location" will not fire. so, the last moved marker
position does not get saved.
I feel like it should be much easier, does anybody have suggestions/
alternate points of view on how to do this?
Thanks again.
I am having problems figuring out how to save data as it is being
dynamically updated inside a hidden input field. If more code is
needed please let me know (this is a repost - my post disappeared
after I posted a lot of code).
The function that updates the disabled input field, showPosition, is
called whenever a google maps marker gets moved and the coordinates
get written:
function showPosition(form, pos) {
var coords = document.getElementById('coords');
if (coords) coords.value = pos.toUrlValue();
}
What I want to do is save the point where the marker has been moved
(one marker per map for many maps) to an array.
In my file selector, I have the following loop which determines which
file has been selected and saves the marker position to its associated
array value.
var last_click;
for(i=2;i<=max_count.length;i++) {
if(i == active) {
video_location.onchange = function(){
arrLocation[last_click] = video_location.value;
}
last_click = i;
}
}
Of course, my problem is that the onchange event for the disabled
input field "video_location" will not fire. so, the last moved marker
position does not get saved.
I feel like it should be much easier, does anybody have suggestions/
alternate points of view on how to do this?
Thanks again.