Posts: 256
Location: Auckland, New Zealand
|
I think the way surjit wrote what he requires without php is the clue, then again maybe I'm just too fond of cryptic riddles.
I think he's actually looking at doing this with javascript and inserting the target="_blank" using the id menu1.
That would make sense if he is, so really it's a JS question, but to help him out add this to your body tag.
Code:
<body onload="javascript:getElementById('menu1').setAttribute('target', '_blank');">
Now the problem with this code however is that the document may not be ready, which means menu1 may not exist when trying to find the id menu1 and causes the script to be an error.
Usually I use javascript libraries like jquery - http://www.jquery.com/ instead of reinventing the wheel, that handle the document status and allows you to apply the code when needed, also has a lot of other nifty features you may be interested in, especially easier ways of adding attributes to required elements.
Hope this helps you, if not, hope it helps someone else!
Cheers,
MC
__________________
#------------------------------ signature---------------------------------------------------------------------------------#
Quote:
|
I am well recognised for what I don't do than what I do. Chores are just one of those things.
|
|