|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
OnLoad Functions
I am trying to change the attributes of a page when it loads:
<body onLoad="resizeTo(560,500);moveTo(screen.width/5,screen.height/5);self(toolbar=no, directories=no, location=no, status=no, menubar=no, resizable=no, scrollbars=no titlebar=no)"> This will resize the window and move it, but the other stuff doesn't work. What am I doing wrong? |
|
#2
|
||||
|
||||
|
Hi,
You cannot do that to existing windows. You can only remove those for popup windows. I have researched this before. Danny |
|
#3
|
|||
|
|||
|
I figured it out, it was relatively easy... See Below:
Place this code on Page1.asp, create an exact copy of page1.asp and name it Page2.asp, remove the body tag from page2.asp <SCRIPT language="JavaScript"> function Page2(TheId) { h=375; w=475; mypage = "Page2.asp?Id=" + TheId; myscroll="no"; myname = "notes"; myresize = "no"; mytitle = "no"; LeftPosition = (screen.width) ? (screen.width-w)/2 : 0; TopPosition = (screen.height) ? (screen.height-h)/2 : 0; settings = 'height='+h+',width='+w+',top='+TopPosition+',left ='+LeftPosition+',titlebar='+mytitle+',resizable,s crollbars='+myscroll ; noteswin = window.open(mypage,myname,settings) noteswin.focus(); } </script> <body onLoad="javascript:Page2('<%=rs("Id")%>');"> - This is placed after the SQL Connection String- Simple! Thanks for everyone's input. |
|
#4
|
||||
|
||||
|
This is a new window you are opening right? I thought you wanted to modify the existing parent window; remove toolbars of parent window. Sorry!
|
![]() |
| Viewing: ASP Free Forums > Programming > HTML, JavaScript And CSS Help > OnLoad Functions |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|