Jump to content
Sign in to follow this  
Loken

IE Get Object By Value = ?

Recommended Posts

The IE UDF only provides a _IEGetObjByName and _IEGetObjByID function.

What for do you need such a function? Can you please elaborate?


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2019-08-19 - Version 1.4.13.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2019-07-24 - Version 1.3.6.0) - Download - General Help & Support - Example Scripts - Wiki
Outlook Tools (NEW 2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
Task Scheduler (NEW 2019-10-09 - Version 0.9.0.0) - Download - General Help & Support - Wiki

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

I wanna click a submit button but there are two submit buttons on  site.And i want click second submit button.

_IEFormSubmit function clicks first submit button , i tried some diffrent methods but i could not.

Share this post


Link to post
Share on other sites

_IEFormSubmit does not click any button. It calls the submit method for the form object. Can you post the html source for the form, so everything between <form> and </form>. You could always use _IETagNameGetCollection() to get reference to the specific button by instance and call the click method.

Share this post


Link to post
Share on other sites

Sure ; 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <title>Incimafya.com - En iyi Gangster Oyunu - Suçlar</title>
    <style type="text/css">
      #footer .copy ul li.mu { background: url('/images/icons/set_1/stats_family.png') 0 0 no-repeat; padding-left: 20px; }
      #footer .copy ul li.mo { background: url('/images/icons/set_1/status_online.png') 8px 0 no-repeat; padding-left: 28px; }
      #footer .copy ul li.mt { background: url('/images/icons/set_1/stats_referrals.png') 8px 0 no-repeat; padding-left: 28px; }
    </style>
    <link rel="stylesheet" type="text/css" href="/scripts/fancybox/jquery.fancybox.css"/>
    <link rel="stylesheet" type="text/css" href="/layouts/062/style.css"/>
    <link rel="stylesheet" type="text/css" href="/game.css"/>
    <style type="text/css">
      .vip { background: url('/images/icons/set_1/game_vip.png') right center no-repeat; padding-right: 14px; }
      .level0 { color: red !important; text-decoration: line-through !important; }
      .level1 { color: #D3DF0F !important; }
      .level2 { color: #0DFF22 !important; }
      .level3 { color: #0C2FF3 !important; }
      .level4 { color: #1143F8 !important; }
      .level5 { color: #F01523 !important; }
      .level6 { color: #F80707 !important; background: url('/images/icons/set_1/game_owner.png') right center no-repeat; padding-right: 20px; }
      h1.gamenaam { color: #8E9464 !important; }    </style>
    <base href="http://www.incimafya.com/"/>
    <link rel="shortcut icon" type="image/png" href="favicon"/>
    <meta name="keywords" content="Mafya oyunu, Mafya dünyas&#305;, mafya e&#287;lence, gangster oyunu, yeralt&#305; dünyas&#305;, çete, online rpg, ücretsiz oyun, bedava oyna, ücretsiz oyun yarat, create free game, oyun sunun"/>
    <meta name="description" content="Mafya&#39;n&#305;n suç dünyas&#305;nda geçen web ve metin tabanl&#305; bir oyundur."/>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-15"/>
    <script type="text/javascript" src="/scripts/jquery-1.7.1.js"></script>
    <script type="text/javascript" src="/scripts/fancybox/jquery.easing.1.3.js"></script>
    <script type="text/javascript" src="/scripts/fancybox/jquery.fancybox-1.2.1.pack.js"></script>
    <script type="text/javascript">
      if (top.location != location) {
        top.location.href = document.location.href;
      }    
    </script>
    <script type="text/javascript">
      var jQ = jQuery.noConflict();
      jQ(document).ready(function() {
        jQ("a.fancy").fancybox({
          'zoomOpacity': true,
          'overlayShow': false,
          'zoomSpeedIn': 500,
          'zoomSpeedOut': 500
        });
      });
    </script>
    <script type="text/javascript" src="/scripts/ajax/prototype.js"></script>
        <script type="text/javascript" src="/scripts/cufon/cufon-yui.js"></script>
  </head>
  <body>
    <script type="text/javascript" src="/scripts/tooltip/tooltip.js"></script>
    <div id="wrapper">
      <div id="header" style="background: url(/layouts/062/images/header.png) no-repeat;">
        <h1 class="gamenaam"></h1>
      </div>
      <div id="topmenu">
        <ul>
          <li><a href="http://www.incimafya.com/">Ana sayfa</a></li><li><a href="crew">Ekip</a></li><li><a href="info/1/duyurular">Duyurular</a></li><li><a href="contact">Ileti&#351;im</a></li><li><a href="login/logout">Ç&#305;k&#305;&#351;</a></li>
        </ul>
      </div>
      <div id="main">
        <div id="left">
          <ul><li class="h3 l4">Suç olaylar&#305;</li><li class="a">&nbsp;</li><li><a href="crimes">Suçlar</a></li>
<li><a href="organized-crime">Organize suç</a></li>
<li><a href="group-robbery">Toplu soygun</a></li><li><a href="shooting">Keskin ni&#351;anc&#305;l&#305;k</a></li><li><a href="attack">Cinayet</a></li>
<li><a href="cars/steal">Araba çal</a></li>
<li><a href="drugs">Uyu&#351;turucular</a></li><li><a href="smuggling">Insan kaçakç&#305;l&#305;&#287;&#305;</a></li><li><a href="transport">Para kamyonu soygunu</a></li><li><a href="missions">Görevler</a></li><li><a href="red-light-district">Red-light bölgesi</a></li><li><a href="work">Çal&#305;&#351;</a></li>
<li><a href="russian-mafia">Rus Mafyas&#305;</a></li><li><a href="suspicious-packages">Gizemli paketler</a></li><li><a href="farao">Firavunu öldür</a></li><li class="b">&nbsp;</li></ul>
          <ul><li class="h3 l3">Çevre</li><li class="a">&nbsp;</li><li><a href="bank">Banka hesab&#305;</a></li>
<li><a href="safe">Kasa</a></li><li><a href="shop">Dükkan</a></li><li><a href="hospital">Hastane</a></li>
<li><a href="bullet-factory">Mühimmat fabrikas&#305;</a></li>
<li><a href="airport">Havaalan&#305;</a></li>
<li><a href="auction">Ihale</a></li><li><a href="cars">Garaj</a></li>
<li><a href="prison">Hapishane</a></li>
<li><a href="sports-hall">Spor salonu</a></li><li><a href="boxing">Boks kulübü</a></li>
<li><a href="president">Ba&#351;kan</a></li>
<li><a href="court">Mahkeme</a></li>
<li class="b">&nbsp;</li></ul>
          <ul><li class="h3 l2">Kumarhane</li><li class="a">&nbsp;</li><li><a href="blackjack">Blackjack</a></li>
<li><a href="wheel-of-fortune">Çark&#305;felek</a></li>
<li><a href="slots">Slot makinesi</a></li><li><a href="soccer">Futbol bahisleri</a></li><li><a href="higher-lower">Yüksek / dü&#351;ük</a></li>
<li><a href="lottery">Loto</a></li><li><a href="scratch-cards">Kaz&#305; kazan</a></li><li><a href="crack-the-safe">Kasay&#305; k&#305;r</a></li>
<li><a href="horse-racing">At yar&#305;&#351;lar&#305;</a></li><li><a href="guess-the-number">Rakam&#305; tuttur</a></li>
<li><a href="roulette">Rulet</a></li>
<li class="b">&nbsp;</li></ul>
          <ul><li class="h3 l1">Aile</li><li class="a">&nbsp;</li><li><a href="family">Aile durumu</a></li>
<li><a href="family/apply">Aileye kat&#305;l</a></li>
<li><a href="family/new">Aile olu&#351;tur</a></li>
<li class="b">&nbsp;</li></ul>
          <br/>
        </div>
        <div id="center">
          <div id="statsmenu">
            <table cellspacing=0 cellpadding=0 class="stats">
              <tr>
                <td width="7%" align="center"><img src="/images/icons/set_1/stats_power.png"/></td>
                <td width="15%"><span id="stats_power">0</span></td>
                <td width="7%" align="center"><img src="/images/icons/set_1/stats_cash.png"/></td>
                <td width="17%"><span id="stats_cash">165.195&nbsp;TL</span></td>
                <td width="7%" align="center"><img src="/images/icons/set_1/stats_credits.png"/></td>
                <td width="13%"><span id="stats_credits">60</span></td>
                <td width="7%" align="center"><img src="/images/icons/set_1/stats_rank.png"/></td>
                <td width="27%"><span id="stats_rank">Cete Uyesi</span></td>
              </tr><tr>
                <td align="center"><img id="stats_flag" src="/images/icons/flag_1/flag_cn.png"/></td>
                <td><span id="stats_country">Çin</span></td>
                <td align="center"><img src="/images/icons/set_1/stats_bank.png"/></td>
                <td><span id="stats_bank">0&nbsp;TL</span></td>
                <td align="center"><img src="/images/icons/set_1/stats_health.png"/></td>
                <td><span id="stats_health">100%</span></td>
                <td align="center"><img src="/images/icons/set_1/stats_rankprogress.png"/></td>
                <td><span id="stats_rankbar2"><span style="white-space: nowrap"><img src="/images/bars_05/health_1.png" height="10" align="absmiddle"><img src="/images/bars_05/health_2.png" width="46" height="10" align="absmiddle"><img src="/images/bars_05/health_5.png" width="54" height="10" align="absmiddle"><img src="/images/bars_05/health_6.png" height="10" align="absmiddle"></span><span class="rankbar_text">&nbsp;46%</span></span></td>
              </tr>
            </table>
          </div>
<div class="content_block ad_clicks">
  <div class="content_inner">
  <form method="post">
    <table>
      <tr>
        <td width="16%" style="padding-right: 6px; white-space: nowrap"><strong>Reklam t&#305;klar&#305;</strong></td>
        <td width="6%" align="center">
          <input onclick="window.open('http://www.mafyakur.com/');" name="clickmission" type="submit" name="submit" class="submit" value="1"/>
        </td>
        <td width="6%" align="center">
          <input onclick="window.open('http://www.mafyakur.com/');" name="clickmission" type="submit" name="submit" class="submit" value="2"/>
        </td>
        <td width="6%" align="center">
          <input onclick="window.open('http://www.mafyakur.com/');" name="clickmission" type="submit" name="submit" class="submit" value="3"/>
        </td>
        <td width="6%" align="center">
          <input onclick="window.open('http://www.mafyakur.com/');" name="clickmission" type="submit" name="submit" class="submit" value="4"/>
        </td>
        <td width="6%" align="center">
          <input onclick="window.open('http://www.mafyakur.com/');" name="clickmission" type="submit" name="submit" class="submit" value="5"/>
        </td>
        <td>&nbsp;</td>
      </tr>
    </table>
  </form>
</div>
</div>
<div class="content_block">
  <div class="content_inner">
    <h1>Suçlar</h1>
    <form method="post">
      <table class="content_table">
        <tr>
          <td width="5%" class="tsub">&nbsp;</td>
          <td width="5%" class="tsub">&nbsp;</td>
          <td width="70%" class="tsub">Suç</td>
          <td width="5%" class="tsub">&nbsp;</td>
          <td width="15%" class="tsub">&#351;ans</td>
        </tr>
        <tr>
          <td align="center" class="tcell"><input type="radio" name="crime" value="1"/></td>
          <td align="center" class="tcell"><img src="/images/icons/set_1/crime.png"/></td>
          <td class="tcell">Bir çocuktan &#351;eker çal</td>
          <td align="center" class="tcell"><img src="/images/icons/set_1/chance.png"/></td>
          <td class="tcell">0%</td>
        </tr>
        <tr>
          <td align="center" class="tcell"><input type="radio" name="crime" value="2"/></td>
          <td align="center" class="tcell"><img src="/images/icons/set_1/crime.png"/></td>
          <td class="tcell">Dilenci soy</td>
          <td align="center" class="tcell"><img src="/images/icons/set_1/chance.png"/></td>
          <td class="tcell">0%</td>
        </tr>
        <tr>
          <td align="center" class="tcell"><input type="radio" name="crime" value="3"/></td>
          <td align="center" class="tcell"><img src="/images/icons/set_1/crime.png"/></td>
          <td class="tcell">Yayalar&#305; soy</td>
          <td align="center" class="tcell"><img src="/images/icons/set_1/chance.png"/></td>
          <td class="tcell">0%</td>
        </tr>
        <tr>
          <td align="center" class="tcell"><input type="radio" name="crime" value="4"/></td>
          <td align="center" class="tcell"><img src="/images/icons/set_1/crime.png"/></td>
          <td class="tcell">Scooter çal</td>
          <td align="center" class="tcell"><img src="/images/icons/set_1/chance.png"/></td>
          <td class="tcell">0%</td>
        </tr>
        <tr>
          <td align="center" class="tcell"><input type="radio" name="crime" value="5"/></td>
          <td align="center" class="tcell"><img src="/images/icons/set_1/crime.png"/></td>
          <td class="tcell">ATM soy (Bankamatik)</td>
          <td align="center" class="tcell"><img src="/images/icons/set_1/chance.png"/></td>
          <td class="tcell">1%</td>
        </tr>
        <tr>
          <td align="center" class="tcell"><input type="radio" name="crime" value="6"/></td>
          <td align="center" class="tcell"><img src="/images/icons/set_1/crime.png"/></td>
          <td class="tcell">Kuyumcudan mücevher çal</td>
          <td align="center" class="tcell"><img src="/images/icons/set_1/chance.png"/></td>
          <td class="tcell">1%</td>
        </tr>
        <tr>
          <td align="center" class="tcell"><input type="radio" name="crime" value="7"/></td>
          <td align="center" class="tcell"><img src="/images/icons/set_1/crime.png"/></td>
          <td class="tcell">Müzeden sanat eseri çal</td>
          <td align="center" class="tcell"><img src="/images/icons/set_1/chance.png"/></td>
          <td class="tcell">1%</td>
        </tr>
        <tr>
          <td align="center" class="tcell"><input type="radio" name="crime" value="8"/></td>
          <td align="center" class="tcell"><img src="/images/icons/set_1/crime.png"/></td>
          <td class="tcell">Ba&#351;kan&#305; kaç&#305;r</td>
          <td align="center" class="tcell"><img src="/images/icons/set_1/chance.png"/></td>
          <td class="tcell">55%</td>
        </tr>
      </table>
<table class="content_table"><tr><td>&nbsp;</td><td align="center" width="25%"><input class="submit bad" type="submit" name="R_HCRC" value="Hapse gitmek istiyorum!"/></td><td width="1%">&nbsp;<input type="hidden" name="challenge" value="2858690"/><input type="hidden" name="sess" value="58cbf16a76e06e86a1dac323352137c2"/></td><td align="center" width="25%"><input class="submit good" type="submit" name="R_TRZP" value="Bu suçu i&#351;le"/></td><td>&nbsp;</td></tr></table>    </form>
  </div>
</div>
<div class="content_block">
  <form method="post" onsubmit="minichat(document.getElementById('chattext').value); document.getElementById('chattext').value = ''; return false;">
    <div class="content_inner">
      <h1>Mini-sohbet</h1>
      <div id="chatbar">
<table class="minichat"><tr><td width="4%"><img src="/images/icons/set_1/status_online.png"/></td><td width="18%"><a href="member/INCITEAM" class="level1">INCITEAM</a>:</td><td width="76%">Hakk&#305;m yokkku panpa</a></td></tr><tr><td width="4%"><img src="/images/icons/set_1/status_online.png"/></td><td width="18%"><a href="member/stagona" class="level1">stagona</a>:</td><td width="76%">koydum panpa</a></td></tr><tr><td width="4%"><img src="/images/icons/set_1/status_away.png"/></td><td width="18%"><a href="member/ortadakalan" class="level1">ortadakalan</a>:</td><td width="76%">ald&#305;m</a></td></tr><tr><td width="4%"><img src="/images/icons/set_1/status_online.png"/></td><td width="18%"><a href="member/BurakBal" class="level1">BurakBal</a>:</td><td width="76%">R&uuml;tbesi y&uuml;ksek Toplu gelin ortadakalan jamiryo ?</a></td></tr><tr><td width="4%"><img src="/images/icons/set_1/status_online.png"/></td><td width="18%"><a href="member/jamiryo31" class="level1 vip">jamiryo31</a>:</td><td width="76%">abi adam 5 mye 96 kredi veriyor ya</a></td></tr><tr><td width="4%"><img src="/images/icons/set_1/status_online.png"/></td><td width="18%"><a href="member/Rush" class="level1 vip">Rush</a>:</td><td width="76%">salak</a></td></tr><tr><td width="4%"><img src="/images/icons/set_1/status_online.png"/></td><td width="18%"><a href="member/jamiryo31" class="level1 vip">jamiryo31</a>:</td><td width="76%">*** koydu piyasan&#305;n</a></td></tr><tr><td width="4%"><img src="/images/icons/set_1/status_online.png"/></td><td width="18%"><a href="member/INCITEAM" class="level1">INCITEAM</a>:</td><td width="76%">stagona neden 5m ye koydun 96 kred&#305;y&#305; 10mye b&#305;le satard&#305;n</a></td></tr><tr><td width="4%"><img src="/images/icons/set_1/status_online.png"/></td><td width="18%"><a href="member/stagona" class="level1">stagona</a>:</td><td width="76%">beyler ihtiya&ccedil; vard&#305; 1.305 kredi daha var sorun yok</a></td></tr><tr><td width="4%"><img src="/images/icons/set_1/status_online.png"/></td><td width="18%"><a href="member/INCITEAM" class="level1">INCITEAM</a>:</td><td width="76%">Zarara sen g&#305;r&#305;yon kam&#305;l b&#305;z&#305;de etk&#305;l&#305;yosun</a></td></tr><tr><td width="4%"><img src="/images/icons/set_1/status_online.png"/></td><td width="18%"><a href="member/1mmortaL" class="level1">1mmortaL</a>:</td><td width="76%">burak bal org yapal&#305;m</a></td></tr><tr><td width="4%"><img src="/images/icons/set_1/status_online.png"/></td><td width="18%"><a href="member/BurakBal" class="level1">BurakBal</a>:</td><td width="76%">tmm 1mmortaL</a></td></tr></table>      </div>
      <div id="chatbar2">
        <table class="minichat">
          <tr>
            <td width="4%"><img src="/images/icons/set_1/status_online.png"/></td>
            <td width="18%"><a href="member/Loken" class="level1">Loken</a>:</td>
            <td width="60%"><input style="width: 300px" maxlength="80" class="input" type="text" name="text" id="chattext" value=""/></td>
            <td width="18%"><input type="submit" class="submit" name="chatbutton" id="chatbutton" value="Gönder"/></td>
          </tr>
        </table>
      </div>
    </div>
  </form>
</div>
<div id="prototype"></div>
<script type="text/javascript">
function minichat(text) {
  window.clearTimeout(t);
  new Ajax.Updater('prototype', 'minichat', {
    encoding: 'iso-8859-1',
    method: 'post',
    requestTimeout: 5,
    parameters: { text: text },
    evalScripts: true
  });
}
var t = false;
t = window.setTimeout('minichat()', 5000);
</script>
          <br/>
        </div>
        <div id="right">
          <ul class="credit"><li class="h3 r4">Yap&#305;mc&#305; menüsü</li><li class="a">&nbsp;</li><li><a href="callcredits">Kredi al</a></li>
<li><a href="exchange-office">Takas bürosu</a></li>
<li><a href="credit-lottery">Kredi loto</a></li>
<li class="b">&nbsp;</li></ul>
          <ul><li class="h3 r5">Genel</li><li class="a">&nbsp;</li><li><a href="owners">Mülk durumu</a></li>
<li><a href="forum">Forum</a></li><li><a href="chat">Chatbox</a></li><li><a href="manual">Oyun kitab&#305;</a></li>
<li><a href="maffia-story">Hikaye</a></li><li><a href="poll">Anket</a></li><li><a href="stats">Istatistikler</a></li>
<li class="b">&nbsp;</li></ul>
          <ul><li class="h3 r6">Ki&#351;isel</li><li class="a">&nbsp;</li><li><a href="members">Oyuncu S&#305;ralamas&#305;</a></li>
<li><a href="online">Online oyuncu</a></li>
<li><a href="mail/inbox">Mesajlar</a></li>
<li><a href="donate">Ba&#287;&#305;&#351;la</a></li><li><a href="settings">Ayarlar</a></li>
<li><a href="notepad">Not defteri</a></li>
<li><a href="logs">Kay&#305;tlar</a></li>
<li><a href="referrals">Tavsiyeler</a></li>
<li class="b">&nbsp;</li></ul>
          <ul><li class="h3 r3">Link ortaklar&#305;</li><li class="a">&nbsp;</li><li><a target="_blank" href="https://www.facebook.com/incisavaslari">Facebook Sayfam&#305;z!</a></li>
<li class="b">&nbsp;</li></ul>
          <br/>
        </div>
        <div class="clear">&nbsp;</div>
      </div>
      <div id="footer">
        <div class="top">&nbsp;</div>
        <div class="bg">
          <div class="copy">
            &copy; <strong>Incimafya.com</strong> Tüm haklar&#305; sakl&#305;d&#305;r
            <ul><li class="mu"><a href="members"><span>3.058</span> Oyuncu</a></li>
<li class="mo"><a href="online"><span>33</span> online</a></li>
</ul>
          </div>
          <div class="block">
            <div class="content_block" id="advert">
  <div class="content_inner">
    <h5>Facebook'dan Bizi takip edin!</h5>
    <div style="text-align: center">
      <div class="fb-like" data-href="https://www.facebook.com/incisavaslari" data-send="true" data-width="450" data-show-faces="true"></di<div id="fb-root"></div>
<script>(function(d, s, id) {
  var js, fjs = d.getElementsByTagName(s)[0];
  if (d.getElementById(id)) return;
  js = d.createElement(s); js.id = id;
  js.src = "//connect.facebook.net/tr_TR/all.js#xfbml=1";
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>    </div>
  </div>
</div>
          </div>
          <div class="clear">&nbsp;</div>
        </div>
        <div class="bottom">&nbsp;</div>
      </div>
    </div>
    <script type="text/javascript">
      var d = new Date();
      t1 = parseInt((d.getTime()-d.getTimezoneOffset()*60000).toString().substring(0, 10));
      t2 = 1373019083;
      tz = Math.round((t1-t2)/3600);
      var expires = new Date();
      var expdate = expires.getTime();
      expdate += 3600*1000*360;
      expires.setTime(expdate);
      var tt = new Date().getHours();
      var hh = new Date().getMinutes();
      var newCookie='tz='+tz+'; path=/; expires='+expires.toGMTString();
      window.document.cookie=newCookie;
    </script>
    <script type="text/javascript">Cufon.now();</script>
    <script>
      if (document.getElementById('overlay')) {
        document.getElementById('overlay').style.visibility='hidden';
        document.getElementById('overlay').style.top='61px';
      }
    </script>
    <script type="text/javascript">
      var _gaq = _gaq || [];
      _gaq.push(['_setAccount', 'UA-2268134-32']);
      _gaq.push(['_trackPageview']);
      (function() {
        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
      })();
    </script>
<div id="energy">
  <div class="energybar"><div class="energybar2" style="display: none">&nbsp;</div></div>
  <div class="current">3</div>
  <div style="display: none" class="more">more in <span id="energy_countdown"></span></div>
  <span class="ico"><img src="/images/icons/set_1/energy.png"></span>
  <a class="buy" href="energy"><img src="/images/icons/set_1/energy_plus.png"></a>
</div>
<script>
var nrg_less = 89;
var nrg_now = 3;
var nrg_max = 20;
pct = nrg_now / nrg_max * 75;
if (pct > 75) { pct = 75; }
jQ('#energy .energybar2').css({'width':pct+'px'});
energy_less();
jQ('#energy .more').show();
function energy_down() {
  if (nrg_now == nrg_max) { nrg_less = 120;  jQ('#energy .more').delay(500).slideDown(); }
  nrg_now--;
}

function energy_less() {
  jQ('#energy .current').html(nrg_now);
  
  pct = nrg_now / nrg_max * 75;
  if (pct > 75) { pct = 75; }
  if (pct > 0) { jQ('#energy .energybar2').show(); }
  if (pct > 0) { jQ('#energy .energybar2').animate({'width':pct+'px'}, 120); }
        
  if (nrg_less > 1) {
    nrg_less--;
    min = Math.floor(nrg_less / 60);
    sec = nrg_less % 60;
    if (min > 99) min = 99;
    if (min < 10) min = '0'+min;
    if (sec < 10) sec = '0'+sec;
    jQ('#energy_countdown').html(min+':'+sec);
    window.setTimeout(energy_less, 1000);
  } else {
    if (nrg_now < nrg_max) {
      jQ('#energy_countdown').html('00:00');
      nrg_now++;
      if (nrg_now < nrg_max) {
        nrg_less = 120;
        jQ('#energy .more').delay(100).slideUp().delay(100).slideDown();
      } else {
        jQ('#energy .more').delay(100).slideUp();
      }
    } else {
      jQ('#energy .more').delay(100).slideUp();
    }
    window.setTimeout(energy_less, 350);
  }
}

</script>
  </body>
</html>

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  

×
×
  • Create New...