www.webdeveloper.com
Results 1 to 2 of 2

Thread: how to add scroll bars etc. via check box to a new window?

  1. #1
    Join Date
    Mar 2013
    Posts
    4

    how to add scroll bars etc. via check box to a new window?

    this script opens a new page into a new window or in the current window... how would i add something like a scroll to the window if the check box is checked?

    HTML Code:
    <!DOCTYPE html>
    <html>
      <head>
        <meta content="text/html; charset=ISO-8859-1" http-equiv="content-type">
        <title></title>
        
        <script>
    			
    			  
    			 function go(){
    		
    				var  myWindow;
    				var urlValue = document.getElementById("urlValue").value;
    					
    					//radio buttons
    					if(yes.checked){
    					
    						myWindow = window.open(urlValue);
    					}
    					
    					else if (no.checked ){
    						myWindow = window.open(urlValue, "_self"); 
    						}
    						
    					
    						
    					//checkbox loop
    					/*
    					for (i=0; i<document.myForm.checkGroup.length; i++){
    						if (document.myForm.checkGroup[i].checked==true)
    						alert("Checkbox at index "+i+" is checked!")
    						}
    					*/
    			  
    			  }
        
        </script>
       
      </head>
      <body>
        <form name="myForm">
          
    	  <p><label>Enter URL with http:// here: </label> <input id="urlValue" type="text"></p>
          <p><label>Would you like to open a new window?<br>
              <input name="yesNo" id="yes" type="radio">Yes<br>
              <input name="yesNo" id ="no" type="radio">No </label></p>
          <p><label>Other Options</label> <br>
            <input name = "checkGroup" id="fullScreen" type="checkbox">Full Screen<br>
            <input name = "checkGroup" id="scrollBar" type="checkbox">Scroll Bar<br>
            <input name = "checkGroup" id="statusBar" type="checkbox">Status Bar<br>
            <input name = "checkGroup" id="toolBar" type="checkbox">Tool Bar<br>
          </p>
          <p><input id="goButton" value="GO" type="button" onclick = "go()"></p>
        </form>
        
      </body>
    </html>

  2. #2
    Join Date
    Mar 2011
    Posts
    1,145
    Search on "javascript window.open chrome scrollbars".
    Rick Trethewey
    Rainbo Design

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles