html - URL-Encode javascript -


i'm trying url-encode...how this? syntax wrong ...

here code:

   <div class="post-btn-share"> <div class="addthis_toolbox addthis_default_style">     <div class="float-all">         <script>             var url = urlencode('http://mypage.com/visualizar_foto.php?img=55&user=2&xx=');             alert(url);             </script>         <iframe src="http://www.facebook.com/plugins/like.php?href=" + url + "&send=true&layout=standard&width=300&show_faces=true&action=like&colorscheme=light&font&height=80" frameborder="0" style="border:none;" scrolling="no" width="320" height="240"></iframe>         <div class="float-all">          </div>         <div class="float-all">          </div>     </div> 

try :

var url = encodeuricomponent('http://mypage.comvisualizar_foto.php?img=55&user=2&xx='); 

Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -