Persönliche Werkzeuge

Test Musterbogen

Aus BogenWiki

(Unterschied zwischen Versionen)
Wechseln zu: Navigation, Suche
Zeile 9: Zeile 9:
         <tr style="background:#F8F8F8;" valign=top>
         <tr style="background:#F8F8F8;" valign=top>
           <td>
           <td>
-
             </html>{{Button|Caption=MB-Types |ID=BtnTstMBTypes |OnEvent=BtnMainEvent}}<html>&nbsp;&nbsp;
+
             </html>{{Button|Caption=MB-Types |ID=BGF_MB_TestMBTypes |OnEvent=BtnPageEvent}}<html>&nbsp;&nbsp;
-
             </html>{{Button|Caption=Test 2 |ID=BtnTst2 |OnEvent=BtnMainEvent}}<html>
+
             </html>{{Button|Caption=Test 2 |ID=BGF_MB_Test2 |OnEvent=BtnPageEvent}}<html>
           </td>
           </td>
         </tr>
         </tr>
Zeile 345: Zeile 345:
</template>
</template>
<script src="/bogenwiki_bgf/src/bgf_mbtypes.js"></script>
<script src="/bogenwiki_bgf/src/bgf_mbtypes.js"></script>
 +
 +
function MGF_MB_OnClick(eElement)
 +
{
 +
  console.log('[MGF_MB_OnClick] eElement.id='+eElement.id);
 +
  var sElementID    = eElement.id;
 +
  switch (sElementID) {
 +
    case 'BGF.MB.TestMBTypes':
 +
      break;
 +
  }
 +
}
 +
 +
sActiveBgColor = '#A0A0A0';
 +
sActiveCaColor = 'white';
 +
sInactiveBgColor = '#E0E0E0';
 +
sInactiveCaColor = 'black';
 +
sHoverBgColor = '#D0D0D0';
 +
sHoverCaColor = 'black';
 +
function BtnPageEvent(sID,sEvent) {
 +
  eButton = document.getElementById(sID);
 +
  switch (sEvent) {
 +
  case 'onmouseenter':
 +
    //console.log(sID,aActiveBtnID[0],aActiveBtnID[1]);
 +
    eButton.style.background=sHoverBgColor;
 +
    eButton.style.color=sHoverCaColor;
 +
    break;
 +
  case 'onmouseleave':
 +
    eButton.style.background=sInactiveBgColor;
 +
    eButton.style.color=sInactiveCaColor;
 +
    break;
 +
  case 'onclick':
 +
    MGF_MB_OnClick(eButton);
 +
    break;
 +
  case 'onload':
 +
    eButton.style.background=sInactiveBgColor;
 +
    eButton.style.color=sInactiveCaColor;
 +
    break;
 +
  }
 +
}
<script>
<script>
</script>
</script>
</html>
</html>

Version vom 05:55, 28. Jun. 2024

Tests
MB-Types
  
Test 2
function MGF_MB_OnClick(eElement) { console.log('[MGF_MB_OnClick] eElement.id='+eElement.id); var sElementID = eElement.id; switch (sElementID) { case 'BGF.MB.TestMBTypes': break; } } sActiveBgColor = '#A0A0A0'; sActiveCaColor = 'white'; sInactiveBgColor = '#E0E0E0'; sInactiveCaColor = 'black'; sHoverBgColor = '#D0D0D0'; sHoverCaColor = 'black'; function BtnPageEvent(sID,sEvent) { eButton = document.getElementById(sID); switch (sEvent) { case 'onmouseenter': //console.log(sID,aActiveBtnID[0],aActiveBtnID[1]); eButton.style.background=sHoverBgColor; eButton.style.color=sHoverCaColor; break; case 'onmouseleave': eButton.style.background=sInactiveBgColor; eButton.style.color=sInactiveCaColor; break; case 'onclick': MGF_MB_OnClick(eButton); break; case 'onload': eButton.style.background=sInactiveBgColor; eButton.style.color=sInactiveCaColor; break; } }