Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Robert Lewis on Oct 22, 2008 12:04
open dhtmlx forum
tree menu - target=<iframe>

Hello,

I'm trying to target an iframe with my tree menu. I searched and saw 2 methods of using HTML <a href=""> within the tree, but neither way is working for me. Here is my menu item:

<item text='<a href="DGROUP.ASPX" target="contents" >DELETE GROUP</a>' id='3' child='0' />

Here is the body of my html:

<form id="form1" runat="server">
<div>
<table border="2" width="100%" cellspacing="0" cellpadding="0" height="100%" id="table1" bordercolor="#000000">
    <tr>
        <td runat="server" width="22%" bgcolor="#C2C6AF" align="left" valign="top" id="menuFrame"></td>
        <td id="contentFrame" runat="server" align="left" valign="top">
<iframe id="contents" runat="server" height="100%" width="100%"></iframe>
</td>
    </tr>
</table>
</div>
</form>

Any ideas why the target="contents" won't work? Thanks!

Robert Lewis
Answer posted by Support on Oct 23, 2008 01:08
Try to set "name" attribute instead of "id" for the iframe:

<iframe name="contents" runat="server" height="100%" width="100%"></iframe>
Answer posted on Oct 23, 2008 05:27
That works, although I'm not sure why....I was always under the impression that Javascript preferred ID over name....Oh well, thanks!! :)

Robert