shoper: html code in JS Variablen?! Code funktioniert nicht.

Beitrag lesen

<html><body>
<form action="itemid.php" method="post">
 <select name="itemid" size="10" >
    <option value="1">wasser</option>
    <option value="2">erde</option>
    <option value="3">luft</option>
    <option value="4">feuer</option>

</select>

</form>

<script type="text/javascript">

for (var i = 0; i < document.forms[0].itemid.length; ++i)

var html1 = '<htm'
var html2 = 'l><bod'
var html3 = 'y><form target=/"shop/" action=/"/';'
var html = html1 + html2 + html3;
var url = '/meinscript.php?itemid=';
var itemid = document.forms[0].itemid.options[i].value;
var htmlend1 = 'method=/"post/">'
var htmlend2 = '<input type=/"submit/" name=/"submit/" value=/"neu/" id=/"x/">'
var htmlend3 = '<input type=/"hidden/" name=/"entry/" value=/"bla/"></form>'
var htmlend4 = '<iframe name=/"shop/">'
var htmlend5 = '<script>alert(12345);
var ende1 = '</scri'
var ende2 = 'pt></bod'
var ende3 = 'y></htm'
var ende4 = 'l>'
var ende = ende1 + ende2 + ende3 + ende4
var htmlgesamt = htmlend1+ htmlend2 + htmlend3 + htmlend4 + htmlend5
var code = html + url + itemid + htmlgesamt + ende;
var codezwischenspeicher = "" + codezwischenspeicher + code;

document.write(codezwischenspeicher);

</script>

</html></body>

Wo liegt der Fehler? Ich bekomm es einfach nicht hin!