Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > it.comp.lang.javascript > #8237 > unrolled thread
| Started by | Gulp® <gulp@hotmail.it> |
|---|---|
| First post | 2018-03-27 13:20 +0200 |
| Last post | 2018-03-29 17:20 +0200 |
| Articles | 7 — 3 participants |
Back to article view | Back to it.comp.lang.javascript
sintassi Gulp® <gulp@hotmail.it> - 2018-03-27 13:20 +0200
Re: sintassi Indec Mal <indecmal@gmail.com> - 2018-03-27 05:01 -0700
Re: sintassi Gulp® <gulp@hotmail.it> - 2018-03-27 16:37 +0200
Re: sintassi Gulp® <gulp@hotmail.it> - 2018-03-27 19:08 +0200
Re: sintassi Indec Mal <indecmal@gmail.com> - 2018-03-28 04:00 -0700
Re: sintassi Gulp® <gulp@hotmail.it> - 2018-03-29 09:31 +0200
Re: sintassi Sandro kensan <kensan@kensan.it> - 2018-03-29 17:20 +0200
| From | Gulp® <gulp@hotmail.it> |
|---|---|
| Date | 2018-03-27 13:20 +0200 |
| Subject | sintassi |
| Message-ID | <p9d9eb$1mfj$1@gioia.aioe.org> |
Qualcuno cortesemente mi corregge la sintassi? Non funziona.
document.write('<tr style="background-color:red; border:1px solid
black;" onclick="VoceCat(' + categorie[i] + ');"><td
style="font-size:26px; width:338px; height:30px;">' + categorie[i] +
'</td></tr>')
--
Gulp®
--
"Partimque figuras retulit antiquas, partim nova monstra creavit."
(La Metamorfosi - Ovidio)
[toc] | [next] | [standalone]
| From | Indec Mal <indecmal@gmail.com> |
|---|---|
| Date | 2018-03-27 05:01 -0700 |
| Message-ID | <a2a6e03c-b30b-4714-b04c-6d1bc1fe67f4@googlegroups.com> |
| In reply to | #8237 |
Il giorno martedì 27 marzo 2018 13:20:46 UTC+2, Gulp® ha scritto:
> Qualcuno cortesemente mi corregge la sintassi? Non funziona.
>
>
> document.write('<tr style="background-color:red; border:1px solid
> black;" onclick="VoceCat(' + categorie[i] + ');"><td
> style="font-size:26px; width:338px; height:30px;">' + categorie[i] +
> '</td></tr>')
document.write("<tr style='background-color:red; border:1px solid black;' onclick='VoceCat(" + categorie[i] + ");'><td style='font-size:26px; width:338px; height:30px;'>" + categorie[i] + "</td></tr>")
[toc] | [prev] | [next] | [standalone]
| From | Gulp® <gulp@hotmail.it> |
|---|---|
| Date | 2018-03-27 16:37 +0200 |
| Message-ID | <p9dl00$bm4$1@gioia.aioe.org> |
| In reply to | #8238 |
Il 27/03/18 14:01, Indec Mal ha scritto:
> document.write("<tr style='background-color:red; border:1px solid black;' onclick='VoceCat(" + categorie[i] + ");'><td style='font-size:26px; width:338px; height:30px;'>" + categorie[i] + "</td></tr>")
Grazie.
Nemmeno così funziona. Per escludere ogni possibilità di errore ho
ridotto il codice della funzione nell'head ad un alert, ma non lo chiama:
<head>
<script type="text/javascript">
function VoceCat(voce){
alert("Funziona!");
}
</script>
</head>
normalmente il tag TR dovrebbe permettere onclick....
--
Gulp®
--
"Partimque figuras retulit antiquas, partim nova monstra creavit."
(La Metamorfosi - Ovidio)
[toc] | [prev] | [next] | [standalone]
| From | Gulp® <gulp@hotmail.it> |
|---|---|
| Date | 2018-03-27 19:08 +0200 |
| Message-ID | <p9dtqu$vei$1@gioia.aioe.org> |
| In reply to | #8239 |
Il 27/03/18 16:37, Gulp® ha scritto:
> Il 27/03/18 14:01, Indec Mal ha scritto:
>> document.write("<tr style='background-color:red; border:1px solid
>> black;' onclick='VoceCat(" + categorie[i] + ");'><td
>> style='font-size:26px; width:338px; height:30px;'>" + categorie[i] +
>> "</td></tr>")
>
> Grazie.
>
> Nemmeno così funziona.
L'errore in debug: Gioiellerie is not defined
at HTMLTableRowElement.onclick
Dove Gioiellerie è la voce di TR
Secondo me sto passando la voce Gioiellerie ma devo metterla come
stringa, quindi la sintassi sopra quando include in VoceCat
categorie[i], va ulteriormente corretta per poter passare la categoria
come stringa....ho provato, ma mi sono perso nuovamente tra doppi
apici...non cavo un ragno dal buco....
--
Gulp®
--
"Partimque figuras retulit antiquas, partim nova monstra creavit."
(La Metamorfosi - Ovidio)
[toc] | [prev] | [next] | [standalone]
| From | Indec Mal <indecmal@gmail.com> |
|---|---|
| Date | 2018-03-28 04:00 -0700 |
| Message-ID | <65b39d83-c380-44d0-a51e-681d77aa1bf2@googlegroups.com> |
| In reply to | #8240 |
Il giorno martedì 27 marzo 2018 19:08:49 UTC+2, Gulp® ha scritto:
> Il 27/03/18 16:37, Gulp® ha scritto:
> > Il 27/03/18 14:01, Indec Mal ha scritto:
> >> document.write("<tr style='background-color:red; border:1px solid
> >> black;' onclick='VoceCat(" + categorie[i] + ");'><td
> >> style='font-size:26px; width:338px; height:30px;'>" + categorie[i] +
> >> "</td></tr>")
> >
> > Grazie.
> >
> > Nemmeno così funziona.
>
> L'errore in debug: Gioiellerie is not defined
> at HTMLTableRowElement.onclick
>
> Dove Gioiellerie è la voce di TR
>
> Secondo me sto passando la voce Gioiellerie ma devo metterla come
> stringa, quindi la sintassi sopra quando include in VoceCat
> categorie[i], va ulteriormente corretta per poter passare la categoria
> come stringa....ho provato, ma mi sono perso nuovamente tra doppi
> apici...non cavo un ragno dal buco....
>
dovrebbe essere così:
document.write("<tr style='background-color:red; border:1px solid black;' onclick='VoceCat(\"" + categorie[i] + "\");'><td style='font-size:26px; width:338px; height:30px;'>" + categorie[i] + "</td></tr>")
[toc] | [prev] | [next] | [standalone]
| From | Gulp® <gulp@hotmail.it> |
|---|---|
| Date | 2018-03-29 09:31 +0200 |
| Message-ID | <p9i4p4$1otn$1@gioia.aioe.org> |
| In reply to | #8242 |
> dovrebbe essere così:
> document.write("<tr style='background-color:red; border:1px solid black;' onclick='VoceCat(\"" + categorie[i] + "\");'><td style='font-size:26px; width:338px; height:30px;'>" + categorie[i] + "</td></tr>")
>
Ok, grazie ancora. Ora però, giusto per capire, mi dici cos'è o cosa fa
quella barra?
--
Gulp®
--
"Partimque figuras retulit antiquas, partim nova monstra creavit."
(La Metamorfosi - Ovidio)
[toc] | [prev] | [next] | [standalone]
| From | Sandro kensan <kensan@kensan.it> |
|---|---|
| Date | 2018-03-29 17:20 +0200 |
| Message-ID | <fi4ei9FpvedU1@mid.individual.net> |
| In reply to | #8243 |
On 29/03/2018 09:31, Gulp® wrote: > Ok, grazie ancora. Ora però, giusto per capire, mi dici cos'è o cosa fa > quella barra? trasforma i doppi apici in un carattere qualsiasi senza il significato di aperta/chiusa stringa. -- Sandro kensan www.kensan.it & www.qiqi.it geek site Saluto gli agenti della NSA - Hello NSA - www.nsa.gov
[toc] | [prev] | [standalone]
Back to top | Article view | it.comp.lang.javascript
csiph-web