HTML, JavaScript And CSS Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgrammingHTML, JavaScript And CSS Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old February 8th, 2004, 10:08 AM
dclark127 dclark127 is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jan 2004
Posts: 23 dclark127 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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?

Reply With Quote
  #2  
Old February 9th, 2004, 07:17 PM
dcarva's Avatar
dcarva dcarva is offline
Contributing User
ASP Free Novice (500 - 999 posts)
 
Join Date: Jan 2003
Location: USA
Posts: 633 dcarva User rank is Lance Corporal (50 - 100 Reputation Level)dcarva User rank is Lance Corporal (50 - 100 Reputation Level)dcarva User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 9 h 18 m 20 sec
Reputation Power: 6
Hi,

You cannot do that to existing windows. You can only remove those for popup windows. I have researched this before.

Danny

Reply With Quote
  #3  
Old February 9th, 2004, 07:26 PM
dclark127 dclark127 is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jan 2004
Posts: 23 dclark127 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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.

Reply With Quote
  #4  
Old February 9th, 2004, 07:29 PM
dcarva's Avatar
dcarva dcarva is offline
Contributing User
ASP Free Novice (500 - 999 posts)
 
Join Date: Jan 2003
Location: USA
Posts: 633 dcarva User rank is Lance Corporal (50 - 100 Reputation Level)dcarva User rank is Lance Corporal (50 - 100 Reputation Level)dcarva User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 9 h 18 m 20 sec
Reputation Power: 6
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!

Reply With Quote
Reply

Viewing: ASP Free ForumsProgrammingHTML, JavaScript And CSS Help > OnLoad Functions


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway
Stay green...Green IT