Individual Pop-up resize

A

alazar_076

Hey,

I am using javascript for pop-ups, but I want each pop-up on the page
to have its own resize. This is the code that I have:

<HEAD>
<SCRIPT TYPE="text/javascript">
<!--
function popup(mylink, windowname)
{
if (! window.focus)return true;
var href;
if (typeof(mylink) == 'string')
href=mylink;
else
href=mylink.href;
window.open(href, windowname, 'width=650,height=350,scrollbars=no');
return false;
}
//-->
</SCRIPT>
</HEAD>

<BODY>
<td><a href="auctions/dbracelet.html" onClick="return popup(this,
'notes')">Diamond Bracelet</a></td>
</BODY>
---------------------------------------

I would obviously prefer to NOT have any javascript, but have not been
able to find resources to help me with utilizing normal html pop-ups
and resizes.

Thanks,

Avi
 
R

Randell D.

Hey,

I am using javascript for pop-ups, but I want each pop-up on the page
to have its own resize. This is the code that I have:

<HEAD>
<SCRIPT TYPE="text/javascript">
<!--
function popup(mylink, windowname)
{
if (! window.focus)return true;
var href;
if (typeof(mylink) == 'string')
href=mylink;
else
href=mylink.href;
window.open(href, windowname, 'width=650,height=350,scrollbars=no');
return false;
}
//-->
</SCRIPT>
</HEAD>

<BODY>
<td><a href="auctions/dbracelet.html" onClick="return popup(this,
'notes')">Diamond Bracelet</a></td>
</BODY>
---------------------------------------

I would obviously prefer to NOT have any javascript, but have not been
able to find resources to help me with utilizing normal html pop-ups
and resizes.

Thanks,

Avi


How do you mean 'normal html pop-ups and resizes'? You can have a hyper
link that has a target (ie <a href=whereever.html target=new1> and <a
href=whereever.html target=new2> would give you two popup windows, one
called new1, the other called new2) or you can use window.open in
javascript - These are the only methods I am aware off, thus I don't see
you doing anything other than the norm...

How do you mean that you want each page to have its own resize?

randelld
 
A

alazar_076

Randell said:
How do you mean 'normal html pop-ups and resizes'? You can have a hyper
link that has a target (ie <a href=whereever.html target=new1> and <a
href=whereever.html target=new2> would give you two popup windows, one
called new1, the other called new2) or you can use window.open in
javascript - These are the only methods I am aware off, thus I don't see
you doing anything other than the norm...

How do you mean that you want each page to have its own resize?

randelld

Lets say I have multiple links on a page that I want to pop-up. I want
to make each pop-up height and width different. I don't want to have
to define this at the header...I would like to define this in the body,
where i put the link itself.
 
R

RobB

<a don't

Lets say I have multiple links on a page that I want to pop-up. I want
to make each pop-up height and width different. I don't want to have
to define this at the header...I would like to define this in the body,
where i put the link itself.

Arguments !

Pass those dimensions into the function, replacing hardcoded values:

function popup(mylink, windowname, w, h)
..........
..........
window.open(href, windowname, 'width=' + w +',height=' + h +
',scrollbars=no');
return false;
}

<a href="auctions/dbracelet.html" onclick="return
popup(this.href,'notes','650','350')">Diamond Bracelet</a>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,531
Members
45,004
Latest member
KetoBoostGummies

Latest Threads

Top