bit of help with some javascript please

  tomleady 14:30 05 Jul 2004
Locked

hi, i'm using the below javascript code to launch pop-up pages when a link is clicked.

but i need to be able to add scrollbars to it.

code:

function link(text,width,height){
newWin=window.open(text,"","width="+width+",height="+height+",top=50,left=50");
}

link code:

//a href="javascript:link('jpopups/pop.htm','300','250')">

i've tried adding some code, along the lines of 'scrollbars=yes' but it doesnt work.

any ideas?

  Eric10 19:43 05 Jul 2004

code:

function link(text,width,height){ newWin=window.open(text,"","width="+width+",height="+height+",scrollbars="+scrol+",top=50,left=50"); }

link:

//a href="javascript:link('jpopups/pop.htm','300','250','yes')">

  Eric10 19:45 05 Jul 2004

sorry missed the 'scrol' in the function definition.

code:
function link(text,width,height,scrol){ newWin=window.open(text,"","width="+width+",height="+height+",scrollbars="+scrol+",top=50,left=50"); }

  tomleady 09:27 06 Jul 2004

eric10, you are a star. thanks so much!

This thread is now locked and can not be replied to.

Elsewhere on IDG sites

iMac Pro review

Illustrator Charles Williams on how to create magazines and book covers

iMac Pro review

Les meilleures prises CPL (2018)