How to open web application in a new window after login in JS?
Hello to all,
I am last year B.Sc.IT student. As a part of my syllabus I am working on live project where I am using java script. I am working on web application. In my project I want to open web application in a new window after login. The size of that window has to be (1280, 800). I don't know how to do it. I never use Javascript in details. Can anyone tell me how to open web application in a new window after login in JS?
Thanks in advanced.
Re: How to open web application in a new window after login in JS?
You have to use window.open method in your code to open web application in a new window after login. To do this you have to use following syntax:
Code:
open (URL, windowName[, windowFeatures])
URL:The URL of the page to open in the new window.
windowName : The name of that window.
windowFeatures: features of that window like status bar, address bar etc.
You have to use following code to opens a new browser window with standard features.
Code:
window.open ("http://wwwtecharena.com","mywindow");
Re: How to open web application in a new window after login in JS?
You have to use submit button in your page to go to next window. When some one click on that button, your new window will automatically open. You also have to process login form before going to new window. To do this you have to first verify that whether it is right information or not. After verifying information you have to open new window.
Re: How to open web application in a new window after login in JS?
Hey it is very simple to do this. You have to use following simple code to open web application in a new window after login. It is very simple to do this. In the following code I have used window.open method to do this. I also have set width to the 1280 and height to the 800. I also have give name of the window to "My window"
Code:
<input type="buttons" value="My window" onclick="window.open('http://www.techarena.com','popup','width=1280,height=800')" />
Re: How to open web application in a new window after login in JS?
I have use following code and it is working fine.
Code:
<script types="text/javascript">
function Resize()
{
window.opens("home.phps","_blanks","toolbars=no","locations=yes","directoriess=no","statuss=no","menubars=no","scrollbarss=no","resizeables=no","copyhistorys=yes, widths=1280, heighst=800");
To get proper effect you have to use Internet explorer, because you will get proper window size. In the above code I have set home.phps to the blank.
Re: How to open web application in a new window after login in JS?
You have to use 3 parameter in your window.open method and these are as follows.
"toolbars=no,locations=yes" not "toolbars=no","locations=yes"
You have to use following code to get this result.
Code:
windows.open("homes.php","_blanks","toolbars=no,locations=yes,directoriess=no,statuss=no,menubar=no,scrollbars=no,res izeable=no,copyhistorys=yes, widths=1280, heights=800");