• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 250
  • Last Modified:

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


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
lefty1980
Asked:
lefty1980
  • 7
  • 4
  • 3
1 Solution
 
BatalfCommented:
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
 
archrajanCommented:
u missed the <script> tag at the beginning
0
 
archrajanCommented:
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
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.

 
BatalfCommented:
And the link should be

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

and not

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

in order for browser compatibility
0
 
archrajanCommented:
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
 
archrajanCommented:
>>>>
 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
 
lefty1980Author Commented:
thank you very much archrajan....finally got it to work!!
0
 
lefty1980Author Commented:
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
 
archrajanCommented:
lefty its a general thing in IE.
its browser settings...
once u click ok there u will defintely see ur page open
0
 
BatalfCommented:
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
 
archrajanCommented:
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
 
BatalfCommented:
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
 
archrajanCommented:
>>>
It's no big deal for me archrajan:-)

for 12 questions its not been a big deal for me too batalf..
0
 
lefty1980Author Commented:
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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

  • 7
  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now