Today's Posts Follow Us On Twitter! TFL Members on Twitter  
Forum search: Advanced Search  
Navigation
Marketplace
  Members Login:
Lost password?
  Forum Statistics:
Forum Members: 24,254
Total Threads: 80,792
Total Posts: 566,472
There are 2123 users currently browsing (tf).
 
  Our Partners:
 
  TalkFreelance     Design and Development     HTML/XHTML/DHTML/CSS :

Creating a Fixed size window?

Thread title: Creating a Fixed size window?
Closed Thread    
    Thread tools Search this thread Display Modes  
11-16-2005, 02:06 AM
#1
Stan is offline Stan
Status: Member
Join date: Aug 2005
Location:
Expertise:
Software:
 
Posts: 269
iTrader: 0 / 0%
 

Stan is on a distinguished road

Send a message via AIM to Stan

  Old  Creating a Fixed size window?

I want to create a window thats like 300 pixels wide, and if possible make it a generic template so that i can use an include for a .txt file or something and just have all of them look the same.

If you can understand that can anyone help me on a path to creating this?

example: abercrombie.com under privacy policy a window like that for secondary information.

11-16-2005, 02:55 AM
#2
Dray is offline Dray
Dray's Avatar
Status: Request a custom title
Join date: Sep 2005
Location: Texas
Expertise:
Software:
 
Posts: 1,139
iTrader: 0 / 0%
 

Dray is on a distinguished road

  Old

Simple mate

function NewWindow(loadfile) {
h="300";
w="300";
file = "misc.php?load=" + loadfile;
win = window.open(file,"win","height="+h+",width="+w+"re sizable=no,scrollbars=no");
if (parseInt(navigator.appVersion) >= 4) {
win.window.focus();
}
}

Put that in your header. Then basically you do

<a href="javascript:NewWindow('news.txt');">Click here to see latest news in new window</a>
<a href="javascript:NewWindow('privacy.txt');">Privac y policy</a>

Then in misc.php file you put
<?php
require($_GET[$load]);
?>

The only bad thing about this is that it can cause security holes such as people having certain files load...so what you can do to get around this is... check and see what is being asked to be loaded...so

<?php
if ($_GET[$load] == "news") require("news.txt");
elseif ($_GET[$load] == "privacy") require("privacy.txt");
?>

etc.. hope this helped

11-16-2005, 03:49 PM
#3
Stan is offline Stan
Status: Member
Join date: Aug 2005
Location:
Expertise:
Software:
 
Posts: 269
iTrader: 0 / 0%
 

Stan is on a distinguished road

Send a message via AIM to Stan

  Old

Thanks, hopefully I can get it all to work, im not too great with js/php yet so I may screw something up, Ill let you know how I did.

Thanks again

Closed Thread    


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

  Posting Rules  
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump:
 
  Contains New Posts Forum Contains New Posts   Contains No New Posts Forum Contains No New Posts   A Closed Forum Forum is Closed