style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
"swati" <I
href="mailto:swatip@stanford.edu">swatip@stanford.edu> wrote in message
href="news:f1140c9.-1@WebX.maYIadrTaRb">news:f1140c9.-1@WebX.maYIadrTaRb...
seem to have coded myself into a silly situation. I have a function in
javascript working exactly as I want, but for a unneeded alert box!
I
added a message box for troubleshooting and now have the function working the
way I want it to.
BUt now, if I remove the message box, the function does
not seem to work.It seems like th user input of OK on the message box triggers
the function to continue.( would that be possible?)
How do I get out of
this? Please help.
function zoomFeature( ){
var map = getMap();
map.setAutoRefresh(false);
numRows = GetName.getRowCount();
for
(i=0;i<numRows;i++){
var templat = GetName.getField(i,"lat");
var
templon = GetName.getField(i,"lon");
var tempfacil =
GetName.getField(i,"faciid");
}
//alert(" done setting variables"); //I WANT TO REMOVE THIS MESSAGE BOX
if (tempfacil == "campus") {
map.zoomScale(templat,templon,10000);
}
else {
map.zoomScale(templat,templon,800);
}
self.focus();
map.setAutoRefresh(true);
map.refresh();
//alert("done");
}
Thanks a lot
swati
Snapple wrote:
Hi Swati Please
check the ismapbusy section to solve your problem.Your
alert message indirectly "solved" the ismapbusy problem that is why it
is work when your alert box is there. Take
alook at API help under section mapbusy. It explain and give some
example on how to do it Hopefully
it worksRegardssnapple
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">"swati"
<swatip@stanford.edu> wrote
in message news:f1140c9.-1@WebX.maYIadrTaRb...I
seem to have coded myself into a silly situation. I have a function in
javascript working exactly as I want, but for a unneeded alert box!
I added a message box for troubleshooting and now have the function
working the way I want it to.
BUt now, if I remove the message box, the function does not seem to
work.It seems like th user input of OK on the message box triggers the
function to continue.( would that be possible?)
How do I get out of this? Please help.
function zoomFeature( ){
var map = getMap();
map.setAutoRefresh(false);
numRows = GetName.getRowCount();
for (i=0;i<numRows;i++){
var templat = GetName.getField(i,"lat");
var templon = GetName.getField(i,"lon");
var tempfacil = GetName.getField(i,"faciid");
}
//alert(" done setting variables"); //I WANT TO REMOVE THIS MESSAGE
BOX
if (tempfacil == "campus") {
map.zoomScale(templat,templon,10000);
}
else {
map.zoomScale(templat,templon,800);
}
self.focus();
map.setAutoRefresh(true);
map.refresh();
//alert("done");
}
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
"swati" <thanks
href="mailto:swatip@stanford.edu">swatip@stanford.edu> wrote in message
href="news:f1140c9.2@WebX.maYIadrTaRb">news:f1140c9.2@WebX.maYIadrTaRb...
for your message.I tried what you said and I do agree the map is busy when I
try to run the funcion. Now how do I wait for it to get out of that state
and try again?
is'nt my setautorefresh to false taking care of it?
Thanks a lot
swati