What line is the error on?

> -----Original Message-----
> From: Steve Miller [mailto:[EMAIL PROTECTED] 
> Sent: 13 March 2003 17:32
> To: [EMAIL PROTECTED]
> Subject: [wdvltalk] javascript help needed
> 
> 
> I am using php and javascript together on a page. I am trying 
> to change an image source by sending a dynamically-generated 
> image name to a script. An alert in the script is indicating 
> that I am sending the correct image name, but I get an error 
> that "document.im_num is not an object".
> 
> How do I write the javascript to accept the image name I am sending?
> 
> Thanks!
> steve miller
> 
> 
> 
> function loadAd(url,im_num)
> {
> alert(im_num);
> if (document.all)
>   {
>    targetAll=eval(window.frames["display"].location)
>    targetAll.href=url;
>    document.im_num.src="../graphics/gold.gif";
>   }
>    else if (document.getElementById&&!document.all)
>   {
>    targetElement=eval(document.getElementById("display"))
>    targetElement.src=url;
>    document.im_num.src="../graphics/gold.gif";
>   }
> }
> 
> 
> onclick=\"loadAd('$ad_style[$n]?ad_number=$ad_number[$n]','ima
> ge$n')\" 
> 
> ____ . The WDVL Discussion List from WDVL.COM . ____
> To Join wdvltalk, Send An Email To: 
> mailto:[EMAIL PROTECTED] 
>        Send Your Posts 
> To: [EMAIL PROTECTED]
> To change subscription settings to the wdvltalk digest version:
>     http://wdvl.internet.com/WDVL/Forum/#sub
> 
> ________________  http://www.wdvl.com  _______________________
> 
> You are currently subscribed to wdvltalk as: 
> [EMAIL PROTECTED] To unsubscribe send a blank email to 
> %%email.unsub%%
> 


____ � The WDVL Discussion List from WDVL.COM � ____
To Join wdvltalk, Send An Email To: mailto:[EMAIL PROTECTED] 
       Send Your Posts To: [EMAIL PROTECTED]
To change subscription settings to the wdvltalk digest version:
    http://wdvl.internet.com/WDVL/Forum/#sub

________________  http://www.wdvl.com  _______________________

You are currently subscribed to wdvltalk as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]

Reply via email to