Results 1 to 2 of 2

Thread: Please help

  1. #1
    tr.faruk is offline Member
    Join Date
    Mar 2010
    Posts
    1
    Rep Power
    0

    Exclamation Please help

    The following codes marquees, slide the mouse over text to stop when I want.

    I do not understand these writings from Java and English translation dictionary did.

    Java Code:
    <script type="text/javascript">
    function ismaxlength(obj){
    var mlength=obj.getAttribute? parseInt(obj.getAttribute("maxlength")) : ""
    if (obj.getAttribute && obj.value.length>mlength)
    obj.value=obj.value.substring(0,mlength)
    }
    var oMarquees = [], oMrunning,
    oMInterv = 10,
    oMStep = 1,
    oMDirection = 'left';
    /*** Do not edit anything after here ***/
    function domemet() {
    if( oMarquees.length || !document.getElementsByTagName ) { return; }
    var oDivs = document.getElementsByTagName('div');
    for( var i = 0, oDiv; i < oDivs.length; i++ ) {
    oDiv = oDivs[i];
    if( oDiv.className && oDiv.className.match(/\bmemet\b/) ) {
    if( !( oDiv = oDiv.getElementsByTagName('div')[0] ) ) { continue; }
    if( !( oDiv.mchild = oDiv.getElementsByTagName('div')[0] ) ) { continue; }
    oDiv.mchild.style.cssText += ';white-space:nowrap;';
    oDiv.mchild.style.whiteSpace = 'nowrap';
    oDiv.style.height = oDiv.offsetHeight + 'px';
    oDiv.style.overflow = 'hidden';
    oDiv.style.position = 'relative';
    oDiv.mchild.style.position = 'absolute';
    oDiv.mchild.style.top = '0px';
    oDiv.mchild.style[oMDirection] = oDiv.offsetWidth + 'px';
    oMarquees[oMarquees.length] = oDiv;
    i += 50;
    }
    }
    oMrunning = setInterval('aniMarquee()',oMInterv);
    }
    function aniMarquee() {
    var oDiv, oPos;
    for( var i = 0; i < oMarquees.length; i++ ) {
    oDiv = oMarquees[i].mchild;
    oPos = parseInt(oDiv.style[oMDirection]);
    if( oPos <= -1 * oDiv.offsetWidth ) {
    oDiv.style[oMDirection] = oMarquees[i].offsetWidth + 'px';
    } else {
    oDiv.style[oMDirection] = ( oPos - oMStep ) + 'px';
    }
    }
    }
    if( window.addEventListener ) {
    window.addEventListener('load',domemet,false);
    } else if( document.addEventListener ) {
    document.addEventListener('load',domemet,false);
    } else if( window.attachEvent ) {
    window.attachEvent('onload',domemet);
    }
    </script>
    <body style="background-color: #FFFFFF">
    <td class="hucre">
    </td>
    </tr>
    <table style="width: 100%; height: 31px" cellspacing="0" cellpadding="0" class="style1">
    <tr>
    <td>
    <div class="memet">
    <div>
    <div class="style2">
    <strong>Burası Malatya Erkenek'ten Yankılanan ses</strong></div>
    </div>
    </div>
    </td>
    </tr>
    </table>

  2. #2
    JosAH's Avatar
    JosAH is online now Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,435
    Blog Entries
    7
    Rep Power
    20

    Default

    That is Javascript, not Java; the two are entirely different languages. This is a Java forum you need a Javascript forum.

    kind regards,

    Jos

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •