help with a problem!!!!

wxdqz

New Member
I'm attempting to pass params between pages, I've got it to work somewhat but having a problem. I added the following code to the receiving page:

<script>
<!--

var keyvals=location.search.substring(1).split("&");
var search=new object();

for (var i=0; i < keyvals.length; i++)
{
var temp=keyvals.split("=");
temp[1]=temp[1].split("+").join(" ");
search[temp[0]]=unescape(temp[1]);
}

//-->
</script>

The code is supposed to capture the parameter that is being passed:
<a HREF=http://www.webdeveloper.com/forum/archive/index.php/"goldbergphotos01.htm?gallerydir=goldberggallery07"></a>

the param being passed is gallerydir=goldberggallery01 (it is being passed), however when I try to display the photo:

document.write('<img name="img2" src=http://www.webdeveloper.com/forum/archive/index.php/"' + domaindir + search.gallerydir + '/goldberg0001.jpg" border=0 width=248 height=240 onmouseover="playSound(6)" onmouseout="stopSound(6)">');

it displays a blank area where the photo is supposed to be. "search.gallerydir" is supposed to hold the param that is being passed.

When I add the variable:

var gallery='';
gallery=search.gallerydir

to the above script I get an undefined error, however the sounds work, but when "gallery" is removed the space where the photo is supposed to be is blank and the sounds do not work.

Please help as to a solution to this problem.
 
Back
Top