java script popup konfigurien

beige

Aktives Mitglied
Thread Starter
Dabei seit
11.06.2003
Beiträge
374
Reaktionspunkte
0
ich habe folgendes funktionierendes javascript:


ALLES FALSCH :rolleyes:
 
Zuletzt bearbeitet:
javascript

da muß ich mir wohl selbst antworten:

script war völlig falsch aber

function popup(site,w,h) {
x=screen.availWidth/1-w/1;
y=screen.availHeight/2-h/2;
var popupWindow=window.open('URL','','width='+w+',height='+h+',left='+x+',top='+y+',screenX='+x+',screenY='+y);
popupWindow.document.write(site);
}


und

<a href="javascript: popup('',breite,höhe)"

tut das was ich will - bis auf
da fehlt mir im popup noch eine statuszeile
jemand eine idee wo ich den status=true einfügen kann das es funktioniert ?
habe die meisten möglichkeiten schon durch ..

danke !
 
Hier ein Beispiel:

variablename = window.open(URL, 'thepop', 'width=400,height=300,top=200,left=200,directories=no,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,resizable=yes');

JavaScript popup window properties

Property Value Description
width number - Specifies the width of the window in pixels
height number - Specifies the height of the window in pixels
top number - Specifies the top location of the window in pixels
left number - Specifies the left location of the window in pixels
directories yes/no - Shows the standard browser directory buttons
location yes/no - Shows the Location entry field of the browser
menubar yes/no - Shows the menu at the top of the window
scrollbars yes/no - Shows the horizontal and vertical scrollbars
status yes/no - Shows the status bar at the bottom of the window
toolbar yes/no - Shows the standard browser toolbar
resizable yes/no - Controls the users ability to resize the window

Hoffe, das hilft

Mr. D
 
popup

ja heute ist ein guter morgen,

habe schon selbst mit experimentieren herausgefunden, das einige kommatas gefehlt haben um den status anzunehmem.

korrekter code jetzt:

function popup(site,w,h) {
x=screen.availWidth-w;
y=screen.availHeight/2-h/2;
var popupWindow=window.open('URL','','width='+w+',height='+h+',left='+x+',top='+y+',screenX='+x+',screenY='+y+',status=yes');
popupWindow.document.write(site);
}


danke !clap
 
Zurück
Oben Unten