[TANYA] Gimana Cara Pasang Aplikasi Seperti Ini di Blog?

Discussion in 'Blogger' started by Murni Riyanti, Jun 28, 2015.

  1. Murni Riyanti

    Murni Riyanti New Member

    Joined:
    Jun 2, 2015
    Messages:
    13
    Likes Received:
    1
    Trophy Points:
    3
    Mau tanya sama teman-teman yang jago koding, gimana yaa caranya pasang aplikasi kalkulator kehamilan di blog? Contohnya kayak di blog ini _http: //ash-shiddiqagencyselayar.blogspot.com/2012/09/kalkulator-menghitung-usia-kehamilan.html_
    [​IMG]
    Selain blog itu juga masih banyak blog lain yang pasang aplikasi sejenis(sama persis).

    Pengin juga pasang aplikasi kayak gitu di blog saya.

    Buat yang bantu jawab makasih banget yaaa!
     
    Last edited by a moderator: Jun 28, 2015
  2. ais elkiram

    ais elkiram Well-Known Member

    Joined:
    Feb 10, 2015
    Messages:
    1,296
    Likes Received:
    220
    Trophy Points:
    63
    Orang kebidanan yah mbak ? ... ane kaga tau, moga ajah bawah ane tau ...
     
  3. ziuma

    ziuma Well-Known Member

    Joined:
    May 23, 2014
    Messages:
    1,564
    Likes Received:
    240
    Trophy Points:
    63
    kalau saya sih bukan ahli coding, kalau copas iya

    nyari codenya kayaknya susah mbak
    mungkin ini salah satu codenya

    ini kode yang lain mbak (yang Indonesia ngak ketemu)
    tinggal edit jadi bahasa Indonesia aja
     
    Last edited: Jun 28, 2015
  4. Ardilas

    Ardilas Super Level

    Joined:
    Feb 18, 2013
    Messages:
    4,243
    Likes Received:
    317
    Trophy Points:
    83
    Google+:
    Masukkan ini ke dalam postingan (rubah dulu penulisan ke mode HTML)
    Code:
    <script charset="utf-8" language="JavaScript1.2" type="text/javascript">
    <!-- Asli:  Ronnie T. Moore, Editor -->
    <!-- The JavaScript Source!! http://javascript.internet.com -->
    <!-- Begin
    function isValidDate(dateStr) {
    var datePat = /^(\d{1,2})(\/|-)(\d{1,2})\2(\d{4})$/;
    var matchArray = dateStr.match(datePat);
    if (matchArray == null) {
    alert("Format tanggal salah.")
    return false;
    }
    month = matchArray[1];
    day = matchArray[3];
    year = matchArray[4];
    if (month < 1 || month > 12) {
    alert("Bulan harus antara 1 dan 12.");
    return false;
    }
    if (day < 1 || day > 31) {
    alert("Tanggal harus antara 1 dan 31.");
    return false;
    }
    if ((month==4 || month==6 || month==9 || month==11) && day==31) {
    alert("Bulan "+month+" tidak sampai 31 hari!")
    return false;
    }
    if (month == 2) {
    var isleap = (year % 4 == 0 && (year % 100 != 0 || year % 400 == 0));
    if (day>29 || (day==29 && !isleap)) {
    alert("Pebruari " + year + " tidak sampai " + day + " hari!");
    return false;
       }
    }
    return true;
    }
    function dispDate(dateObj) {
    month = dateObj.getMonth()+1;
    month = (month < 10) ? "0" + month : month;
    day   = dateObj.getDate();
    day = (day < 10) ? "0" + day : day;
    year  = dateObj.getYear();
    if (year < 2000) year += 1900;
    return (day + " - " + month + " - " + year);
    }
    function pregnancyCalc(pregform) {
    menstrual = new Date();
    ovulation = new Date();
    duedate = new Date();
    tri1 = new Date();
    tri2 = new Date();
    tri3 = new Date();
    senam = new Date();
    siap = new Date();
    today = new Date();
    cycle = 0;
    menstruasi = pregform.bulan.value + "/" + pregform.tanggal.value + "/" + pregform.tahun.value
    if (isValidDate(menstruasi)) {
    menstrualinput = new Date(menstruasi);
    menstrual.setTime(menstrualinput.getTime())
    }
    else return false;
    cycle = (pregform.cycle.value == "" ? 28 : pregform.cycle.value);
    if (pregform.cycle.value != "" && (pregform.cycle.value < 22 || pregform.cycle.value > 45)) {
    alert("Siklus haid terlalu pendek / terlalu panjang \n"
    + "Penghitungan mungkin tidak akurat, \n"
    + "walaupun demikian penghitungan tetap kami lakukan. ");
    }
    ovulation.setTime(menstrual.getTime() + (cycle*86400000) - (14*86400000));
    pregform.conception.value = dispDate(ovulation);
    duedate.setTime(ovulation.getTime() + 266*86400000);
    pregform.duedate.value = dispDate(duedate);
    // sets tri1 First Trimester ends 13 weeks + 3 days   ~   Second Trimester ends 26 weeks + 6 day
    tri1.setTime(menstrual.getTime());
    pregform.tri1.value = dispDate(tri1);
    // sets tri2
    tri2.setTime(ovulation.getTime() + 81*86400000);
    pregform.tri2.value = dispDate(tri2);
    // sets tri3
    tri3.setTime(ovulation.getTime() + 175*86400000);
    pregform.tri3.value = dispDate(tri3);
    // sets siap
    siap.setTime(ovulation.getTime() + 245*86400000);
    pregform.siap.value = dispDate(siap);
    // sets usia kehamilan to 14 + 266 (pregnancy time) - time left
    var fetalage = 14 + 266 - ((duedate - today) / 86400000);
    weeks = parseInt(fetalage / 7);
    days = Math.floor(fetalage % 7);
    fetalage = weeks + " minggu" + " " + days + " hari";
    pregform.fetalage.value = fetalage;
    return false;
    }
    //  End -->
    </script>
    
    <br />
    <form onsubmit="return pregnancyCalc(this);">
    <center>
    <table border="1" bordercolor="#006699"><tbody>
    <tr>  <td>Hari Pertama Haid Terakhir<br />
    <br />
    (HPHT)</td>   <td><input maxlength="5" name="tanggal" size="5" type="text" value="" /> Tanggal (DD)<br />
    <br />
    <input maxlength="5" name="bulan" size="5" type="text" value="" /> Bulan (MM)<br />
    <br />
    <input maxlength="5" name="tahun" size="5" type="text" value="" /> Tahun (YYYY)</td> </tr>
    <tr>  <td>Lama Siklus Haid Rata-rata<br />
    <br />
    <i>Boleh tidak diisi</i></td>  <td><input maxlength="5" name="cycle" size="5" type="text" value="" /> (22 - 45 hari)<br />
    <br />
    *Umumnya 28 hari</td> </tr>
    <tr>  <td colspan="2"><div align="center">
    <input type="submit" value="Hitung!" />  </div>
    </td> </tr>
    <tr>  <td>Perkiraan Pembuahan</td><td><input name="conception" size="20" type="text" value="" /></td> </tr>
    <tr>  <td>Perkiraan Usia Janin</td><td><input name="fetalage" size="20" type="text" value="" /></td> </tr>
    <tr>  <td>Perkiraan Siap Dilahirkan</td><td><input name="siap" size="20" type="text" value="" /></td> </tr>
    <tr>  <td>Perkiraan Tanggal Kelahiran</td><td><input name="duedate" size="20" style="background-color: #ffff66;" type="text" value="" /></td> </tr>
    <tr>  <td>Trimester Pertama</td><td><input name="tri1" size="20" type="text" value="" /></td> </tr>
    <tr>  <td>Trimester Kedua</td><td><input name="tri2" size="20" type="text" value="" /></td> </tr>
    <tr>  <td>Trimester Ketiga</td><td><input name="tri3" size="20" type="text" value="" /></td> </tr>
    </tbody></table>
    </center>
    </form>
    
     
  5. ziuma

    ziuma Well-Known Member

    Joined:
    May 23, 2014
    Messages:
    1,564
    Likes Received:
    240
    Trophy Points:
    63
    nah sudah terjawab dari den @Ardilas
    *bagus*
     
  6. Ardilas

    Ardilas Super Level

    Joined:
    Feb 18, 2013
    Messages:
    4,243
    Likes Received:
    317
    Trophy Points:
    83
    Google+:
    Ngomong-ngomong kalau kita bantu jawab dapat hadiah apa nih?
     
  7. KangAndre

    KangAndre Member

    Joined:
    Jan 25, 2014
    Messages:
    10,253
    Likes Received:
    2,716
    Trophy Points:
    413
    cek kehamilan gratis... :D
     
  8. Ardilas

    Ardilas Super Level

    Joined:
    Feb 18, 2013
    Messages:
    4,243
    Likes Received:
    317
    Trophy Points:
    83
    Google+:
    :D KangAndre mau ikut juga?
     
  9. spg event

    spg event Member

    Joined:
    Dec 31, 2014
    Messages:
    482
    Likes Received:
    50
    Trophy Points:
    28
    Google+:
    sepanjang masa gratis cek nya:D
     
  10. opiektidung

    opiektidung Member

    Joined:
    Feb 13, 2013
    Messages:
    128
    Likes Received:
    5
    Trophy Points:
    18
    Lumayan juga kalau cek kehamilam gratis sampai 7 turunan 10 tanjakan :)
     
  11. ziuma

    ziuma Well-Known Member

    Joined:
    May 23, 2014
    Messages:
    1,564
    Likes Received:
    240
    Trophy Points:
    63
    habis membantu jawab masalah, terus berharap ada hadiah

    [​IMG]
     
  12. Murni Riyanti

    Murni Riyanti New Member

    Joined:
    Jun 2, 2015
    Messages:
    13
    Likes Received:
    1
    Trophy Points:
    3
    makasih buat semua teman, teman yang udah bantu jawab. Khusus untuk Bang @Ardilas saya udah coba scripnya dan work. Tapi mau nanya lagi boleh yaaa????!!!!

    Saya pasang di blogger WORK dan bagus. Tapi saat saya pasang di blog dengan platform CMS wordpress ada masalah Bang, kalo pasang di sidebar bisa. Masalahnya pas pasang di dalam postingan kalkulator tidak bisa bekerja dengan baik. Itu kenapa? Adakah solusinya biar script ini bisa dipasang di dalam postingan blog wordpress? Terimakasih sebelum dan sesudahnya.
     
  13. Ardilas

    Ardilas Super Level

    Joined:
    Feb 18, 2013
    Messages:
    4,243
    Likes Received:
    317
    Trophy Points:
    83
    Google+:
    Taruh javascript di widget
    Code:
    <script charset="utf-8" language="JavaScript1.2" type="text/javascript">
    <!-- Asli:  Ronnie T. Moore, Editor -->
    <!-- The JavaScript Source!! http://javascript.internet.com -->
    <!-- Begin
    function isValidDate(dateStr) {
    var datePat = /^(\d{1,2})(\/|-)(\d{1,2})\2(\d{4})$/;
    var matchArray = dateStr.match(datePat);
    if (matchArray == null) {
    alert("Format tanggal salah.")
    return false;
    }
    month = matchArray[1];
    day = matchArray[3];
    year = matchArray[4];
    if (month < 1 || month > 12) {
    alert("Bulan harus antara 1 dan 12.");
    return false;
    }
    if (day < 1 || day > 31) {
    alert("Tanggal harus antara 1 dan 31.");
    return false;
    }
    if ((month==4 || month==6 || month==9 || month==11) && day==31) {
    alert("Bulan "+month+" tidak sampai 31 hari!")
    return false;
    }
    if (month == 2) {
    var isleap = (year % 4 == 0 && (year % 100 != 0 || year % 400 == 0));
    if (day>29 || (day==29 && !isleap)) {
    alert("Pebruari " + year + " tidak sampai " + day + " hari!");
    return false;
       }
    }
    return true;
    }
    function dispDate(dateObj) {
    month = dateObj.getMonth()+1;
    month = (month < 10) ? "0" + month : month;
    day   = dateObj.getDate();
    day = (day < 10) ? "0" + day : day;
    year  = dateObj.getYear();
    if (year < 2000) year += 1900;
    return (day + " - " + month + " - " + year);
    }
    function pregnancyCalc(pregform) {
    menstrual = new Date();
    ovulation = new Date();
    duedate = new Date();
    tri1 = new Date();
    tri2 = new Date();
    tri3 = new Date();
    senam = new Date();
    siap = new Date();
    today = new Date();
    cycle = 0;
    menstruasi = pregform.bulan.value + "/" + pregform.tanggal.value + "/" + pregform.tahun.value
    if (isValidDate(menstruasi)) {
    menstrualinput = new Date(menstruasi);
    menstrual.setTime(menstrualinput.getTime())
    }
    else return false;
    cycle = (pregform.cycle.value == "" ? 28 : pregform.cycle.value);
    if (pregform.cycle.value != "" && (pregform.cycle.value < 22 || pregform.cycle.value > 45)) {
    alert("Siklus haid terlalu pendek / terlalu panjang \n"
    + "Penghitungan mungkin tidak akurat, \n"
    + "walaupun demikian penghitungan tetap kami lakukan. ");
    }
    ovulation.setTime(menstrual.getTime() + (cycle*86400000) - (14*86400000));
    pregform.conception.value = dispDate(ovulation);
    duedate.setTime(ovulation.getTime() + 266*86400000);
    pregform.duedate.value = dispDate(duedate);
    // sets tri1 First Trimester ends 13 weeks + 3 days   ~   Second Trimester ends 26 weeks + 6 day
    tri1.setTime(menstrual.getTime());
    pregform.tri1.value = dispDate(tri1);
    // sets tri2
    tri2.setTime(ovulation.getTime() + 81*86400000);
    pregform.tri2.value = dispDate(tri2);
    // sets tri3
    tri3.setTime(ovulation.getTime() + 175*86400000);
    pregform.tri3.value = dispDate(tri3);
    // sets siap
    siap.setTime(ovulation.getTime() + 245*86400000);
    pregform.siap.value = dispDate(siap);
    // sets usia kehamilan to 14 + 266 (pregnancy time) - time left
    var fetalage = 14 + 266 - ((duedate - today) / 86400000);
    weeks = parseInt(fetalage / 7);
    days = Math.floor(fetalage % 7);
    fetalage = weeks + " minggu" + " " + days + " hari";
    pregform.fetalage.value = fetalage;
    return false;
    }
    //  End -->
    </script>
    Taruh script form di postingan
    Code:
    <form onsubmit="return pregnancyCalc(this);">
    <center>
    <table border="1" bordercolor="#006699"><tbody>
    <tr>  <td>Hari Pertama Haid Terakhir<br />
    <br />
    (HPHT)</td>   <td><input maxlength="5" name="tanggal" size="5" type="text" value="" /> Tanggal (DD)<br />
    <br />
    <input maxlength="5" name="bulan" size="5" type="text" value="" /> Bulan (MM)<br />
    <br />
    <input maxlength="5" name="tahun" size="5" type="text" value="" /> Tahun (YYYY)</td> </tr>
    <tr>  <td>Lama Siklus Haid Rata-rata<br />
    <br />
    <i>Boleh tidak diisi</i></td>  <td><input maxlength="5" name="cycle" size="5" type="text" value="" /> (22 - 45 hari)<br />
    <br />
    *Umumnya 28 hari</td> </tr>
    <tr>  <td colspan="2"><div align="center">
    <input type="submit" value="Hitung!" />  </div>
    </td> </tr>
    <tr>  <td>Perkiraan Pembuahan</td><td><input name="conception" size="20" type="text" value="" /></td> </tr>
    <tr>  <td>Perkiraan Usia Janin</td><td><input name="fetalage" size="20" type="text" value="" /></td> </tr>
    <tr>  <td>Perkiraan Siap Dilahirkan</td><td><input name="siap" size="20" type="text" value="" /></td> </tr>
    <tr>  <td>Perkiraan Tanggal Kelahiran</td><td><input name="duedate" size="20" style="background-color: #ffff66;" type="text" value="" /></td> </tr>
    <tr>  <td>Trimester Pertama</td><td><input name="tri1" size="20" type="text" value="" /></td> </tr>
    <tr>  <td>Trimester Kedua</td><td><input name="tri2" size="20" type="text" value="" /></td> </tr>
    <tr>  <td>Trimester Ketiga</td><td><input name="tri3" size="20" type="text" value="" /></td> </tr>
    </tbody></table>
    </center>
    </form>

    Mungkin ada teman-teman lain pengguna WP yang bisa bantu, barangkali semua script bisa ditaruh di postingan tanpa perlu di Widget.
     
    Last edited: Jun 29, 2015
  14. jamtangan77

    jamtangan77 New Member

    Joined:
    Jun 21, 2015
    Messages:
    19
    Likes Received:
    2
    Trophy Points:
    3
  15. keboijo

    keboijo Member

    Joined:
    Jun 30, 2015
    Messages:
    23
    Likes Received:
    1
    Trophy Points:
    8
    haduhhh mumet nek kuiiiii platform htmlnya :confused::confused:
     
  16. babolonly

    babolonly Member

    Joined:
    Feb 9, 2013
    Messages:
    541
    Likes Received:
    34
    Trophy Points:
    28
    Google+:
    ah..saya nggak ngerti yang beginian. hihihi..
     
  17. Murni Riyanti

    Murni Riyanti New Member

    Joined:
    Jun 2, 2015
    Messages:
    13
    Likes Received:
    1
    Trophy Points:
    3
    sudah saya coba dan work, makasih Mas @Ardilas
     
  18. Murni Riyanti

    Murni Riyanti New Member

    Joined:
    Jun 2, 2015
    Messages:
    13
    Likes Received:
    1
    Trophy Points:
    3
    buat yang lain yang udah ikut komentar, makasih juga yaaa
     
  19. jainal

    jainal Member

    Joined:
    Jun 5, 2015
    Messages:
    21
    Likes Received:
    1
    Trophy Points:
    8
    Banyak Pahal bagi yang mau bantu gan......!
     
  20. dhonitrianto

    dhonitrianto New Member

    Joined:
    Apr 16, 2015
    Messages:
    8
    Likes Received:
    1
    Trophy Points:
    3
    mantap gan,..makasih akhirnya ane nemu juga yang kek gini, kuranglebih hasilnya seperti ini, silahkan di cek gan kalkulator kehamilan saathidupsehat.com/kalkulator-kehamilan-online-terbaru/
     
Loading...

Share This Page