javascript function parameter problem

  • Thread starter Thread starter AAaron123
  • Start date Start date
A

AAaron123

function openWindow(name, path, w, h) {

OpenWindow=window.open( path,name,...

Works if I call it with path parameter equal to

'Images/Mass1.jpg'

but not if it is equal to

'~/Images/Mass1.jpg'

after I move the calling program to a subfolder



What am I doing wrong?



Thanks
 
the "~" support (unlike unix based webservers) is supplied by asp.net
server controls that have a url property. you can either use a relative
url (../images) or user server code to determine the correct path and
write out to the javascript.

-- bruce (sqlwork.com)
 
Thanks to you both for clearing up the meaning of ~.
I had also tried ".." before my NG post.

The problem was that function openWindow was in a file that I didn't move to
the subfolder. It was that, not the images, that couldn't be found.

Thanks again
 
Back
Top