[thelist] possible jscript/php/frames question!!

bruce bedouglas at earthlink.net
Sat Jun 18 15:44:45 CDT 2005


you want details.. i got details!!

basiclly, i'm trying to create a simple app to allow users to select various
'shapes/items' within a given matrix/imagemap. i want to allow the user to
use the mouse key to select the various shapes, via pointing at the
'shape/item within the imagemap.

i also want the user to be able to select multiple points, that the app
should encrypt as a group, and then send back to the server... the
encryption part isn't really needed, but i'm curious to see how it can be
accomplished, if at all...

the basic process:
 -app creates the sample/test image from randomly selecting/placing
different shapes within the image map.
 -user is presented with the test imagemap
 -user selects various points/locations within the map, using the mouse
 -the group of (x,y) coordinates is added to an array
 -the user selects 'submit'
 -the client app encrypts the arry information
 -the client app sends the information back to the server...
 -the server then determines which items/shapes where selected by the user
 -the server then sends this information back to the user's browser

so it's pretty basic/simple in theory...

bedouglas at earthlink.net

-----Original Message-----
From: Maximillian Schwanekamp [mailto:lists at neptunewebworks.com]
Sent: Saturday, June 18, 2005 12:50 PM
To: bedouglas at earthlink.net
Cc: thelist at lists.evolt.org
Subject: Re: [thelist] possible jscript/php/frames question!!

bruce wrote:
> i checked out your sample app... it might work...
> i could create a separate/2nd page and do the post to that page, and store
> the x/y coordinates in a session array... on the 2nd page, i could also
> encrypt the information before i store it, i could then display the array
> the 1st page, much like what you do....
> questions:
>  -could i access the POST information as $submit_x/$submit_y, and why?
> in PHP gives me these variables? you do an extract. is that a PHP
> or one of your own creation?

PHP function. Mainly useful when you're putting array values into a string.

> -does this test app give different results if the user is scrolling? does
> the test work on all browsers? a quick test seems to indicate that
> doesn't affect the results, and a test on IE/Firefox seems to give similar
> results...

No. This is pretty basic HTML stuff.  The x/y bit is in the spec.  See
"image" type at:

> so, if the questions/issues i raised are positive, then my next issue is
> determine how to go about creating a process to build image maps(images)
> comprised of the random shapes that i initially discussed....

Random shapes?  I don't recall you mentioning that earlier in the
thread.  If you need to generate shapes on the fly, you'll need image
generation, which is usually non-trivial.

You might check out one of the image classes at phpclasses.org.  I
believe there are a few classes to make generating shapes a simple
matter.  You could then send an image map to match the points you used
to create the shape.

> if this is reasonably doable, this should give me the ability to create an
> image comprised of random shapes... have the user select the items in the
> image, with me storing the (x.y) coordinate locations, being able to
> them, and then sending the information/array back to the server...

If you're creating random images on the fly, and need the user to be
able to click multiple points, and then take all that info and post it
somewhere, you should probably go to Flash instead.  What you're
decribing sounds a lot like a real basic Flash game (something like
"shoot the woozle").  You could still collect the info and send it to a
php script for processing.

It would help to have some idea of what you're trying to accomplish.
Can you give us some more info?

Maximillian Von Schwanekamp

More information about the thelist mailing list