/    Sign up×
Community /Pin to ProfileBookmark

I Have Some Questions?

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. ? 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 [URL=http://javascript.internet.com/user-details/optimized-popup.html]http://javascript.internet.com/user-details/optimized-popup.html[/URL] But in smaller size like width 400 and lengeth 700. and it appear in the middle.
Sorry for my poor explaination.

to post a comment
JavaScript

5 Comments(s)

Copy linkTweet thisAlerts:
@pyroMar 07.2003 — 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>
Copy linkTweet thisAlerts:
@alyemenauthorMar 07.2003 — 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.
Copy linkTweet thisAlerts:
@pyroMar 07.2003 — 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>
Copy linkTweet thisAlerts:
@alyemenauthorMar 07.2003 — 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
Copy linkTweet thisAlerts:
@dabushMar 08.2003 — [i]Originally posted by alyemen [/i]

[B]Is there any possiblities i can get just the script with out the html codes? just plain java script. [/B][/QUOTE]


YES

<i>
</i>&lt;script language="javascript" type="text/javascript"&gt;
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);
}

&lt;/script&gt;
×

Success!

Help @alyemen spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...