Toon posts:

[javascript] var vervangen

Pagina: 1
Acties:
  • 39 views sinds 30-01-2008

Verwijderd

Topicstarter
function addType() {
var catid = document.theform.image_catagorie.options.value;
var catid = "c"+catid; // catid = c475
var output= document.anotherForm.c475.value;

alert(output);
}

Hoe vervang ik in output C475 met de variable catid?

catid is namelijk de ene keer c475 en een andere keer c555 of c159 of... dus ik moet die variable in de var output krijgen zodat de output zich aanpast aan de geselecteerde option van image_categorie.

  • BtM909
  • Registratie: Juni 2000
  • Niet online

BtM909

Watch out Guys...

code:
1
var output = document.forms['anotherForm'].elements[catid].value


?

edit:

mophor, jouw post is ietsiepietsie beter! :>

[ Voor 33% gewijzigd door BtM909 op 09-02-2004 11:45 ]

Ace of Base vs Charli XCX - All That She Boom Claps (RMT) | Clean Bandit vs Galantis - I'd Rather Be You (RMT)
You've moved up on my notch-list. You have 1 notch
I have a black belt in Kung Flu.


Verwijderd

zoeken:
document.forms['formname'].elements[catid].value;

edit:
edit: baas boven baas :P

[ Voor 33% gewijzigd door Verwijderd op 09-02-2004 11:42 ]


  • André
  • Registratie: Maart 2002
  • Laatst online: 26-05 00:33

André

Analytics dude

code:
1
document.forms["formname"].elements["c" + catid].value;


offtopic:
baas boven baas boven baas?

Verwijderd

Topicstarter
bedankt :D

  • crisp
  • Registratie: Februari 2000
  • Laatst online: 08:20

crisp

Devver

Pixelated

/basic :P

Intentionally left blank

Pagina: 1

Dit topic is gesloten.