You need to sign in to do that
Don't have an account?

action and onclick attributes on commandLink
Hi,
I have a pop up window which popups a visual force page. I am trying to close this popup and reload my original page when some action is done as follows
<script>
function closeSearchWindow()
{
window.close();
}
</script>
<apex:commandLink value="Attach" action="{!attach}" onclick="closeSearchWindow();">
<apex:param assignTo="{!myclient}" value="{!location.id}"/>
</apex:commandLink>
But this is not working. Is there any other way to do this.
Thanks,
Nimdhar
Message Edited by nimdhar on 04-29-2008 07:22 AM
I have a pop up window which popups a visual force page. I am trying to close this popup and reload my original page when some action is done as follows
<script>
function closeSearchWindow()
{
window.close();
}
</script>
<apex:commandLink value="Attach" action="{!attach}" onclick="closeSearchWindow();">
<apex:param assignTo="{!myclient}" value="{!location.id}"/>
</apex:commandLink>
But this is not working. Is there any other way to do this.
Thanks,
Nimdhar
Message Edited by nimdhar on 04-29-2008 07:22 AM
All Answers
I am trying different ways but none is working. Can anyone please tell me whether having action attribute and onclick attribute on the commandLink doesn't work?
Thanks,
Nimdhar
I have both action and onclick attributes in my commandlink. I think that is the reason it is not working. But I don't know how to solve it. Clicking on my command link must call a action method in the controller and after it is executed the javascript function must execute and close the window.
Thanks,
Nimdhar
By using oncomplete attribute in commandlink I can close the pop up but the original page does not reload automatically.
Can anyone please help.
Thanks