javascript - Adding skype button with variable user -
i have site creates profile page on fly. want add skype button page each of profiles - each profile having different id.
i have found code:
<script type="text/javascript" src="http://www.skypeassets.com/i/scom/js/skype-uri.js"></script> <div id="skypebutton_call_skypeid_1"> <script type="text/javascript"> skype.ui({ "name": "call", "element": "skypebutton_call_skypeid_1", "participants": ["skypeid"], "imagesize": 32 }); </script> this pasted php file @ moment.
i need change skypeid on fly - can html bits easy enough since have php variable skypeid.
how pass variable javascript?
<script type="text/javascript" src="http://www.skypeassets.com/i/scom/js/skype-uri.js"></script> <div id="skypebutton_call_skypeid_1"> <script type="text/javascript"> skype.ui({ "name": "call", "element": "skypebutton_call_skypeid_1", "participants": ["<?php echo $skypeid ?>"], "imagesize": 32 }); </script> should need. if cant access script directly define globa javascript var before executing script , pass script
Comments
Post a Comment