I'm trying to get a mouse over to work and all I get is the text. This is what I'm trying to make work: <a href="feedback.html" onMouseOver="document.the_image.src=<dtml-var "images['feedback_dn.gif']">;" onMouseOut="document.the_image.src=<dtml-var "images['feedback_up.gif']">;"> <img src=<dtml-var "images['feedback_up.gif']"> name="the_image" border="0"></a> What am I doing wrong? Talk to you soon, Gord
Gord, The outcome of <dtml-var imagename> is to insert an <img> tag into the html on publishtime. You must use a normal path for the image such as /image/somewhere/<dtml-var thisIsOnlyAString>/image.gif. Notice that the var I use will only be the string used in the path rather than trying to insert the actual image object. Read your source and you will see.... Regards, Paul Zwarts -----Original Message----- From: zope-admin@zope.org [mailto:zope-admin@zope.org] On Behalf Of Gordon Holtslander Sent: Monday, October 29, 2001 8:56 AM To: Zope List (E-mail) Subject: [Zope] How to do a mouse over in Zope I'm trying to get a mouse over to work and all I get is the text. This is what I'm trying to make work: <a href="feedback.html" onMouseOver="document.the_image.src=<dtml-var "images['feedback_dn.gif']">;" onMouseOut="document.the_image.src=<dtml-var "images['feedback_up.gif']">;"> <img src=<dtml-var "images['feedback_up.gif']"> name="the_image" border="0"></a> What am I doing wrong? Talk to you soon, Gord _______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
<a href="feedback.html" onMouseOver="document.the_image.src=<dtml-var "images['feedback_dn.gif'].absolute_url()">;" onMouseOut="document.the_image.src=<dtml-var "images['feedback_up.gif'].absolute_url()">;"> <img src=<dtml-var "images['feedback_up.gif'].absolute_url()"> name="the_image" border="0"></a> Then you your DTML returns "http://localhost/images/feedback.gif" and not the whole <img src=".." .... alt="0"/> At 01:55 2001-10-29 -0600, Gordon Holtslander wrote:
<a href="feedback.html" onMouseOver="document.the_image.src=<dtml-var "images['feedback_dn.gif']">;" onMouseOut="document.the_image.src=<dtml-var "images['feedback_up.gif']">;"> <img src=<dtml-var "images['feedback_up.gif']"> name="the_image" border="0"></a>
This solves the problem of all the instructions showing up in my page. Thanks for that, but it still doesn't make the image "mouse over." It only shows the feedback_up image. The link works, the regular image shows, but no change happens when I move my mouse over the image. In case it make a difference, I'm using zserver in Zope to serve the pages. I suspect I'm missing something simple, I just can't seem to see it. Gord -----Original Message----- From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of Peter Bengtsson Sent: October 29, 2001 02:57 To: gordon.holtslander@sk.lung.ca; Zope List (E-mail) Subject: Re: [Zope] How to do a mouse over in Zope <a href="feedback.html" onMouseOver="document.the_image.src=<dtml-var "images['feedback_dn.gif'].absolute_url()">;" onMouseOut="document.the_image.src=<dtml-var "images['feedback_up.gif'].absolute_url()">;"> <img src=<dtml-var "images['feedback_up.gif'].absolute_url()"> name="the_image" border="0"></a> Then you your DTML returns "http://localhost/images/feedback.gif" and not the whole <img src=".." .... alt="0"/> At 01:55 2001-10-29 -0600, Gordon Holtslander wrote:
<a href="feedback.html" onMouseOver="document.the_image.src=<dtml-var "images['feedback_dn.gif']">;" onMouseOut="document.the_image.src=<dtml-var "images['feedback_up.gif']">;"> <img src=<dtml-var "images['feedback_up.gif']"> name="the_image" border="0"></a>
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Hi Gord, The Problem is that the sources arent in -> ' ' <-. Try this: <a href="feedback.html" onMouseOver="document.the_image.src='<dtml-var "images['feedback_dn.gif'].absolute_url()">'" onMouseOut="document.the_image.src='<dtml-var "images['feedback_up.gif'].absolute_url()">'"> <img src='<dtml-var "images['feedback_up.gif'].absolute_url()">' name="the_image" border="0"></a> Hope this works...mine does. Christian p.s. i deleted the ';' at the end of the dtml-var tags...dont know if that changes sth but there is no need for it afaik. -----Ursprungliche Nachricht----- Von: zope-admin@zope.org [mailto:zope-admin@zope.org]Im Auftrag von Gordon Holtslander Gesendet: Montag, 29. Oktober 2001 16:15 An: 'Peter Bengtsson'; 'Zope List (E-mail)' Betreff: RE: [Zope] How to do a mouse over in Zope This solves the problem of all the instructions showing up in my page. Thanks for that, but it still doesn't make the image "mouse over." It only shows the feedback_up image. The link works, the regular image shows, but no change happens when I move my mouse over the image. In case it make a difference, I'm using zserver in Zope to serve the pages. I suspect I'm missing something simple, I just can't seem to see it. Gord -----Original Message----- From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of Peter Bengtsson Sent: October 29, 2001 02:57 To: gordon.holtslander@sk.lung.ca; Zope List (E-mail) Subject: Re: [Zope] How to do a mouse over in Zope <a href="feedback.html" onMouseOver="document.the_image.src=<dtml-var "images['feedback_dn.gif'].absolute_url()">;" onMouseOut="document.the_image.src=<dtml-var "images['feedback_up.gif'].absolute_url()">;"> <img src=<dtml-var "images['feedback_up.gif'].absolute_url()"> name="the_image" border="0"></a> Then you your DTML returns "http://localhost/images/feedback.gif" and not the whole <img src=".." .... alt="0"/> At 01:55 2001-10-29 -0600, Gordon Holtslander wrote:
<a href="feedback.html" onMouseOver="document.the_image.src=<dtml-var "images['feedback_dn.gif']">;" onMouseOut="document.the_image.src=<dtml-var "images['feedback_up.gif']">;"> <img src=<dtml-var "images['feedback_up.gif']"> name="the_image" border="0"></a>
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev ) _______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Gordon Holtslander]
This solves the problem of all the instructions showing up in my page. Thanks for that, but it still doesn't make the image "mouse over." It only shows the feedback_up image. The link works, the regular image shows, but no change happens when I move my mouse over the image.
In case it make a difference, I'm using zserver in Zope to serve the pages. I suspect I'm missing something simple, I just can't seem to see it.
You have to get the mouseover working in plain html first, nothing to do with Zope. Then you have to write the dtml or whatever to recreate that working html. Then you can branch out with your actual complications. You need to keep checking to make sure that your Zope code is actually giving you the html that you expect it to, the html that is known to work. Cheers, Tom P
Hi Gord, Try this: <a href="http://www.linux.org" onMouseOver="document.the_image.src='IMAGE_ID_HIGHLIGHT'" onMouseOut="document.the_image.src='IMAGE_ID'"> <img src="IMAGE_ID" name="the_image" border="0"> </a> Have fun, Christian -----Ursprüngliche Nachricht----- Von: zope-admin@zope.org [mailto:zope-admin@zope.org]Im Auftrag von Gordon Holtslander Gesendet: Montag, 29. Oktober 2001 08:56 An: Zope List (E-mail) Betreff: [Zope] How to do a mouse over in Zope I'm trying to get a mouse over to work and all I get is the text. This is what I'm trying to make work: <a href="feedback.html" onMouseOver="document.the_image.src=<dtml-var "images['feedback_dn.gif']">;" onMouseOut="document.the_image.src=<dtml-var "images['feedback_up.gif']">;"> <img src=<dtml-var "images['feedback_up.gif']"> name="the_image" border="0"></a> What am I doing wrong? Talk to you soon, Gord _______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
participants (5)
-
Christian Prokopp -
Gordon Holtslander -
Paul Zwarts -
Peter Bengtsson -
Thomas B. Passin