HighDots Forums  

Aiuto su querystring con valori javascript

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


Discuss Aiuto su querystring con valori javascript in the Javascript (Italian) forum.



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

Default Aiuto su querystring con valori javascript - 01-03-2008 , 10:02 AM






Ciao a tutti
ho la seguente stringa in una pagina html.

Code:
href=javascript:window.location.href='?act=saveFileExcelClosed&SEARCH_DAL=01/11/2007&SEARCH_AL=15/11/2007';

Le date che gli passo io le ho messe fisse per capire se mi funzionava il
giro. E fin qui tutto bene.

Il mio problema è questo:
Quelle due date le ho dentro delle text che si trovano dentro un form xxx.
Ho provato a passargli invece che la data questa stringa:

Code:
document.nomeform.nometext.value

ma non mi funziona, forse la concateno male.

Code:
href=javascript:window.location.href='?act=saveFileExcelClosed&SEARCH_DAL=' + document.nomeform.nometext.value + '&SEARCH_AL=' + document.nomeform.nometext2.value;

un aiuto????

grazie

--
-----------------------------------
http://www.photocri.altervista.org

http://www.photographers.it/free/cristinalamberti


http://cristinalamberti.spaces.live.com/


questo articolo e` stato inviato via web dal servizio gratuito
http://www.newsland.it/news segnala gli abusi ad abuse (AT) newsland (DOT) it



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

Default Re: Aiuto su querystring con valori javascript - 01-03-2008 , 10:06 AM






Il Thu, 03 Jan 2008 17:02:36 +0100, titty ha scritto:

Quote:
Ciao a tutti
ho la seguente stringa in una pagina html.
Code:
href=javascript:window.location.href='?act=saveFileExcelClosed&SEARCH_DAL=01/11/2007&SEARCH_AL=15/11/2007';
.... href="#" onclick="window.location.href='.....';return false"

Quote:
Quelle due date le ho dentro delle text che si trovano dentro un form xxx.
ma in che senso?

Quote:
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.

--
"That until there is no longer first class
And second class citizens of any nation
Until the colour of a man's skin
Is of no more significance than the colour of his eyes
Me say war"

B.M.


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

Default Re: Aiuto su querystring con valori javascript - 01-03-2008 , 10:18 AM



Cristiano Larghi ha scritto:

Quote:
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=javascript:window.location.href='?act=saveFileExcelClosed&SEARCH_DAL=01/11/2007&SEARCH_AL=15/11/2007';

.... 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.


Non mi da errore, semplicemente non mi passa le variabili:
Code:
<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>




--
-----------------------------------
http://www.photocri.altervista.org

http://www.photographers.it/free/cristinalamberti


http://cristinalamberti.spaces.live.com/


questo articolo e` stato inviato via web dal servizio gratuito
http://www.newsland.it/news segnala gli abusi ad abuse (AT) newsland (DOT) it




Reply With Quote
  #4  
Old   
titty
 
Posts: n/a

Default Re: Aiuto su querystring con valori javascript - 01-03-2008 , 10:21 AM



aggiungo il risultato nella barra indirizzi:

http://localhost/ttm-fms/index.php?a...ed&SEARCH_DAL=



--
-----------------------------------
http://www.photocri.altervista.org

http://www.photographers.it/free/cristinalamberti


http://cristinalamberti.spaces.live.com/


questo articolo e` stato inviato via web dal servizio gratuito
http://www.newsland.it/news segnala gli abusi ad abuse (AT) newsland (DOT) it



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

Default Re: Aiuto su querystring con valori javascript - 01-03-2008 , 10:31 AM



Il Thu, 03 Jan 2008 17:18:30 +0100, titty ha scritto:

Quote:
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.

--
"Ho smesso di fumare.
Vivrò una settimana di più.
E in quella settimana pioverà a dirotto"
W.A.


Reply With Quote
  #6  
Old   
titty
 
Posts: n/a

Default Re: Aiuto su querystring con valori javascript - 01-03-2008 , 10:47 AM



Cristiano Larghi ha scritto:

Quote:
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.
ok funziona, ma per linkarlo a una pagina nuova????

--
-----------------------------------
http://www.photocri.altervista.org

http://www.photographers.it/free/cristinalamberti


http://cristinalamberti.spaces.live.com/


questo articolo e` stato inviato via web dal servizio gratuito
http://www.newsland.it/news segnala gli abusi ad abuse (AT) newsland (DOT) it




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

Default Re: Aiuto su querystring con valori javascript - 01-03-2008 , 10:53 AM



Il Thu, 03 Jan 2008 17:47:49 +0100, titty ha scritto:

Quote:
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

--
"Non sai che ci vuol scienza
ci vuol costanza
ad invecchiare senza maturità"
F.G.


Reply With Quote
  #8  
Old   
titty
 
Posts: n/a

Default Re: Aiuto su querystring con valori javascript - 01-03-2008 , 11:01 AM



Cristiano Larghi ha scritto:

Quote:
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
window.open non lo posso usare..... quindi se _blank è deprecato non c'è
altra soluzione???



--
-----------------------------------
http://www.photocri.altervista.org

http://www.photographers.it/free/cristinalamberti


http://cristinalamberti.spaces.live.com/


questo articolo e` stato inviato via web dal servizio gratuito
http://www.newsland.it/news segnala gli abusi ad abuse (AT) newsland (DOT) it




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

Default Re: Aiuto su querystring con valori javascript - 01-03-2008 , 11:03 AM



Il Thu, 03 Jan 2008 18:01:11 +0100, titty ha scritto:

Quote:
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 ...

--
"That until there is no longer first class
And second class citizens of any nation
Until the colour of a man's skin
Is of no more significance than the colour of his eyes
Me say war"

B.M.


Reply With Quote
  #10  
Old   
titty
 
Posts: n/a

Default Re: Aiuto su querystring con valori javascript - 01-03-2008 , 11:12 AM



Cristiano Larghi ha scritto:

Quote:
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 ...


si lo so, la open non posso usarla perchè mi da questo errore(vedi
allegato).
Il codice è:
Code:
<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>

Guarda l'immagine cliccando http://attach.mynl.it/img?id=NjkwOA

--
-----------------------------------
http://www.photocri.altervista.org

http://www.photographers.it/free/cristinalamberti


http://cristinalamberti.spaces.live.com/


questo articolo e` stato inviato via web dal servizio gratuito
http://www.newsland.it/news segnala gli abusi ad abuse (AT) newsland (DOT) it




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.