powered by simpleCommunicator - 2.0.61     © 2026 Programmizd 02
Целевая тема:
Создать новую тему:
Автор:
Закрыть
Цитировать
Форумы / HTML, JavaScript, VBScript, CSS [игнор отключен] [закрыт для гостей] / Печать iframe
3 сообщений из 3, страница 1 из 1
Печать iframe
    #35576301
Фотография rufatina
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
Собственно сабж . У меня есть страница в котором есть iframe.Хочу расспечатать тока то что внутри iframe В Mozilla Firefox все работает , а с IE берет и печатает всю страницу.

Вот код :

Код: plaintext
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <script type="text/javascript" language="JavaScript1.2" src="/Conf/Print.js"></script>
        <title>JSP Page</title>
    </head>
    <body>

   <iframe name="nese" src="jsph/Barcod.jsp"></iframe>
    <input type="button" value="Print BarCode" onclick="nese.print()"/> 
</body>
</html>
...
Рейтинг: 0 / 0
Печать iframe
    #35576363
Фотография Ex_Soft
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
тынць

_________________
"Helo, word!" - 17 errors 56 warnings
Posted via ActualForum NNTP Server 1.4
...
Рейтинг: 0 / 0
Печать iframe
    #35577336
Фотография rufatina
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
Решил проблему Вот решение Может кому то понадобится

Код: plaintext
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
28.
29.
30.
31.
32.
33.
34.
35.
36.
<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>

<%--
The taglib directive below imports the JSTL library. If you uncomment it,
you must also add the JSTL library to the project. The Add Library... action
on Libraries node in Projects view can be used to add the JSTL  1 . 1  library.
--%>
<%--
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> 
--%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
        <title>JSP Page</title>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

<script type="text/javascript">
function PrintIframe()
{
frames["nese"].focus();
frames["nese"].print();
}
</script>
        

   </head>
    <body>
    
   <iframe name="nese" src="jsph/Barcod.jsp"></iframe>
    <input type="button" value="Print BarCode" onclick="PrintIframe()"/> 
    </body>
</html>
Код: plaintext
1.
2.
3.
4.
5.
6.
7.
<script type="text/javascript">
function PrintIframe()
{
frames["nese"].focus();
frames["nese"].print();
}
</script>
Просто добавьте этот код Все гениальное просто
...
Рейтинг: 0 / 0
3 сообщений из 3, страница 1 из 1
Форумы / HTML, JavaScript, VBScript, CSS [игнор отключен] [закрыт для гостей] / Печать iframe
Найденые пользователи ...
Разблокировать пользователей ...
Читали форум (0):
Пользователи онлайн (0):
x
x
Закрыть


Просмотр
0 / 0
Close
Debug Console [Select Text]