Advertisement
Guest User

Untitled

a guest
Feb 13th, 2016
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.17 KB | None | 0 0
  1. <apex:column >
  2. <apex:commandLink value="Click" action="{!meth1}" target="_blank" onclick="methodInJavascript();">
  3. <apex:param value="{!ll.Mobile__c}" assignTo="{!toMObile}" name="assignvalue" />
  4. </apex:commandlink>
  5. </apex:column>
  6.  
  7.  
  8. <apex:actionFunction action="{!meth2}" name="methodInJavascript" />
  9.  
  10. public PageReference meth2() {
  11. Pagereference p2 = new Pagereference('https://ap2.salesforce.com/a0A28000000okkjEAA/e');
  12. p2.setredirect(true);
  13.  
  14. return p2;
  15. }
  16.  
  17.  
  18. public PageReference meth1() {
  19. Pagereference p1 = new Pagereference('https://www.google.com');
  20. p1.setredirect(true);
  21.  
  22. return p1;
  23. }
  24.  
  25. <apex:column >
  26. <apex:commandLink value="Click" action="{!meth1}" target="_blank" onclick="window.open('https://ap2.salesforce.com/a0A28000000okkjEAA/e')">
  27. <apex:param value="{!ll.Mobile__c}" assignTo="{!toMObile}" name="assignvalue" />
  28. </apex:commandlink>
  29. </apex:column>
  30.  
  31. <apex:page controller="testController">
  32. <p onclick="openTwoWindows()">Click</p>
  33. <script type="text/javascript">
  34. function openTwoWindows()
  35. {
  36. window.open("http://www.google.com");
  37. window.open("http://www.google.com");
  38. }
  39. </script>
  40. </apex:page>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement