![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Ciao a tutti ho la seguente stringa in una pagina html. Code:
|
|
Quelle due date le ho dentro delle text che si trovano dentro un form xxx. |
|
href=javascript:window.location.href='?act=saveFil eExcelClosed&SEARCH_DAL=' + document.nomeform.nometext.value + '&SEARCH_AL=' + document.nomeform.nometext2.value; |
#3
| |||
| |||
|
|
Il Thu, 03 Jan 2008 17:02:36 +0100, titty ha scritto: Ciao a tutti ho la seguente stringa in una pagina html. Code:
.... href="#" onclick="window.location.href='.....';return false" Quelle due date le ho dentro delle text che si trovano dentro un form xxx. ma in che senso? href=javascript:window.location.href='?act=saveFil eExcelClosed&SEARCH_DAL=' + document.nomeform.nometext.value + '&SEARCH_AL=' + document.nomeform.nometext2.value; onclick="window.location.href='?.....'+document.no meform.nometext.value+' .... '; se hai ancora problemi posta l'errore fornito dalla console javascript di firefox. |
<A target="_blank" href="#" onclick=javascript:window.location.href="?act=saveFileExcelClosed&SEARCH_DAL=" + document.xxx.SEARCH_DAL.value + "&SEARCH_AL=" + document.xxx.SEARCH_DAL.value +";return false"> <img alt="ESPORTA" src="{{$IMG_DIR}}icona_exel.jpg" width="25" border="0" hspace="2" /> </a>
#4
| |||
| |||
|
#5
| |||
| |||
|
|
A target="_blank" href="#" onclick=javascript:window.location.href="?act=save FileExcelClosed&SEARCH_DAL=" + document.xxx.SEARCH_DAL.value + "&SEARCH_AL=" + document.xxx.SEARCH_DAL.value +";return false" |
#6
| |||
| |||
|
|
Il Thu, 03 Jan 2008 17:18:30 +0100, titty ha scritto: A target="_blank" href="#" onclick=javascript:window.location.href="?act=save FileExcelClosed&SEARCH_DAL=" + document.xxx.SEARCH_DAL.value + "&SEARCH_AL=" + document.xxx.SEARCH_DAL.value +";return false" non è quello che ti ho scritto io: mancano virgolette a onclick (e così si interrompe al primo spazio), c'è un javascript: di troppo. |
#7
| |||
| |||
|
|
ok funziona, ma per linkarlo a una pagina nuova???? |
#8
| |||
| |||
|
|
Il Thu, 03 Jan 2008 17:47:49 +0100, titty ha scritto: ok funziona, ma per linkarlo a una pagina nuova???? Stai usando href, che apre nella stessa pagina (e togli il target che è inutile e deprecato): http://developer.mozilla.org/en/docs...ion#Properties Vedi documentazione su open: http://developer.mozilla.org/en/docs/DOM:window.open |
#9
| |||
| |||
|
|
window.open non lo posso usare..... quindi se _blank è deprecato non c'è altra soluzione??? |
#10
| |||
| |||
|
|
Il Thu, 03 Jan 2008 18:01:11 +0100, titty ha scritto: window.open non lo posso usare..... quindi se _blank è deprecato non c'è altra soluzione??? e perché mai non puoi usarlo??? Puoi usare window.location.href ma non open? per target: target serve per href, non per le funzioni javascript ... |
<A href="#" onclick="window.open('?act=saveFileExcelClosed&SEARCH_DAL=' + document.xxx.SEARCH_DAL.value + '&SEARCH_AL=' + document.xxx.SEARCH_AL.value);"> <img alt="ESPORTA" src="{{$IMG_DIR}}icona_exel.jpg" width="25" border="0" hspace="2" /> </a>
![]() |
| Thread Tools | |
| Display Modes | |
| |