Tuesday, 16 October 2012

To write a complete HTML structure in a new window


      function ShowDatePopUp()
        {   
         alert("hello");
         newwindow= window.open('','name','location=1,status=1,scrollbars=1,height=300,width=300');
         newwindow.moveTo(0, 0);
         newwindow.document.write('<html><head><title>');
         newwindow.document.write('Date Window');
         newwindow.document.write('</title></head>');
         newwindow.document.write('<BODY><form>');
      
        newwindow.document.write('<label for='TxtDate'>Enter Date </label>');
        newwindow.document.write('<input type='text' id='DateId' name='TxtDate'/>');

        newwindow.document.write('<input type='submit' value='Submit' class='SubmitButton'/>');
         newwindow.document.write('</form></BODY></html>');
         newwindow.document.close();
        
        
        }
         
         
         
      function ShowDateRangePopUp()
        {{   
         alert("hello");
         newwindow= window.open('','name','location=1,status=1,scrollbars=1,height=300,width=300');
         newwindow.moveTo(0, 0);
         newwindow.document.write('<html><head><title>');
         newwindow.document.write('Date Window');
         newwindow.document.write('</title></head>');
         newwindow.document.write('<BODY><form>');
      
        newwindow.document.write('<label for='TxtDate'>Enter Date </label>');
        newwindow.document.write('<input type='text' id='DateId' name='TxtDate'/>');

        newwindow.document.write('<input type='submit' value='Submit' class='SubmitButton'/>');
         newwindow.document.write('</form></BODY></html>');
         newwindow.document.close();
        
        
        }}

No comments:

Post a Comment