No, I assigned an image name, and I was trying to use it. I will try try as
an id.

thanks!

> From: "Cymbala, Greg" <[EMAIL PROTECTED]>
> Reply-To: [EMAIL PROTECTED]
> Date: Thu, 13 Mar 2003 10:41:54 -0700
> To: [EMAIL PROTECTED]
> Subject: [wdvltalk] RE: javascript help needed
> 
> Try this (should work in IE 5(?)+ and gecko-based versions of Netscape) ...
> And you are giving the image an ID attribute, and im_num is the ID, right?
> 
> 
> function loadAd(url,im_num)
> {
> alert(im_num);
> if (document.all)
> {
> targetAll=eval(window.frames["display"].location);
> targetAll.href=url;
> document.all(im_num).src="../graphics/gold.gif";
> }
> else if (document.getElementById)
> {
> targetElement=eval(document.getElementById("display"))
> targetElement.src=url;
> document.getElementById(im_num).src="../graphics/gold.gif";
> }
> }
> 
> HTH,
> Greg
> 
> -----Original Message-----
> From: Steve Miller [mailto:[EMAIL PROTECTED]
> Sent: Thursday, March 13, 2003 10:32 AM
> 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]','image$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 information in this electronic mail message is sender's business
> Confidential and may be legally privileged.  It is intended solely for the
> addressee(s).  Access to this Internet electronic mail message by anyone
> else is unauthorized.  If you are not the intended recipient, any
> disclosure, copying, distribution or any action taken or omitted to be taken
> in reliance on it is prohibited and may be unlawful.
> The sender believes that this E-mail and any attachments were free of any
> virus, worm, Trojan horse, and/or malicious code when sent. This message and
> its attachments could have been infected during  transmission. By reading
> the message and opening any attachments, the recipient accepts full
> responsibility for taking protective and remedial action about viruses and
> other defects. Galileo International is not liable for any loss or damage
> arising in any way from this message or its attachments.
> 
> 
> 
> ____ � 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]
> 
> 


____ � 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