?
Solved

trying to create a button that will bring up window 300x400 pixels

Posted on 2005-03-28
14
Medium Priority
?
248 Views
Last Modified: 2012-08-13

http://mafiaart.com/javapage222222.htm         I am trying to create a page that will pop up a window 300x400 pixels by the push of the button flashing next.   how close am I getting there? What am I missing?.
 
sincerely,
 
Lefty
0
Comment
Question by:lefty1980
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 7
  • 4
  • 3
14 Comments
 
LVL 32

Expert Comment

by:Batalf
ID: 13646191
First of all, your missing a start tag

<script type="text/javascript">
function openSizedWindow()
{

   window.open("ABOUTHEARTIST.htm", "targetWindow", "marginheight=0,marginwidth=0,location=no,menubar=no, status=yes,resizable=no,toolbar=no,directories=no,scrollbars=yes,width=300,height=400");

}

</script>

Second, you don't have to specify an attribute if you don't want it.

0
 
LVL 25

Expert Comment

by:archrajan
ID: 13646194
u missed the <script> tag at the beginning
0
 
LVL 25

Expert Comment

by:archrajan
ID: 13646197
this works
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script>
function openSizedWindow()
{

   window.open("ABOUTHEARTIST.htm", "targetWindow", "marginheight=0,marginwidth=0,location=no,menubar=no, status=yes,resizable=no,toolbar=no,directories=no,scrollbars=yes,width=300,height=400");

}

</script>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
</head>

<body>
<table width="688" height="406" border="1">
  <tr>
    <td width="63" height="120">&nbsp;</td>

    <td width="208"><a href="javascript:openSizedWindow()"><img src="CHROMEARROWNEXTONSS.gif" width="75" height="38" border="0"></a></td>
    <td width="395">&nbsp;</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr>

    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
</table>
</body>
</html>
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 32

Expert Comment

by:Batalf
ID: 13646201
And the link should be

<a href="#" onclick="openSizedWindow()">

and not

<a href="javascript:openSizedWindow()">

in order for browser compatibility
0
 
LVL 25

Expert Comment

by:archrajan
ID: 13646213
also change it to this way for best results

<td width="208"><a href="#" onclick = "openSizedWindow();return false;"><img src="CHROMEARROWNEXTONSS.gif" width="75" height="38" border="0"></a></td>
0
 
LVL 25

Accepted Solution

by:
archrajan earned 2000 total points
ID: 13646238
>>>>
 And the link should be

<a href="#" onclick="openSizedWindow()">

if u r doing it u shud better have return false in the end...

like

<a href = "#" onclick = "openSizedWindow();return false;"
0
 

Author Comment

by:lefty1980
ID: 13648344
thank you very much archrajan....finally got it to work!!
0
 

Author Comment

by:lefty1980
ID: 13650809
hi archrajan


http://mafiaart.com/javapage3333333.htm  it works perfect for me in netscape but iI get the error message "pop up window blocked" when I view it on internet explorer...is this my settings in internet explorer or is the script I entered  not compatable with the other browser?
0
 
LVL 25

Expert Comment

by:archrajan
ID: 13651389
lefty its a general thing in IE.
its browser settings...
once u click ok there u will defintely see ur page open
0
 
LVL 32

Expert Comment

by:Batalf
ID: 13651413
lefty1980,

why didn't you split the points in this question? Wasn't the solution to put in the <script> start tag as I also mentioned in my first comment?

It's no big deal, but for the future, you should know that when several users comes up with the solution, you could split the points.

Batalf
0
 
LVL 25

Expert Comment

by:archrajan
ID: 13652155
Batalf
atleast once in a while understand how it feels when u stand in my shoes
so many times u have did that to me...
i can post links to 12 questions where points shud have been awarded to me in some cases and split in some cases
0
 
LVL 32

Expert Comment

by:Batalf
ID: 13652344
It's no big deal for me archrajan:-)

But as you hopefully know, I often tell the person asking the question that the point should have been split when I felt I didn't deserve them all.

I just feel that when it's a matter of seconds between posts that solves the question, the the points should be split.

Batalf.
0
 
LVL 25

Expert Comment

by:archrajan
ID: 13652393
>>>
It's no big deal for me archrajan:-)

for 12 questions its not been a big deal for me too batalf..
0
 

Author Comment

by:lefty1980
ID: 13653158
hi Batalf,

my sincere apologies..didnt mean to cut you out of the pot.  I'm new to using this wonderful service and it was an oversite.  I'll be more carful next time

sincerely

Lefty
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In my daily work (mainly using ASP.net), I need to write a lot of JavaScript code. One of the most repetitive tasks I do are the jQuery Ajax calls. You know: (CODE) I don't know if for you it's the same, but for me is soooo tedious to write the …
This article will give core knowledge of JavaScript and will head in to your first JavaScript program. I am Durvesh Naik and I am here to deal with this series of JavaScript. I will teach you JavaScript in part wise , as its quite boring to read big…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question