please help w/ passing values w/ Server.urlencode

Results 1 to 2 of 2

Thread: please help w/ passing values w/ Server.urlencode

  1. #1
    Linh Guest

    Default please help w/ passing values w/ Server.urlencode

    I&#039;m trying to pass the image path and display the image in the popup window. This code works fine in netscape but doens&#039;t work in IE. For ex. in IE the image path is under a subfolder A/A1234.gif but it displays as AA1234.gif (skips the slash therefore wrong image). Can someone help me on this? Thanks in advance! <BR>&#060;a href="javascript:win(&#039;;%=Server.UrlEncode(rs("image-path"))%&#062;&#039;)"&#062;&#060;img src=";%=rs("image-path")%&#062;" height=120 width=200 border=0&#062;&#060;/a&#062;

  2. #2
    Join Date
    Dec 1969

    Default WHY are you encoding???

    If it&#039;s a path/file name, you shouldn&#039;t *need* to encode it!<BR><BR>The only reason you might want to is if you have spaces in the file name, in which case NS wants to see %20 in place of the spaces. But solve that by just making sure you don&#039;t *have* spaces.<BR><BR>Actually, given that you do IMG SRC=... and don&#039;t use URLEncode in *that* name usage, why would you think you would need it for other usages??? Obviously, NS and MSIE are both happy with the unencoded name in this usage.<BR><BR>What does that "win( ... )" function do that you think it needs the name encoded?<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts