05. marts 2005 - 20:47Der er
12 kommentarer og 1 løsning
Popup uden noget
Hej :-)
Jeg har dette javascript der åbner et nyt vindue ved klik på et link:
<script type="text/javascript"> // Åben nyt vindue function WinOpen(url,name,win_height,win_width) { pos_horizon = ((screen.width/2)-(win_width/2)); pos_vertical = ((screen.height/2)-(win_height/2)); window.open(url,name,"width="+win_width+",height="+win_height+",top="+pos_vertical+",left="+pos_horizon); } </script>
Spørgsmål: Hvordan får ovenstående script til kun at vise indholdet af vinduet, uden at titelbar og statusbar o.a. er synlige (dvs. således at det eneste der reelt er synligt er kanterne/rammen på vinduet)?
I lang tid har samarbejdsbranchen fokuseret på at forbedre enhedsfunktioner – bedre kameraer, klarere lyd og smartere software. Men den virkelige forvandling handler ikke om funktioner.
blackscorpion > Jeg takker for forslagene, men ingen af dem virker hos mig (XP og SP2) - Uanset hvad jeg prøver, er titlebar og statusbar hele tiden synlige :-/
Jeg gætter på at det er Bill G og hans indianere der har besluttet sig for, at ødelægge muligheden for at lave popup-vinduer med et pænt design, så jeg vælger derfor at lukke spørgsmålet helt :-(
Browser Window Restrictions Does your Web site position windows so that the title bar or address bar is above the visible top of the display, or the status bar is below the visible bottom of the display? Review your code to ensure you understand the restrictions now in place for script-initiated windows using the window.open() or window.createPopup() methods. The script can call the same methods for the creation of an Internet Explorer window with chrome (using the window.open() method) or an Internet Explorer chromeless pop-up window (using the window.createPopup() method). However, the design might need to be reviewed to ensure that pop-up windows are appropriately visible to the user and that the status bar contains accurate information.
The following are guidelines for working with script-initiated window calls in a process running the Windows Restrictions Security feature.
For windows opened using window.open():
Expect the status bar to be present, and code for it. The status bar will be on by default and is 20-25 pixels in height. Adjust your window's size and content so that it will fit well visually with the window's overall size. The window will not cover the taskbar, so it might lose 40 pixels if the status bar is on and the taskbar is not accounted for. Vertically size the window no more than 30 pixels outside the taskbar. Do not open windows off-screen—they will be moved by the smallest offset of X and Y coordinates that allows the window to fully display on-screen. As before, the display of the window will be affected by the display theme, font size, and resolution, so you might also need to account for these UI influences when you are designing your windows. Note: window.open() with fullscreen=yes will now result in a maximized window, not a kiosk mode window. For windows opened using window.createPopup():
Adjust the window's size and content so it will fit well visually with the window's overall size. With this new feature, the window will not cover its parent window's title bar or status bar, so it might lose 40 pixels if the title and status bars are not accounted for. Vertically size the window no larger than the currently visible area of the page. Do not open chromeless windows outside the HTML rendering surface of Internet Explorer—they will be moved by the smallest offset of X and Y coordinates that allows the window to be fully displayed inside the client area. There is one exception: up to half of the window can exist outside the left or right edge of the Internet Explorer client area. As before, the display of the window will be affected by the display theme, font size, and resolution, so you might also need to account for these UI influences when you are designing your windows. General Tips Detecting Internet Explorer in SP2 You can use window.navigator.userAgent to detect if the browser connecting to your site is Internet Explorer in SP2.
var g_fIsSP2 = false; function browserVersion() { g_fIsSP2 = (window.navigator.userAgent.indexOf("SV1") != -1); if (g_fIsSP2) { //This browser is Internet Explorer in SP2. } else { //This browser is not Internet Explorer in SP2. } } If the user agent string contains "SV1", the browser connecting to your site is Internet Explorer in SP2.
Der er en hel del mere at læse om, bla. downloads osv. :D
Synes godt om
Ny brugerNybegynder
Din løsning...
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.