views:

53

answers:

1

Hello :)

I am looking for a way to make all visible objects in a webpage selectable by a visitor.

For example, I take google's homepage as source, my php script already gets the homepage, and stores everything in an array.

Now I want to show the google homepage with every object (span, div, body, td etc...) selectable. My visitor will select a few objects and then click submit (form post)

I do not know how to do this, even after searching dhtml and so ..

Thansk for your help

Mykeul

+1  A: 
  1. Parse the html page, if the actual element has an ID, just store, if not set an ID.
  2. When you have all ID-s set a border for each element
  3. Set an onClick, onMouseOver event handler
  4. Handle clicking
  5. Finally post the select element's id

Jquery would help you.

Milan
Hello,I worked on your proposal, JQuery helped me. I succeeded to set the border but I dont know how to:- highlight elements with CSS on mouseover. Is there a way to set a foreground color with 50% opacity for example ?- handle clickingDo you have some examples/howtos to help me ?Thanks,Mykeul
Mykeul