Jump to content
  • 0

Изображение в новом окне


Guest Гость
 Share

Question

Guest Гость

Есть код:

<a style="border:0; cursor:pointer;" onclick="win_sample = window.open('%src%','sample','width=%width%,height=%height%,scrollbars=no,resizable=yes');win_sample.focus();">%system makeThumbnail(%filepath%, 120, 'auto', 'view')%</a>

Подскажите плиз, как ещё здесь сделать, тобы когда изображение откроется в новом окне при клике по этой ссылке, то у окна Было название, тобишь title ???

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

Можешь попробовать так.

Это в head:

function win1() {
msg=window.open("","msg","height=360,width=510,left=200,top=200");
msg.document.write("<html><title>Название страницы</title>");
msg.document.write("<body bgcolor='white' onblur=window.close()>");
msg.document.write("<center><img src='image.png'></center>");
msg.document.write("</body></html>");
}

А это в body

<a href="java script:win1()">Увеличить</a>

Работает кроссбраузерно.

Странно, не могу убрать пробел между java и script через редактирование сообщения.

Edited by Антонов
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. See more about our Guidelines and Privacy Policy