Click to See Complete Forum and Search --> : I Have Some Questions?
alyemen
03-07-2003, 11:30 AM
Hi All. I am Just new here. I wanted to know about something but its hard for me to explain it but here it is anyway. :confused: I want to know whats the code that enable anyone to press the text in my first page TO open a small new page with specific size (without the address link and the back, forward, stop, etc. And as well doesnt show file, edit, view, favoorite, etc. (like a flash page)).
would anyone be able to Help me?
I want to nwo the code same as shown in http://javascript.internet.com/user-details/optimized-popup.html But in smaller size like width 400 and lengeth 700. and it appear in the middle.
Sorry for my poor explaination.
Here is some code to get you going:
<html>
<head>
<title>Centered Popup</title>
<script language="javascript" type="text/javascript">
function openwin(url)
{
var name = "popup"; // popup name
var width = "400"; // popup width
var height = "300"; // popup height
var left = (screen.width - width) / 2 ;
var top = (screen.height - height) / 2;
var windowproperties = "width="+width+",height="+height+",left="+left+",top="+top+"";
window.open(url, name, windowproperties);
}
</script>
</head>
<body>
<a href="youpage.htm" onClick="openwin(this.href); return false;">open window</a>
</body>
</html>
alyemen
03-07-2003, 05:00 PM
Thank U sir very much. yes thats the one I am looking for. Just to add another question. how can I ger rid of the text . I mean Instead of Showing The text [Open Window] cause i am using it in My swish and that text wouldnt show in the movie when i play it. so what i did was i made the text in the swish all i need is just the codes that take me stright forward to the page.
Is this what you mean?
<html>
<head>
<title>Centered Popup</title>
<script language="javascript" type="text/javascript">
function openwin(url)
{
var name = "popup"; // popup name
var width = "400"; // popup width
var height = "300"; // popup height
var left = (screen.width - width) / 2 ;
var top = (screen.height - height) / 2;
var windowproperties = "width="+width+",height="+height+",left="+left+",top="+top+"";
window.open(url, name, windowproperties);
}
</script>
</head>
<body onload="openwin('yourpage.htm')">
</body>
</html>
alyemen
03-07-2003, 05:41 PM
Man U R very good. and fast replier too. thankx very much. thats the one. exept it works fine in front page but didnt work in the swish. Is there any possiblities i can get just the script with out the html codes? just plain java script. Thank u again sir
dabush
03-07-2003, 10:04 PM
Originally posted by alyemen
Is there any possiblities i can get just the script with out the html codes? just plain java script.
YES
<script language="javascript" type="text/javascript">
documnet.onload=openwin('yourpage.html');
function openwin(url)
{
var name = "popup"; // popup name
var width = "400"; // popup width
var height = "300"; // popup height
var left = (screen.width - width) / 2 ;
var top = (screen.height - height) / 2;
var windowproperties = "width="+width+",height="+height+",left="+left+",top="+top+"";
window.open(url, name, windowproperties);
}
</script>