Here’s a little test you can try, using the Protaculous Action to make
it easier. Draw an HTML box on your page, double-click inside it, and
add some links (and text) to it so you have a test-bed. Make note of
the name of the box, as reported in the Title field of the Inspector
while the box itself is selected (handles showing on the corners and
sides). I’m using testBox below as the name, but you should make sure
either to change the Title of your HTML box to testBox, or change the
code pasted below to match whatever name you want to use. Make sure
this is a layered box, also (the Layer checkbox will be ticked in the
Inspector).
Apply Protaculous to the page, choose prototype-packed from the
Library picker, and then click on the top Function Body button. Paste
in the following code:
$$('#testBox a').invoke(
'observe',
'mouseover',
function(evt){
window.open(this.href, 'test');
}
});
What this does is take all links (a tags) inside the testBox
container, and set them up to respond to a mouseover by opening a new
window containing the href (address) of that link.
This code is easy to maintain and extend, since it only has to occur
in one place to affect all links in the target element. If you wanted
to rig more elements on the same page, you could extend the “selector”
part of the function call using CSS notation:
$$('#foo a, #bar a, #baz a')...
Walter
On Apr 8, 2011, at 9:22 AM, Dirk H wrote:
Thanks Walter for reply. Suppose you`re right, but I really have to
try it. Any help?
Cheers
freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options
freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options