JavaScript for Check for Published Mode of current aspx page

<div id=”contentarea”>
<!– Start implementation for Published Mode –>
<script type=”text/javascript” >
function CheckForPublishing()
var x=document.getElementById(“Ribbon.PublishTab-title”);


function LoadScript() {
var ss = document.createElement(‘script’);
var scr = ‘alert(“Well Done Amjad!!…Its working…”);’;
ss.text = scr;
ss.setAttribute(“type”, “text/javascript”);
//ss.setAttribute(“src”, ““);
var hh = document.getElementsByTagName(‘head’)[0];


<!– End implementation for Published Mode  –>


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s