Logo 
Search:

Sharepoint 2010 Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint 2010       RSS Feeds

Privacy Pop-up - SharePoint 2010

  Asked By: Harshita    Date: Jan 28    Category: Sharepoint 2010    Views: 881

I have created a dialog popup using jQuery for our internal privacy policy,
after the user clicks I agree, a cookie is created that will hide the dialog
for 30 days. This works great on a plain HTML page, but I'm having trouble
integrating it with SharePoint 2010. I have adding the links to the
reference files within the Head Tag of the masterpage. Where would be the
best place to add the javascript, and content div?
<link type="text/css"
href="/webelements/webelements/css/ui-lightness/jquery-ui-1.8.5.custom.css"
rel="stylesheet" />
<script type="text/javascript"
src="/webelements/js/jquery-1.4.2.min.js"></script>
<script type="text/javascript"
src="/webelements/js/jquery-ui-1.8.5.custom.min.js"></script>
<script type="text/javascript"
src="/webelements/js/jquery.cookie.js"></script>



<script type="text/javascript">
$(function() {
$("#privacy_popup").dialog({
bgiframe: true,
modal:true,
resizable:false,
autoOpen:false,
closeOnEscape: false,
height:440,
width:640,
close: function() {
$.cookie("privacypolicy", "closed", { expires: 30 });

},
buttons: {
Ok: function() {
$(this).dialog("close");
}
}
});

if ($.cookie("privacypolicy") == "closed"){
$("#privacy_popup").dialog("destroy");
}else{
$("#privacy_popup").dialog("open");
}
});

</script>

Share: 

 

No Answers Found. Be the First, To Post Answer.

 
Didn't find what you were looking for? Find more on Privacy Pop-up - SharePoint 2010 Or get search suggestion and latest updates.




Tagged: