INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

Having some trouble with JS pop-up

Having some trouble with JS pop-up

(OP)
Hello

I have a link on my Home page that is supposed to open a pop-up window (a HTML page smaller than the Homepage and you should see the Homepage behind the pop-up).

When I click on the link on my Home page, I do get taken to the HTML pop-up page but the dimensions of that page are ignored. This is what I have in my Home page:

CODE --> JS

</script>

<script>
function myFunction() {
    window.open("Domestic_Violence.asp", "toolbar=yes, scrollbars=yes, resizable=yes, top=500, left=500, width=400, height=400");
}
window.onload = function() {
  document.getElementById('myLink').onclick = myFunction();
}
</script>

</head> 


And the link looks like this:

CODE --> HTML

<li><a href="Domestic_Violence.asp" id="myLink" target="_blank">Domestic Violence</a></li> 

These dimensions - top=500, left=500, width=400, height=400 - referred to above, are ignored: I can see a full-screen page.

I have also placed the JS code in its own external file and references it in my Home page <head> tags as follows:

CODE -->

<script src="myPopup.js"></script> 

but it makes no difference.

Any help would be appreciated.

Thanks.

RE: Having some trouble with JS pop-up

browser??

Chris.

Indifference will be the downfall of mankind, but who cares?
Time flies like an arrow, however, fruit flies like a banana.
Webmaster Forum

RE: Having some trouble with JS pop-up

Oh and target="_blank" opens a normal sized window.

Chris.

Indifference will be the downfall of mankind, but who cares?
Time flies like an arrow, however, fruit flies like a banana.
Webmaster Forum

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close