Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

window.open and parameters

Status
Not open for further replies.

byjo

MIS
Nov 19, 2001
1
US
Hello

I'm trying to add parameters to control the size of the pop up window. Everything works fine until I add the parameters...then I get invalid argument errors...I've tried different variation of syntax and still it doesn't work. Any suggestions would be greatly appreciated!
Thank you!

Function fFormatPicture(strInPicture)
dim formPic
formPic = ""
if (Len(strInPicture) > 0) then
formPic = &quot;<input type=&quot;&quot;button&quot;&quot; value=&quot;&quot;View&quot;
formPic = formPic & &quot;&quot;&quot; ONCLICK=&quot;&quot;window.open(' formPic = formPic & strInPicture
formPic = formPic & &quot;','toolbar=no, width=300'&quot;
formPic = formPic & &quot;)&quot;&quot;>&quot;
end if

fFormatPicture = formPic
End Function
 
Try:

formPic = _
&quot;<input type=&quot;&quot;button&quot;&quot; value=&quot;&quot;View&quot;&quot; &quot; & _
&quot;onclick=&quot;&quot;window.open(' & _
strInPicture & _
&quot;','toolbar=no, width=300')&quot;&quot;>&quot;


I think you had a semicolon in there somewhere too.

Still might not work if your page's default language has become VBScript.

Take out the parens around the parameter list.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top