Onkeypress() [JavaScript]



  • vielleicht erstmal einbisschen Code

    ..
    <head>
    <Script for="bodyRightBottom_Doc" event="onKeypress()">')

    var theAllCampaigns =new Array("...... ");

    function crateTable(indexOfSelectedRow)
    {
    var BackColor;
    var textColor;
    ...
    document.writeln('</head>');
    document.writeln('<body bgcolor="#D6D6D6">');
    document.writeln('<table width="100%" border="0">')
    for(var index=0;index<theAllCampaigns.length;index++){
    if ((index & 1) == 0) {
    BackColor = "#FFFFFF";
    textColor="#000000";

    } else {
    BackColor = "E1F0FF";
    textColor="#000000";
    }
    if(index== indexOfSelectedRow){
    BackColor="#506EC8";
    textColor="#FFFFFF";
    }
    //................

    if(window.event.ctrlKey){
    isCTRL_Press=true;
    alert(isCTRL_Press);
    }
    //.........

    document.writeln('<tr onClick="myAvtion()">');
    document.writeln('bgcolor=' + BackColor + ' Style=color:' +
    textColor + ' onDblClick="parent.addCampaignExpress(true,0)">');
    document.writeln('<td width="10" bgColor="E1F0FF"> </td>');
    document.writeln('<td width="65" align="left"> '+theAllCampaigns
    [index] '</td>');
    document.writeln('</tr>");
    document.writeln('</table>");
    ...

    Problem:
    wenn ich den Block schreibe
    if(window.event.ctrlKey){
    alert("Test Test");
    }
    lasst sich die tabelle nicht ausgenben

    warum kann jemand mir helfen Danke


Anmelden zum Antworten