Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
April 1, 2004, 12:47 am
rate this thread
shoot yourself in the head. it wont hurt as much, be much easier and the
end result will pretty much be the same.
standard compliant in the most non standards compliant browser?
server side would make very much more sense and be infinitely simpler.
1. ismap the image
2. click on image
3. coords of pixel sent to server side script
4. server side script does whatever you want it to.
5. leave an hour earlier and go to the pub
b r u c i e
Sup, brucie. :) Warms my heart to see you back.
It gets better. Consider, if you will, the logic of dictating the above
in the same breath as "Oh, and we'll be porting it to Solaris later, too."
In the hopes of convincing manglement that supporting things besides IE is
not only a good idea, but fairly easy (actually, in my experience easier,
but try convincing a Microsoft shop of that) too.
Got any scripting proposals that aren't ASP (because I'll have to port it
to Solaris later; see above) or C++ (which is, admittedly, what the rest
of the app is in)? I'm all ears, because I know the way I'm doing it is
dumb; it just seems the least dumb of a plethora of irritating options.
Some say the Wired doesn't have political borders like the real world,
but there are far too many nonsense-spouting anarchists or idiots who
think that pranks are a revolution.
the above was about it. once you ismap the image the coords of the pixel
are passed to the server. instead of passing the coords to a .map file
pass them to a script. get the script to do whatever it is you need
asp is the spawn of beelzebub
haven't touched c/c++ since the late '80s.
b r u c i e
x=event.x; y=event.y // that's an IE only reference
Season to taste.
Owen Jacobson wrote:
(that excludes a number of PDA and embedded browsers that don't make the
relative position of page element available, but, of those, the ones
that I could name don't support frames anyway so they are already out of
Any mouse event will provide an event object that holds numerous mouse
position values. The simples approach for cross-browser support is to
normalise those values into offsets into the HTML page (as opposed to
offsets over the image, screen offsets or client area offsets). Then
subtracting the offset of the image in the HTML document gives the
co-ordinates over the image, and then it is just a matter of writing the
values into the - value - properties of the form elements in the other
For reliability a server-side solution would be better, but optimum
server whenever it was capable of doing the job locally (though that
would need to be actively verified because the ability to execute a
client-side script does not imply that the browser will facilitate the
task it wants to undertake).