[ansel] Tree view almost done

Heath S. Hendrickson heath at outerspaceconsultants.com
Wed Feb 18 19:37:45 PST 2004


Wouldn't you know it... I've spent a lot of time researching this online 
and couldn't find an answer (I found all sorts of references to changing 
a Frame location href...)...  And then not 5 mintues after I type up 
this message and send it out do I find the answer.

I needed to make it <a href="" id=""> instead of <a href="" name="">.  
Doing that fixed it all up.

All I have left to do is create the template for the tree view that 
isn't groupByOwner and then I can submit the patches...

heath


Heath S. Hendrickson wrote:

> I'm 99% done with the new tree view.  I didn't use Horde_Tree simply 
> because I couldn't get my hands wrapped around how to use it.  I'm 
> just having a problem with dynamically changing the link that the 
> gallery_preview image goes to.  I've tried using the 
> document.$owner_link.href = $owner_view_url[]; approach, but all I get 
> are javascript errors complaining that document.$owner_link doesn't 
> have any properties.
>
> Here's the JS snippet:
>
> link = document.getElementById('<?php echo $owner ?>_link');
> link.href = <?php echo $owner ?>_view_url[$id];   // $id is passed 
> into the JS
>
>
> And here's the definition of the link:
>
> <td class="preview"><?php echo Horde::link('" name="' . $owner . 
> '_link"') . Horde::img('', _("Gallery Preview"), 'vpace="5" 
> class="solidbox" name="' . $owner . "_preview"') ?></a></td>
>
>
> The resulting output in the browser looks like:
>
> The JS:
>
>    link = document.getElementById('heath_link');
>    link.href = heath_view_url[$id];
>
>
> The link:
>
> <td class="preview"><a href="" name="heath_link"><img 
> src="/horde/ansel/graphics/" alt="Gallery Preview" title="Gallery 
> Preview" vspace="5" class="solidbox" name="heath_preview" /></a></td>
>
>
> Anyone have any suggestions on what I'm doing wrong here?
>
> heath




More information about the ansel mailing list