Go Back   PCMech Forums > Help & Discussion > Web Design / Development

Need Some Help? Type Your Keywords Here:

Reply
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Old 06-04-2003, 02:20 AM   #1
Member (7 bit)
 
weaponmaster's Avatar
 
Join Date: Jul 2002
Posts: 95
How do i make fix size html?

I have a sub page, that need to be appear in a small fix size windows. What type of code do I need?
weaponmaster is offline   Reply With Quote
Old 06-04-2003, 01:47 PM   #2
Member (13 bit)
 
Join Date: Oct 2000
Location: Scotland
Posts: 4,700
You could use JavaScript to make the sub-page load in fixed size Pop-Up Window.

For example, paste this code between the body tags on the main page:

script>
function openpopup(){
var popurl="SUBPAGE.htm"
winpops=window.open(popurl,"","width=200,height=200,resizable=no")
}
/script>
!-- End -->

Just change the SUBPAGE.htm to the absolute or relative path of the subpage i.e. if it's in the same folder as your main page, then "subpage.htm" (or html). If it's in another folder, then "../foldername/sunpage.htm".

Change the Width and the Height from 200 x 200, to the size you want the popup window to be.

If you want the window to have Scrollbars, then add ",scrollbars=yes" after "resizable=no".

You would then paste this link into your main page which when clicked on, will allow the user to open the Popup window.

a href="javascript : openpopup()">CLICK HERE

You can change "CLICK HERE" to whatever you wish the link to say. Or alternatively, you can use an image as the clickable link.

In order for you to see the code on the forum, I've had to omitt the opening "<" in front of the following:

script>

/script>

!-- End -->

a href

You also obviously need an /a" at the end of the CLICK HERE line to close the link tag. Again the a/ needs to be enclosed by "<" and ">". You probably know this, but I included it for completeness.

IMPORTANT:

There should also be NO SPACES between "javascript : openpopup". Just close the spaces so Javascriptcolonopenpopup run together.

I had to put the spaces in to avoid getting a smilie appearing on the forum.

There's got to be an easier way of writing complete Javascript examples on the forum. But it's been a long, hard day and I just can't think of it at the moment.

I'm sure someone will remind me of how to do it.

HTH

Last edited by mike breck; 06-04-2003 at 02:12 PM.
mike breck is offline   Reply With Quote
Old 06-04-2003, 02:29 PM   #3
Member (7 bit)
 
weaponmaster's Avatar
 
Join Date: Jul 2002
Posts: 95
thank you so much.

I love this forum.
weaponmaster is offline   Reply With Quote
Reply

Bookmarks

Still Need Help? Type Your Keywords Here:


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

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 08:01 AM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
SEO by vBSEO 3.6.0 PL2