How to get current_user in Javascript?
-
I want to use the current_user value in javascript on wordpress page.
Current_user is required to use the IFRAME Tags.
How can I get this value?ex) Source Code on My Page
<script src=”https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js” type=”text/javascript”></script>
<script type=”text/javascript”>// <![CDATA[
$(document).ready(function(){
var encode_userid= window.btoa(‘[current_user’);
document.getElementById(“comeFrame”).src=”https://URL/user/loginSSO.crd?login_arg=” + encode_userid + “&page=list”;});
// ]]></script>
<iframe id=”comeFrame” style=”z-index: 0;” src=”” width=”690″ height=”810″ frameborder=”0″ scrolling=”no”></iframe>
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘How to get current_user in Javascript?’ is closed to new replies.