jBox cursor style persistance

Richard Greenwood richard.greenwood at GMAIL.COM
Thu Dec 9 14:52:08 PST 2004


On Thu, 9 Dec 2004 15:39:35 -0500, Andhare, Manjiri
<mandhare at state.pa.us> wrote:
>
>
>
> On Thu, 9 Dec 2004 13:57:58 -0600, Manjiri Andhare <mandhare at state.pa.us>
> wrote:
>
> > Hello!!
>
> > I'm in the process to include the jBox into my application. According
>
> > to the documents, if i call the setcursor(string) method of jBox, the
>
> > cursor style changes. But it changes only for the first click/first
>
> > zoom rectangle drawing. After that the cursor style changes back to the
> default.
>
> > I was trying to find more information about how to persist the mouse
>
> > style in jBox.
>
> > I even tryed to write a java script funciton to set the cursor style
>
> > and to call onclick event of the radio button(radio button for pan,
>
> > zoom-in,zoom- out.
>
> > Any suggestions?
>
> > Thank you,
>
> > Manjiri Andhare
>
> >
>
>
>
> Are you reloading the entire page each time, or are you using image
> swapping? If you are reloading the whole page, then obviously you need to
> reinitialize the cursor each page load. If you are using image swapping then
> it sounds like a bug.
>
>
>
> Thank you Rich!!
>
> I'm not using image swapping. Do I need to write some java script code to
> initialize the cursor and call that function on form submit?

Each time you load a new page, you are also loading a new copy of jBox
which has to be initialized each time. (Hopefully the browser is
caching jBox so that it does not have to fetch a copy each time, but
that's not relevant here)

jBox has not persistence beyond the scope of the current page. So you
need a javascript function to set the cursor image when jBox
initializes, which is to say, each time you load a new page.

Rich



More information about the MapServer-users mailing list