javascript - how to make the parent window blank during the onload? -


When I type URLs in the browser, login.jsp is evaluated and with a hair window (Dynamic Toolbar) ) Is opened and the parent window closes.

I want to do that when I type urls in the browser and click and I do not want to display any info on the login.jsp page to be void in the parent window. I

I have no idea of ​​using another jsp ...

Someone can help me understand codes or ideas ....

Login. Js file

  function focus () {/ p> 

window.onload = ifocus (); Document.LoginFB.strUserid.value = ""; Document.LoginFB.strPassword.value = ""; Document.LoginFB.strUserid.focus (); } Function ifocus () {if (Window.opener) {window.opener = 'top'; Window.close (); Window.open ('http: // localhost: 8080 / jsp / login.jsp', 'tr', 'width = 1250 height = 700, toolbar = no, location = not, directory = not, condition = no, menubar = No, hbar = yes, scrollbar = yes, copyHostry = no, scrolling = yes, resizable = yes'); } And {return; }

Login. Jsp

  & lt; Body onload = javascript: focus ()>  

I do not get the dot onload function, but I will do this:

  function focus () (if (! Window.opener) {window.open ('http: // localhost: 8080 / jsp / login.jsp', 'tr', 'width = 1250, Height = 700, toolbar = no, location = not, directory = no, position = no, menu bar = no, hbar = yes, scrollbar = yes, copyhearty = no, scrolling = yes, resizable = yes'); Document.getElementsByTagName ( "Body") [0] .innerHTML = ""; // or window.close (); // But then you will receive a warning Can be ...} and {// child documents. Login FB.strusserid.value = ""; document.LoginFB.strPassword.value = ""; document.LoginFB.strUserid.focus (); return;}} & Lt; body onload = javascript: focus () & gt;  

Comments

Popular posts from this blog

oracle - The fastest way to check if some records in a database table? -

php - multilevel menu with multilevel array -

jQuery UI: Datepicker month format -