HighDots Forums  

finestre pop up

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


Discuss finestre pop up in the Javascript (Italian) forum.



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

Default finestre pop up - 12-10-2004 , 09:35 PM






ciao

ho finalmente imparato ad ottenere le finestrelle
pop up...

però sucede questo:

ho un documento con un elenco abbastanza lungo
diciamo 100 righe (è un esempio)
alla riga 70, imposto un lin con finestra pop up
con questo codice

<a href="#"
onClick="window.open ('pagina.html','newWin',
'scrollbars=no,status=no,resizable=no,top=100,left =150,width=300,height=500');">
clicca qui </a>

in maniera che mi si apra la pagina html, etc
ok

il fatto strano è che ogni qualche volta clicco per ottenere
la finestra pop up (cioè la pagina.html) il documento
originale (quello dell'elenco) ritorna in cima alla prima
riga e non resta all'altezza della 70ma riga, dov'ero
poco prima di cliccare per vedere il collegamento

c'è qualcosa che devo cambare nel codice sopra?
deve fare così?

grazie della vostra attenzione
ciao
Gianni



Reply With Quote
  #2  
Old   
ZER0
 
Posts: n/a

Default Re: finestre pop up - 12-10-2004 , 10:06 PM






On Sat, 11 Dec 2004 02:35:32 GMT, Gianni wrote:

Quote:
a href="#"
onClick="window.open ('pagina.html','newWin',
'scrollbars=no,status=no,resizable=no,top=100,left =150,width=300,height=500');"
clicca qui </a
Devi aggiungere "return false" al termine dell'onclick. Per intenderci:

<a href="#" onclick="window.open(..il tuo codice..);return false">click
here</a>

Come detto piu' volte, sarebbe opportuno impostare i link in modo
differente, cosi' che anche chi non ha js abilitato riesca cmq a navigare
il tuo sito. Ad esempio:

<a href="pagina.html" target="newWin"
onclick="window.open(this.href,this.target,'scroll bars=no,status=no,resizable=no,top=100,left=150,wi dth=300,height=500');return
false">click here</a>

--
C'ya,
ZER0 :: coder.gfxer.webDesigner();

"When you have eliminated the impossible, whatever remains,
however improbable, must be the truth." (S.H.)

on air ~ "donny darko - Mad World (full version)"


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

Default Re: finestre pop up - 12-12-2004 , 01:33 PM



grazie ! ; )


"ZER0" <zer0.shock (AT) libero (DOT) it> ha scritto nel messaggio
news:1c705ie70mafv$.dlg (AT) ID-171124 (DOT) news.individual.net...
Quote:
On Sat, 11 Dec 2004 02:35:32 GMT, Gianni wrote:

a href="#"
onClick="window.open ('pagina.html','newWin',
'scrollbars=no,status=no,resizable=no,top=100,left =150,width=300,height=500');"
clicca qui </a

Devi aggiungere "return false" al termine dell'onclick. Per intenderci:

a href="#" onclick="window.open(..il tuo codice..);return false">click
here</a

Come detto piu' volte, sarebbe opportuno impostare i link in modo
differente, cosi' che anche chi non ha js abilitato riesca cmq a navigare
il tuo sito. Ad esempio:

a href="pagina.html" target="newWin"
onclick="window.open(this.href,this.target,'scroll bars=no,status=no,resizable=no,top=100,left=150,wi dth=300,height=500');return
false">click here</a

--
C'ya,
ZER0 :: coder.gfxer.webDesigner();

"When you have eliminated the impossible, whatever remains,
however improbable, must be the truth." (S.H.)

on air ~ "donny darko - Mad World (full version)"



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.