You need to sign in to do that
Don't have an account?
Shwetal Desai
Open Visual Force page as a Popup
Hi
I have created two visual force page, one named "giftcert" and another is "invoice"
I have created one command button on "invoice" page and click of that command button i want to open "giftcert" page as a pop up page.
VF Code:
<apex:page Controller="POSInvoice" tabStyle="POS__c">
<!-- Start page content -->
<script type="text/javascript">
function openpopup()
{
window.open("/apex/giftcert","GiftCertificate","width=670,height=480"); //+pageURL,"Sell Gift Certificate","height=250,width=350");
}
</script>
<apex:form >
<apex:commandButton action="openpopup()" value="Sell Gift Certificate"/>
</apex:form>
<!-- Start page content -->
<script type="text/javascript">
function openpopup()
{
window.open("/apex/giftcert","GiftCertificate","width=670,height=480"); //+pageURL,"Sell Gift Certificate","height=250,width=350");
}
</script>
<apex:form >
<apex:commandButton action="openpopup()" value="Sell Gift Certificate"/>
</apex:form>
but its not working..
any suggestion? any idea?
try:
Thanks Mark Young,
I tried it.. but it shows me following error message.
Illegal view ID openpopup();return false;. The ID must begin with /
Hey its done
Thanks a lot Mark for helping me
that error is due to wrong syntax of window.open() in javascript.
Thanks again