Monday, September 16, 2013

Add and remove componen HTml


berikut adalah syntax untuk menambah dan menghapus komponen html
    
    
    
    Add/Remove child: Javascript
    

    
    

    
    
UPDATE: There is a newer "up-to-date" version of this tutorial that can be found here: Add and Remove Elements with JavaScript (reprise).

Add Some Elements



Membatasi jumlah kata pada textarea

berikut adalah script untuk membatasi jumlah kata pada textarea.

esc_url

esc_url dapat digunakan pada form untuk url ke page yg lain, pada wordpress
contoh :
<form action="<?php echo esc_url( home_url( '/resume/' ) ); ?>" method="post" enctype="multipart/form-data" class="pure-form pure-form-aligned">

Friday, September 13, 2013

menampilkan pdf pada halaman web

langsung saja tanpa basa-basi
anda harus download file Disini
<html>
  <head>
     <title>PDFObject example</title>
     <script type="text/javascript" src="pdfobject.js"></script>
     <script type="text/javascript">
      window.onload = function (){
        var myPDF = new PDFObject({ url: "sample.pdf" }).embed();
      };
    </script>
  </head>
 
  <body>
    <p>It appears you don't have Adobe Reader or PDF support in this web
    browser. <a href="sample.pdf">Click here to download the PDF</a></p>
  </body>
</html>


source

check uncheck on checkbox

cara membuat check-uncheck pada sebuah checkbox.


penggunaan checkbox tanpa database: 

<input type="checkbox" name="b" <?php echo (isset($_POST['b'])?"value='y'":"value='n'")?> <?php echo (isset($_POST['b'])?"checked":"") ?>  />

tanpa database

<?php
        $s=$query[s];
    ?>
    <input type="checkbox" name="b" <?php echo (isset($s])?"value='y'":"value='n'")?> <?php echo (isset($_POST['b'])?"checked":"") ?>  />

mudah2an bermanfaat
source source