HighDots Forums  

Popup centrata

Javascript (Italian) Il linguaggio JavaScript (it.comp.lang.javascript)


Discuss Popup centrata in the Javascript (Italian) forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
maury54
 
Posts: n/a

Default Popup centrata - 05-29-2008 , 01:28 AM






M sapete dire perchè questo codice non mi centra la popup che fa
aprirema la mette nell'angolo superiore sinistro dllo schermo come se
top e left valessero 0?

<a href="javascript:void(0)"
onclick="javascript:window.open('cliente.php?
id_utente=4','','width=400,height=400,top=Math.flo or((screen.height-400)/
2),left=Math.floor((screen.width-400)/2)')">Nome utente</a>

Grazie

Reply With Quote
  #2  
Old   
Cristiano Larghi
 
Posts: n/a

Default Re: Popup centrata - 05-29-2008 , 01:58 AM






Il Wed, 28 May 2008 23:28:46 -0700 (PDT), maury54 ha scritto:

Quote:
M sapete dire perchè questo codice non mi centra la popup che fa
aprirema la mette nell'angolo superiore sinistro dllo schermo come se
top e left valessero 0?
perché open legge nel terzo parametro, testualmente, "top=Math.floor etc
etc", e che ne sa cosa vuol dire? Deve essere javascript ad assegnare i
valori corretti

Quote:
a href="javascript:void(0)"
onclick="javascript:window.open('cliente.php?
id_utente=4','','width=400,height=400,top=Math.flo or((screen.height-400)/
2),left=Math.floor((screen.width-400)/2)')">Nome utente</a
onclick="window.open('..','','....top='+Math.floor ......+',left='+ ...

--
"Emancipate yourselves from mental slavery;
None but ourselves can free our minds"
B.M.


Reply With Quote
  #3  
Old   
maury54
 
Posts: n/a

Default Re: Popup centrata - 05-29-2008 , 02:24 AM



On 29 Mag, 08:58, Cristiano Larghi <c.larghi_NOS... (AT) editaliasrl (DOT) it>
wrote:
Quote:
Il Wed, 28 May 2008 23:28:46 -0700 (PDT), maury54 ha scritto:

M sapete dire perchè questo codice non mi centra la popup che fa
aprirema la mette nell'angolo superiore sinistro dllo schermo come se
top e left valessero 0?

perché open legge nel terzo parametro, testualmente, "top=Math.floor etc
etc", e che ne sa cosa vuol dire? Deve essere javascript ad assegnare i
valori corretti

a href="javascript:void(0)"
onclick="javascript:window.open('cliente.php?
id_utente=4','','width=400,height=400,top=Math.flo or((screen.height-400)/
2),left=Math.floor((screen.width-400)/2)')">Nome utente</a

onclick="window.open('..','','....top='+Math.floor ......+',left='+ ....

--
"Emancipate yourselves from mental slavery;
None but ourselves can free our minds"
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * B.M.
Grazie mille


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.