Jon Berg wrote:
> I want to be able to create a square above the web page content.
You can put a transparent fixed-position object using CSS. I suppose you
meant 'over' and not 'above'
> I want to be able to resize this square on the fly, not by reloading the
That's where you get a bit greedy. You'll probably need to involve some
programming to do this.
> It would be cool to be able to drag it by the mouse pointer,
> but I guess as a second best way buttons could be pressed to move and
> resize the square.
For all these key and mouse events you'll need callbacks. There are some
> I also want to be able to extract the coordinates of this square.
> This is going to be used to select a section of a web page. Sort of the
> same way you can select icons on the windows desktop.
I don't think you will be able to do this. You over-estimate the
functionality of browsers. If you managed to do it, it probably would not
be valid and only work in one particular browser.
> Does anybody have any ideas or know of a way to this?
> Is it possible to use a layer?
> Do anybody know of some page where something like this is done?
Go and see WYSIWYG Pro (http://www.wysiwygpro.com/demos/demo1.php) which
does some of the things you are after. It's pure JS, IIRC. Not free