Need Suggestion

Results 1 to 2 of 2

Thread: Need Suggestion

  1. #1
    Join Date
    Dec 1969

    Default Need Suggestion

    Hi,<BR><BR>Here is what i got on my page, <BR>2 text boxes <BR>2 select boxes<BR>an image (this is where it might get tricky)<BR>(the text/select boxes have all a distinctive name)<BR><BR>here is what i want to do,<BR>when the user clicks on either a text box, or a select box i want a particular area of the Image to light up (imagine it as though it was an on mouse over event for a button)<BR><BR><BR>imagine you have a map the states<BR><BR>imagine now you have input boxes<BR>Alabama: &#060;text box&#062;<BR>Alaska: &#060;text box&#062;<BR>.<BR>.<BR>.<BR>Washington: &#060;text box&#062;<BR><BR>anyway, when you click into a text box, i want the image of USA to highlight that specific State, any suggestions?<BR><BR>any links that i might look at?<BR><BR>what will i need?<BR><BR><BR>Thanks

  2. #2
    Join Date
    Dec 1969

    Default Well, the hard part...

    ...will be getting the needed images for all 50 states!<BR><BR>You&#039;ll need one image that is a map of all the states and then 50 separate images (51 for Washington DC?) of each state.<BR><BR>You show the map of the USA. You *carefully* position the other 50 (51) images so that their states will line up *exactly* with the master USA map. But then you *hide* all those other maps.<BR><BR>When the appropriate anything-you-want is clicked on, you&#039;ll have to then un-hide the appropriate state map.<BR><BR>Presto.<BR><BR>The JS coding is dirt simple. Building those 51 or 52 maps is *NOT*.<BR><BR>Actually, the easiest way to do this would probably be to have 51 maps that start out *identical*. All 50 states. And then you use a graphics tool (e.g., Photoshop) to go in and change the images, one at a time, to highlight *one* state for each file.<BR><BR>Now you load all 51 files, each with an *entire* map of the US, into the browser. And you simply display/hide the right one as the user moves around.<BR><BR>Can you say SLOW? Yep. VERY slow.<BR><BR>Want an alternate suggestion???<BR><BR>Instead, just have a highlight circle or target (maybe even an animated GIF that sparkles?) and, as the state is clicked on, you mover that (ONE!) circle/target on top of the given state (do it by the X/Y position over the map) and highlight it that way, instead.<BR><BR>The third alternative is to only load the map of the USA and then, when the user clicks on a state, only *THEN* do you load the map for that particular state. Rather than pre-loading all 51 maps.<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts