function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
anitha12anitha12 

popup using jquery

Hi,

I am new to Jquery. Can any one pls help me how to write code for getting popup window and for closing popup.



Thanks,
Anitha
Nilesh Jagtap (NJ)Nilesh Jagtap (NJ)
HI Anitha,


http://www.valnavjo.com/blog/modal-dialog-on-a-standard-salesforce-page/ (http://www.valnavjo.com/blog/modal-dialog-on-a-standard-salesforce-page/ might help you. Thanks. N.J) might help you.

Thanks.
N.J
Sonam_SFDCSonam_SFDC
In case you are using a visualforce page where you wish to show this popup, check the code on the following blog:
http://anuragsfdc.blogspot.sg/2014/03/yesno-confirm-pop-message-using-jquery.html


anitha12anitha12
Thank you Sonam.

It is working for me. But it is showing only alert box. I need popup box. can you please help me.

Thanks,
Anitha.
anitha12anitha12
Hi Sonam,

when the popup is opened, i need to show my page in that popup.I included my page here. but it is not working. Pls help me.

function yesFunction(objid){
        // Write you code/logic of js here...
        var url="/apex/RF_Request_Dependentpopuppage?&objectId="+objid;
        alert("call Apex method.");
Grazitti TeamGrazitti Team
Hi Anitha,

I think code below will be helpful for you.

                     
var newWin=null; 
    function openLookupPopup(name, id, cntId, cntName)
     {
		console.log(name + '<>' + id + '<>' + cntId + '<>' + cntName);
		var contId = document.getElementById(cntId).value;
		document.getElementById(cntId).value = '';
		document.getElementById(cntName).value = '';                   
		                  
		var url="/apex/CustomLookupPopup?namefield=" + name + "&idfield=" + id;
		newWin=window.open(url, 'Popup','height=600,width=700,left=100,top=100,resizable=no,scrollbars=yes,toolbar=no,status=no,location=no');
		if (window.focus)                                        
			newWin.focus();                                                               
		return false;
	}                             
	function closeLookupPopup()
	{
	   if (null!=newWin)                                      
		  newWin.close();                                        
	}
Please mark this as best answer if u think it's a solution.

Thanks!