|
|||||||
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
#1 |
|
Member (7 bit)
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?
|
|
|
|
|
|
#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. |
|
|
|
|
|
#3 |
|
Member (7 bit)
Join Date: Jul 2002
Posts: 95
|
thank you so much.
I love this forum.
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|