soonic wrote:
> I have simple code to ilustrate my problem.
>
> <a href="pic.jpg" target="image" >test</a>
It doesn't really illustrate much; a URL tells more than a thousand words.
> <div>
> <img src="" name="image" width="50px">
>
> </div>
That's invalid markup, and otherwise incorrect too.
> How to open an image in a div block? When I want use it as it is it
> opens a new tab. (I don't want to use iframe)
If you don't want to use iframe, you have painted yourself in a JavaScript
corner. Scripting would be the only way, and it would naturally fail when
client-side scripting is disabled in the browser. You could use
<a href="pic.jpg" target="image" onclick="return show(this)">test</a>
with
<div id="show"></div>
and, assuming for definiteness that images are 50 by 50 pixels, with
<style>
#show { width: 50px; height: 50px; }
</style>
<script>
function show(link) {
document.getElementById("show").innerHTML =
'<img src=' + link.href + ' alt="">';
return false; }
</script>
--
Yucca,
http://www.cs.tut.fi/~jkorpela/