I'm reasonably new to both PHP and Javascript (Microsoft background.......I know, it's my own fault!) but have managed to get my galleries up and running using PHP. Now I want to call a javascript open.window function passing it the image file name and size. All goes well until my image filename has a space in it............. (no, I can't just remove them) I've tried every combination of ' and " and building variables rather than putting it all in-line, to no avail. This is the last attempt before I threw the PC out the window :- $varbuildit= "loc=$base$dir&image=$dirm$imagetext[0]"; $varahref ="javascript:OpenPage('./disp-JS.php?$varbuildit','window1',$width,$height)"; need to pass (as an example) javascript:OpenPage('./disp-JS.php?loc=./pics/big/&image=./pics/medium/Hello World.jpg','window1',600,400) What is does is try this :- javascript:OpenPage('./disp-JS.php?loc=./pics/big/&image=./pics/medium/Hello Any pointers would be VERY appreciated! Thanks in advance.