View Full Version : minimize کردن صفحه
roya2002_80
سه شنبه 01 شهریور 1390, 18:47 عصر
سلام
من یک کدی نوشتم که وسط کارش نیاز هست صفحه دیگری باز بشه ،اما نیاز نیست که کاربر ببینه ، می خوام این صفحه بصورت minimize باز بشه ، و در آخر هم که بسته می شه ، (یا اینکه وقتی صفحه جدید باز می شود ، پنجره فعال نباشه ، تا کاربر نبینه )
آیا کسی کد minimize کردن صفحه را داره ؟
HamidTatalo
جمعه 04 شهریور 1390, 10:41 صبح
دوست من جاوا اسکریپت بخاطر امنیت بیشتر کاربران واسه اینکه ما کدای مخرب واسشون ایجاد نکنیم محدودیت هایی داره که یکیش به پنجره جدید باز کردن هستش.
تا اینجا کا من میدونم ما فقط میتونیم اندازه پنجره رو هنگام ایجاد کردن اون تغییر بدیم و نمیتونیم پنجره رو مخفی کنیم .
این کدش هست که شاید بدردت بخوره
window.onload = function() {
if (document.body.scrollHeight) {
var winWidth = document.body.scrollWidth;
var winHeight = document.body.scrollHeight;
} else if (document.documentElement.scrollHeight) {
var winHeight = document.documentElement.scrollHeight;
var winWidth = document.documentElement.scrollWidth;
} else {
var winHeight = document.documentElement.offsetHeight;
var winWidth = document.documentElement.offsetWidth;
}
window.resizeTo(winWidth, winHeight);
}
object68
دوشنبه 07 شهریور 1390, 17:30 عصر
سلام. یه دستوری هست که باهاش می تونین یه پنجره جدید باز کنین. window.open یه سری ورودی هایی هم داره. فکر کنم توش حالت minimize هم باشه. یه سرچ کوچیک تو google بزنین در مورد دستور window.open حتما چیزایی پیدا می کنین ...
farcry
یک شنبه 13 شهریور 1390, 00:41 صبح
این صفحه رو به htm تبدیل کن. کل دستورات و ویژگی های window.open رو نوشته.
<BODY>
<H1 class=style2>open Method (window) </H1>
<EM>oNewWindow </EM>= <EM>window</EM><STRONG>.open(
</STRONG><STRONG>[ </STRONG><EM>sURL
</EM><STRONG>] </STRONG><STRONG>[
</STRONG><STRONG>, </STRONG><EM>sName
</EM><STRONG>] </STRONG><STRONG>[
</STRONG><STRONG>, </STRONG><EM>sFeatures
</EM><STRONG>] </STRONG><STRONG>[
</STRONG><STRONG>, </STRONG><EM>bReplace
</EM><STRONG>] </STRONG><STRONG>)
</STRONG>
<BR><BR>
<TABLE border=1>
<TBODY>
<TR>
<TD><EM>sURL </EM></TD>
<TD>Optional. <STRONG>String </STRONG> that specifies
the URL of the
document to display. If no URL is specified, a new window with
<STRONG>about:blank </STRONG>is displayed. </TD></TR>
<TR>
<TD><EM>sName </EM></TD>
<TD>Optional. <STRONG>String </STRONG> that specifies
the name of the
window. This name is used as the value for the TARGET attribute
on a form
or an a element.
<TABLE>
<TBODY>
<TR>
<TD>_blank </TD>
<TD>The <EM>sURL </EM>is loaded into a new, unnamed
window. </TD></TR>
<TR>
<TD>_media </TD>
<TD>The <EM>sURL </EM>is loaded into the HTML content
area of the
Media Bar. Available in Internet Explorer 6 or later. </TD></TR>
<TR>
<TD>_parent </TD>
<TD>The <EM>sURL </EM>is loaded into the current frame's
parent. If
the frame has no parent, this value acts as the value _self .
</TD></TR>
<TR>
<TD>_search </TD>
<TD>Available in Internet Explorer 5 and later. The <EM>sURL
</EM>is
opened in the browser's search pane. </TD></TR>
<TR>
<TD>_self </TD>
<TD>The current document is replaced with the specified
<EM>sURL
</EM>. </TD></TR>
<TR>
<TD>_top </TD>
<TD><EM>sURL </EM>replaces any framesets that may be
loaded. If
there are no framesets defined, this value acts as the value
_self .
</TD></TR></TBODY></TABLE></TD></TR>
<TR>
<TD><EM>sFeatures </EM></TD>
<TD>Optional. This <STRONG>String </STRONG>parameter is a
list of items
separated by commas. Each item consists of an option and a
value,
separated by an equals sign (for example, "fullscreen=yes,
toolbar=yes").
The following features are supported.
<TABLE>
<TBODY>
<TR>
<TD>channelmode = { yes | no | 1 | 0 } </TD>
<TD>Specifies whether to display the window in theater mode
and show
the channel band. The default is <STRONG>no </STRONG>.
</TD></TR>
<TR>
<TD>directories = { yes | no | 1 | 0 } </TD>
<TD>Specifies whether to add directory buttons. The default is
<STRONG>yes </STRONG>. </TD></TR>
<TR>
<TD>fullscreen = { yes | no | 1 | 0 } </TD>
<TD>Specifies whether to display the browser in full-screen
mode.
The default is <STRONG>no </STRONG>. Use full-screen
mode carefully.
Because this mode hides the browser's title bar and menus,
you
should always provide a button or other visual clue to help the
user
close the window. <STRONG>ALT+F4 </STRONG>closes the
new window. A
window in full-screen mode must also be in theater mode
(channelmode). </TD></TR>
<TR>
<TD>height = number </TD>
<TD>Specifies the height of the window, in pixels. The minimum
value
is 100 . </TD></TR>
<TR>
<TD>left = number </TD>
<TD>Specifies the left position, in pixels. This value is relative
to the upper-left corner of the screen. The value must be
greater
than or equal to 0. </TD></TR>
<TR>
<TD>location = { yes | no | 1 | 0 } </TD>
<TD>Specifies whether to display the input field for entering
URLs
directly into the browser. The default is <STRONG>yes
</STRONG>.
</TD></TR>
<TR>
<TD>menubar = { yes | no | 1 | 0 } </TD>
<TD>Specifies whether to display the menu bar. The default is
<STRONG>yes </STRONG>. </TD></TR>
<TR>
<TD>resizable = { yes | no | 1 | 0 } </TD>
<TD>Specifies whether to display resize handles at the corners
of
the window. The default is <STRONG>yes </STRONG>.
</TD></TR>
<TR>
<TD>scrollbars = { yes | no | 1 | 0 } </TD>
<TD>Specifies whether to display horizontal and vertical scroll
bars. The default is <STRONG>yes </STRONG>. </TD></TR>
<TR>
<TD>status = { yes | no | 1 | 0 } </TD>
<TD>Specifies whether to add a status bar at the bottom of the
window. The default is <STRONG>yes </STRONG>.
</TD></TR>
<TR>
<TD>titlebar = { yes | no | 1 | 0 } </TD>
<TD>Specifies whether to display a title bar for the window. This
parameter is ignored unless the calling application is an HTML
Application or a trusted dialog box. The default is
<STRONG>yes
</STRONG>. </TD></TR>
<TR>
<TD>toolbar = { yes | no | 1 | 0 } </TD>
<TD>Specifies whether to display the browser toolbar, making
buttons
such as <STRONG>Back </STRONG>, <STRONG>Forward
</STRONG>, and
<STRONG>Stop </STRONG>available. The default is
<STRONG>yes
</STRONG>. </TD></TR>
<TR>
<TD>top = number </TD>
<TD>Specifies the top position, in pixels. This value is relative to
the upper-left corner of the screen. The value must be greater
than
or equal to 0. </TD></TR>
<TR>
<TD>width = number </TD>
<TD>Sets the width of the window, in pixels. The minimum value
is
100 . </TD></TR></TBODY></TABLE></TD></TR>
<TR>
<TD><EM>bReplace </EM></TD>
<TD>Optional. When the <EM>sURL </EM>is loaded into the same
window, this
<STRONG>Boolean </STRONG>parameter specifies whether the
<EM>sURL
</EM>creates a new entry or replaces the current entry in the
window's
history list.
<TABLE>
<TBODY>
<TR>
<TD>true </TD>
<TD><EM>sURL </EM>replaces the current document in the
history list
</TD></TR>
<TR>
<TD>false </TD>
<TD><EM>sURL </EM>creates a new entry in the history list.
</TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE>
</BODY></HTML>
برای امنیت کاربرها تغییراتی در firefox انجام شده که مخصوصا ورژن 5و6 به بعد خیلی سرسخت و محکم اند.
مثلا اینو امتحان کنید با IE با فایر فاکس من که 6 جواب نمیده
<SCRIPT LANGUAGE="JScript">
function foo()
{open ('adres ro bezarid',"_self");} </SCRIPT>
<BODY onload="foo();">
</BODY>
اگه اسکریپ زیر تو مرورگر کاربر که فرضا فایر فاکس هستش اجرا بشه.... اونوقت میدونید یعنی چی....!
نه دیگه..... اینقدرها هم که پخمه نیستند....
<script language="javascript" type="text/javascript">
window.open("about:config","_self")
</script>
mahan19
دوشنبه 14 شهریور 1390, 18:28 عصر
به نظر من كدي براي مينيمايز وجود نداره...
vBulletin® v4.2.5, Copyright ©2000-1403, Jelsoft Enterprises Ltd.