tutorials.de Buch-Aktion 05/2012
ERLEDIGT
JA
ANTWORTEN
5
ZUGRIFFE
497
EMPFEHLEN
  • An Twitter übertragen
  • An Facebook übertragen
AUF DIESES THEMA
ANTWORTEN
  1. #1
    FleyerShaver FleyerShaver ist offline Rookie
    Registriert seit
    Jul 2006
    Beiträge
    6
    Ich habe mir das Script von http://script.aculo.us/ runtergeladen. Jetzt habe ich es von meiner test.html so eingebaut:
    HTML-Code:
      <script src="../../includes/javascripts/prototype.js" type="text/javascript"></script>
      <script src="../../includes/javascripts/scriptaculous.js" type="text/javascript"></script>
      <script src="../../includes/javascripts/unittest.js" type="text/javascript"></script>
      <a href="#" onclick="Effect.toggle('addgames','BLIND'); return false;">Gamelinks</a>
      <div id="addgames" style="display:none;"><div style="background-color:#ff8080;width:300px;border:2px solid red;padding:10px;">seergekfeqwöäogwegopgewopgewg</div></div>
    Da funktioniert es perfekt.(siehe: http://www.gandc.de/infusions/arcade/test.html ) Wenn ich es jetzt aber versuche in eine php-Datei einzubauen funktioniert es nicht. Es pasiert überhaupt nichts. Hier ist der Code:
    PHP-Code:
    <a href="#" onclick="Effect.toggle('addgames','BLIND'); return false;">Gamelinks</a> | 
    <a href="#" onclick="Effect.toggle('rateit','BLIND'); return false;">Game bewerten</a>

    <?php
    echo '
    <div id="addgames" style="display:none;"><div style="background-color:#ff8080;width:600px;height:auto;border:2px solid red;padding:10px;">
        <table width="0" border="0">
      <tr>
        <td width>Link:</td>
        <td width=201><input type="text" value="&lt;a href=&quot;http://www.gandc.de/infusions/arcade/games.php?game_id='
    .$game['lid'].'&quot;&gt;'.$game['title'].'&lt;/a&gt; " readonly="true"></td>
      </tr>
      <tr>
        <td>Popup</td>
        <td><input type="text" value="&lt;a href=&quot;http://www.gandc.de/gamepopup.php?id='
    .$game['lid'].'&quot;  target=&quot;detail&quot; onclick=&quot;javascript:window.open(\'\',\'detail\',\'width='.$width.', height='.$height.', directories=no, toolbar=no, location=no, menubar=no, scrollbars=yes, status=no, resizable=no, dependent=no\')&quot;&gt;'.$game['title'].'&lt;/a&gt;" readonly="true"></td>
      </tr>
      <tr>
        <td>Iframe</td>
        <td><input type="text" value="&lt;iframe src=&quot;http://www.gandc.de/gameiframe.php?id='
    .$game['lid'].'&quot; height=&quot;100&quot; width=&quot;150&quot;marginheight=&quot;0&quot; marginwidth=&quot;0&quot; frameborder=&quot;0&quot;&gt;" readonly="true"></td>
      </tr>
    </table></div></div>
    '
    ;
    echo 
    '<div id="addgames" style="display:none;"><div style="background-color:#ff8080;width:600px;border:2px solid red;padding:10px;">Test</div></div>';
    Die Seite dafür ist http://gandc.de/infusions/arcade/games.php?game_id=337 und es soll der toggle Effekt passieren wenn man und dem Game auf Gamelinks oder Game bewerten klickt. Weiß einer warum das so ist?
     

  2. #2
    Quaese Quaese ist offline Moderator
    tutorials.de Moderator
    Registriert seit
    Feb 2004
    Beiträge
    3.451
    Hi,

    ich könnte mir vorstellen, dass es an der Reihenfolge liegt, in der Du die externen JS-Dateien einbindest. Ich denke,
    scriptaculous.js erwartet, dass die prototype.js bereits eingebunden ist.
    Code :
    1
    2
    
    <script src="http://www.gandc.de/includes/javascripts/prototype.js" type="text/javascript"></script>
    <script src="http://www.gandc.de/includes/javascripts/scriptaculous.js" language='JavaScript' type="text/javascript"></script>
    Ciao
    Quaese
     
    Vielleicht muss man manchmal vom Weg abkommen, um nicht auf der Strecke zu bleiben!
    ----
    Der "Fortsetzungsroman" auf www.leuteforum.de

    New kind to realize large scalable projects with jQuery: jQuery SDK

  3. #3
    Maik Tutorials.de Gastzugang
    Hi,

    unabhängig davon solltest du die folgenden Quellcode-Zeilen innerhalb des Dokumentheaders <head> ... </head>, und nicht vor der Dokumenttyp-Deklaration notieren:

    Code :
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
    186
    187
    188
    189
    190
    191
    192
    193
    194
    195
    196
    197
    198
    199
    200
    201
    202
    203
    204
    205
    206
    207
    208
    209
    210
    211
    212
    213
    214
    215
    216
    217
    218
    219
    220
    221
    222
    223
    224
    225
    226
    227
    228
    229
    230
    231
    232
    233
    234
    235
    236
    237
    238
    239
    240
    241
    242
    243
    244
    245
    246
    247
    248
    249
    250
    251
    252
    253
    254
    255
    256
    257
    258
    259
    260
    261
    262
    263
    264
    265
    266
    267
    268
    269
    270
    271
    272
    273
    274
    275
    276
    277
    278
    279
    280
    281
    282
    283
    284
    285
    286
    287
    288
    289
    290
    291
    292
    293
    294
    295
    296
    297
    298
    299
    300
    301
    302
    303
    304
    305
    306
    307
    308
    309
    310
    311
    312
    313
    314
    315
    316
    317
    318
    319
    320
    321
    322
    323
    324
    325
    326
    327
    328
    329
    330
    331
    332
    333
    334
    335
    336
    337
    338
    339
    340
    341
    342
    343
    344
    345
    346
    347
    348
    349
    350
    351
    352
    353
    354
    355
    356
    357
    358
    359
    360
    361
    362
    363
    364
    365
    366
    
    <script src="../../infusions/arcade/inc/arcade.js" language="JavaScript" type="text/javascript"></script><style type="text/css">
    /* ThemeOfficeMenu Style Sheet */
     
    .ThemeOfficeMenu,.ThemeOfficeSubMenuTable
    {
        font-family:    arial, verdana, sans-serif;
        font-size:  8pt;
        padding:    0;
        white-space:    nowrap;
        cursor:     pointer;
    }
     
    .ThemeOfficeSubMenu
    {
        position:   absolute;
        visibility: hidden;
     
        /*
           Netscape/Mozilla renders borders by increasing
           their z-index.  The following line is necessary
           to cover any borders underneath
        */
        z-index:    100;
        border:     0;
        padding:    0;
     
        overflow:   visible;
        border:     1px solid #8C867B;
     
        /*filter:progid:DXImageTransform.Microsoft.Shadow(color=#BDC3BD, Direction=135, Strength=4); */
    }
     
    .ThemeOfficeSubMenuTable
    {
        overflow:   visible;
    }
     
    .ThemeOfficeMainItem,.ThemeOfficeMainItemHover,.ThemeOfficeMainItemActive,
    .ThemeOfficeMenuItem,.ThemeOfficeMenuItemHover,.ThemeOfficeMenuItemActive
    {
        border:     0;
        white-space:    nowrap;
    }
     
     
    .ThemeOfficeMainItem
    {
        background-color:   #161616;
        font-size:  8pt;
        color: #808080;
        height: 10px;
        width: ;
     
    }
     
    .ThemeOfficeMainItemHover,.ThemeOfficeMainItemActive
    {
        background-color:   #161616;
        font-size:  8pt;
        color: #808080;
        height: 10px;
        width: ;
     
    }
     
    .ThemeOfficeMenuItem
    {
        background-color:   #161616;
    }
     
    .over
    {
        color: Red;
        font-weight: bolder;
        font-style: italic
    } 
     
    .ThemeOfficeMenuItemHover,.ThemeOfficeMenuItemActive
    {
        background-color:   #161616;
    }
     
    /* horizontal main menu */
     
    .ThemeOfficeMainItem
    {
        padding: 3px 1px 3px 1px;
        border: 0;
    }
     
    td.ThemeOfficeMainItemHover,td.ThemeOfficeMainItemActive
    {
        padding:    0px;
        border-right:   1px solid #436ba3;
        border-left:    1px solid #436ba3;
    }
     
    .ThemeOfficeMainFolderLeft,.ThemeOfficeMainItemLeft,
    .ThemeOfficeMainFolderText,.ThemeOfficeMainItemText,
    .ThemeOfficeMainFolderRight,.ThemeOfficeMainItemRight
    {
        background-color:   inherit;
    }
     
    /* vertical main menu sub components */
     
    td.ThemeOfficeMainFolderLeft,td.ThemeOfficeMainItemLeft
    {
        padding-top:    1px;
        padding-bottom: 1px;
        padding-left:   0px;
        padding-right:  1px;
     
        border-top: 1px solid #436ba3;
        border-bottom:  1px solid #436ba3;
        border-left:    1px solid #436ba3;
     
        background-color:   inherit;
    }
     
    td.ThemeOfficeMainFolderText,td.ThemeOfficeMainItemText
    {
        padding-top:    1px;
        padding-bottom: 1px;
        padding-left:   4px;
        padding-right:  4px;
     
        border-top: 1px solid #436ba3;
        border-bottom:  1px solid #436ba3;
     
        background-color:   inherit;
        white-space:    nowrap;
        width: 100%;
     
    }
     
    td.ThemeOfficeMainFolderRight,td.ThemeOfficeMainItemRight
    {
        padding-top:    1px;
        padding-bottom: 1px;
        padding-left:   0px;
        padding-right:  0px;
     
        border-top: 1px solid #436ba3;
        border-bottom:  1px solid #436ba3;
        border-right:   1px solid #436ba3;
     
        background-color:   inherit;
    }
     
    tr.ThemeOfficeMainItem td.ThemeOfficeMainFolderLeft,
    tr.ThemeOfficeMainItem td.ThemeOfficeMainItemLeft
    {
        padding-top:    2px;
        padding-bottom: 2px;
        padding-left:   1px;
        padding-right:  1px;
     
        white-space:    nowrap;
     
        border:     0;
        background-color:   inherit;
     
    }
     
    tr.ThemeOfficeMainItem td.ThemeOfficeMainFolderText,
    tr.ThemeOfficeMainItem td.ThemeOfficeMainItemText
    {
        padding-top:    2px;
        padding-bottom: 2px;
        padding-left:   4px;
        padding-right:  4px;
     
        border:     0;
        background-color:   inherit;
    }
     
    tr.ThemeOfficeMainItem td.ThemeOfficeMainItemRight,
    tr.ThemeOfficeMainItem td.ThemeOfficeMainFolderRight
    {
        padding-top:    2px;
        padding-bottom: 2px;
        padding-left:   0px;
        padding-right:  1px;
     
        border:     0;
        background-color:   inherit;
    }
     
    /* sub menu sub components */
     
    .ThemeOfficeMenuFolderLeft,.ThemeOfficeMenuItemLeft
    {
        padding-top:    1px;
        padding-bottom: 1px;
        padding-left:   1px;
        padding-right:  2px;
     
        border-top: 1px solid #436ba3;
        border-bottom:  1px solid #436ba3;
        border-left:    1px solid #436ba3;
     
        background-color:   inherit;
        white-space:    nowrap;
    }
     
    .ThemeOfficeMenuFolderText,.ThemeOfficeMenuItemText
    {
        padding-top:    1px;
        padding-bottom: 1px;
        padding-left:   4px;
        padding-right:  4px;
     
        border-top: 1px solid #436ba3;
        border-bottom:  1px solid #436ba3;
     
        background-color:   inherit;
        white-space:    nowrap;
        font-size:  10pt;
        height: 10px;
        color: ;
        width: ;
     
    }
     
    .ThemeOfficeMenuFolderRight,.ThemeOfficeMenuItemRight
    {
        padding-top:    1px;
        padding-bottom: 1px;
        padding-left:   0px;
        padding-right:  0px;
     
        border-top: 1px solid #436ba3;
        border-bottom:  1px solid #436ba3;
        border-right:   1px solid #436ba3;
     
        background-color:   inherit;
        white-space:    nowrap;
    }
     
    .ThemeOfficeMenuItem .ThemeOfficeMenuFolderLeft,
    .ThemeOfficeMenuItem .ThemeOfficeMenuItemLeft
    {
        padding-top:    2px;
        padding-bottom: 2px;
        padding-left:   1px;
        padding-right:  2px;
     
        white-space:    nowrap;
     
        border:     0px;
        background-color:   #DDE1E6;
    }
     
    .ThemeOfficeMenuItem .ThemeOfficeMenuFolderText,
    .ThemeOfficeMenuItem .ThemeOfficeMenuItemText
    {
        padding-top:    2px;
        padding-bottom: 2px;
        padding-left:   4px;
        padding-right:  4px;
     
        border:     0px;
        background-color:   inherit;
    }
     
    .ThemeOfficeMenuItem .ThemeOfficeMenuFolderRight,
    .ThemeOfficeMenuItem .ThemeOfficeMenuItemRight
    {
        padding-top:    2px;
        padding-bottom: 2px;
        padding-left:   0px;
        padding-right:  1px;
     
        border:     0;
        background-color:   inherit;
    }
     
    /* menu splits */
     
    .ThemeOfficeMenuSplit
    {
        margin:     1px;
        height:     1px;
        overflow:   hidden;
        background-color:   inherit;
        border-top: 1px solid #C6C3BD;
    }
     
    /* image shadow animation */
     
    /*
        seq1:   image for normal
        seq2:   image for hover and active
     
        To use, in the icon field, input the following:
        <img class=seq1 src=normal.gif /><img class=seq2 src=hover.gif />
    */
     
    .ThemeOfficeMenuItem img.seq1
    {
        display:    inline;
    }
     
    .ThemeOfficeMenuItemHover seq2,
    .ThemeOfficeMenuItemActive seq2
    {
        display:    inline;
    }
     
    .ThemeOfficeMenuItem .seq2,
    .ThemeOfficeMenuItemHover .seq1,
    .ThemeOfficeMenuItemActive .seq1
    {
        display:    none;
    }
     
     
    /* inactive settings */
    div.inactive td.ThemeOfficeMainItemHover, div.inactive td.ThemeOfficeMainItemActive
    {
        border-top: 0px;
        border-right:   1px solid #f1f3f5;
        border-left:    1px solid #f1f3f5;
    }
     
    div.inactive .ThemeOfficeMainItem {
        color: #bbb;
     
    }
     
    div.inactive span.ThemeOfficeMainItemText {
        color: #aaa;
    }
     
    div.inactive .ThemeOfficeMainItemHover, div.inactive .ThemeOfficeMainItemActive
    {
        background-color:   #f1f3f5;
    }
     
    .menu-header {
        border-top: solid #C8D5DF; 
        border-top-width: 0px; 
        border-left: solid #C8D5DF; 
        border-left-width: 0px; 
        border-right: solid #C8D5DF; 
        border-right-width:0px; 
        border-bottom: solid #C8D5DF; 
        border-bottom-width:1px;
        padding:0px 14px 0px 14px;
    }
     
    </style>
        <script type="text/javascript">
     
            var mainSiteRoot ="http://gandc.de/";
            var menuImagesRoot = "http://gandc.de/" + "infusions/dhtmlmenu/images/";
            var menuItemFontColor ="";
            var menuItemHoverColor ="";
            var menuAccessLevel ="0";
            var userAccessGroups ="0";
        </script>
     
     
    <script type='text/javascript' language='JavaScript' src='http://gandc.de/infusions/dhtmlmenu/scripts/JSCookMenu.js'></script>
    <script type='text/javascript' language='JavaScript' src='http://gandc.de/infusions/dhtmlmenu/scripts/effect.js'></script>
     

  4. #4
    FleyerShaver FleyerShaver ist offline Rookie
    Registriert seit
    Jul 2006
    Beiträge
    6
    Zitat Zitat von Quaese Beitrag anzeigen
    Hi,

    ich könnte mir vorstellen, dass es an der Reihenfolge liegt, in der Du die externen JS-Dateien einbindest. Ich denke,
    scriptaculous.js erwartet, dass die prototype.js bereits eingebunden ist.
    Code :
    1
    2
    
    <script src="http://www.gandc.de/includes/javascripts/prototype.js" type="text/javascript"></script>
    <script src="http://www.gandc.de/includes/javascripts/scriptaculous.js" language='JavaScript' type="text/javascript"></script>
    Ciao
    Quaese
    DAnke werd ich gleich ausprobieren daran hab ich gar nicht gedacht

    EDIT: Ich hab jetzt diese Reihenfolge genommen:
    HTML-Code:
    <script src="../../includes/javascripts/prototype.js" type="text/javascript"></script>
      <script src="../../includes/javascripts/scriptaculous.js" type="text/javascript"></script>
      <script src="../../includes/javascripts/unittest.js" type="text/javascript"></script>
    Leider funktioniert es immer noch nicht.
    Geändert von FleyerShaver (17.06.07 um 15:03 Uhr)
     

  5. #5
    Quaese Quaese ist offline Moderator
    tutorials.de Moderator
    Registriert seit
    Feb 2004
    Beiträge
    3.451
    Hi,

    es liegt offensichtlich an diesem Script:
    Code :
    1
    
    <script language="Javascript" type="text/javascript" src="http://game-toplist.de/image2.php?id=FleyerShaver"></script>
    Wenn ich es auskommentiere, funktioniert die Toggle-Funktion.

    Edit:
    Ausserdem ist mir aufgefallen, dass Du die ID addgames zweimal verwendest. Im zweiten Fall soll
    es sicherlich rateit lauten.

    Ciao
    Quaese
    Geändert von Quaese (17.06.07 um 19:58 Uhr) Grund: Ergänzung
     
    Vielleicht muss man manchmal vom Weg abkommen, um nicht auf der Strecke zu bleiben!
    ----
    Der "Fortsetzungsroman" auf www.leuteforum.de

    New kind to realize large scalable projects with jQuery: jQuery SDK

  6. #6
    FleyerShaver FleyerShaver ist offline Rookie
    Registriert seit
    Jul 2006
    Beiträge
    6
    Zitat Zitat von Quaese Beitrag anzeigen
    Hi,

    es liegt offensichtlich an diesem Script:
    Code :
    1
    
    <script language="Javascript" type="text/javascript" src="http://game-toplist.de/image2.php?id=FleyerShaver"></script>
    Wenn ich es auskommentiere, funktioniert die Toggle-Funktion.

    Edit:
    Ausserdem ist mir aufgefallen, dass Du die ID addgames zweimal verwendest. Im zweiten Fall soll
    es sicherlich rateit lauten.

    Ciao
    Quaese
    Danke da wer ich nie drauf gekommen
     

Ähnliche Themen

  1. Html/Text Toggle funktioniert nicht.
    Von weedo im Forum Javascript & Ajax
    Antworten: 5
    Letzter Beitrag: 03.11.09, 14:18
  2. onsubmit toggle(); funktioniert nicht
    Von D34DL1NES im Forum Javascript & Ajax
    Antworten: 6
    Letzter Beitrag: 31.07.09, 01:37
  3. Antworten: 18
    Letzter Beitrag: 26.05.06, 20:41
  4. Antworten: 11
    Letzter Beitrag: 03.08.05, 02:22
  5. Dateiupload funktioniert nicht bei großen Dateien
    Von Nikon the Third im Forum PHP
    Antworten: 3
    Letzter Beitrag: 31.08.04, 11:09