Saturday, January 19, 2013
CRM 2011 Button To Open New Page
Problem:
How do i write html in javascript and open the webpage.
Solution:
eg. Javascript
function newPage(){
var newWin = open('url','_blank','fullscreen=yes,directories=no,menubar=no,location=no,toolbar=no,status=no,scrollbars=yes,resizable=yes');
newWin.document.open();
newWin.document.write('<HTML>');
newWin.document.write('<HEAD>');
newWin.document.write('<style type="text/css">');
newWin.document.write('#map {');
newWin.document.write('height: 100%;');
newWin.document.write('width: 100%;');
newWin.document.write('border: 1px solid #000;');
newWin.document.write('}');
newWin.document.write('</style>');
newWin.document.write('</HEAD>');
newWin.document.write('<BODY>');
newWin.document.write('<iframe id="map" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://www.google.com&output=embed"></iframe>');
newWin.document.write('</BODY>');
newWin.document.write('</HTML>');
newWin.document.close();
}
Call these function under any trigger point. As for me i used it under onclick event from a button.
No comments:
Post a Comment