Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder
    Join Date
    Jun 2002
    Posts
    349
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Builder.node help - please advise

    hello,

    I am seemingly having issues with IE and onclicks and building dynamic href's and such. SO, I am just gonna build it with builder.node.

    This is where I need help because the content that needs building is mixed.

    here is the actual content. how do I build this. I will show what I have, and what is needed.
    Code:
                                          var linkBuild =      Builder.node('tr',{id:'postmessage'},[
                                                    Builder.node('td', {}, 
                                                                           ['[&#37; dynamic_app_content +%] '  + currpageselects.total() + ' [%+ dynamic_app_content %]</span>&nbsp;&nbsp;'),
                                                     Builder.node('a', {
                                                       id:'alleventselected',
                                                       javascript:'void(0);',
                                                       onclick:'addallitemstocart()',
                                                       className: 'cursorHand'
                                                                       }, ['[%+ dynamic_app_content +%]' + allFilterlength + ' [%+ dynamic_app_content +%]'] ),
                                                          Builder.node('a', {
                                                                         href:'javascript:setFilterEdits(\'none\')',
                                                                         className: 'cursorHand'},['[% dynamic_app_content %]']),
                                                                            ]
    
                                                            ]);
    this is what I want it to be when viewed (if one could view source).
    Code:
    <tr id="postmessage"><td>Do you want 10 items? Some content is generated here <a href="javascript:void(0)" onClick="addallitemstocart();">select all 10</a> to be add to this cart.&nbsp;&nbsp;|&nbsp;&nbsp;<a href="javascript:dosomething()">this is the last link</a></td></tr>
    So basically, my issue is mixing regular text with links in the "builder".

    Please advise.
    Last edited by Kor; 06-04-2008 at 09:38 AM. Reason: wrap the code [code][/code]

  • #2
    Kor
    Kor is offline
    Red Devil Mod Kor's Avatar
    Join Date
    Apr 2003
    Location
    Bucharest, ROMANIA
    Posts
    8,478
    Thanks
    58
    Thanked 379 Times in 375 Posts
    We have no idea what the constructor Builder.node() might do, as it is not in the javascript core. That is probably a custom method built inside some framework or javascript library, but if it is custom, we need to see that constructor function (prototype).

    This is the main disadvantage of using a framework/library. You will never now what one custom constructor function or another really do unless a long and exhausting search within thousands and thousands lines of codes.

    this is what I want it to be when viewed (if one could view source).
    ...
    This is rather obsolete. You should HTML see this:
    Code:
    <tr id="postmessage"><td>Do you want 10 items? Some content is generated here <a href="#" onclick="addallitemstocart();return false">select all 10</a> to be add to this cart.&nbsp;&nbsp;|&nbsp;&nbsp;<a href="#" onclick="dosomething();return false">this is the last link</a></td></tr>
    KOR
    Offshore programming
    -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

  • #3
    Regular Coder
    Join Date
    Jun 2002
    Location
    Adirondacks
    Posts
    516
    Thanks
    4
    Thanked 4 Times in 4 Posts
    Brightnail,
    Is that yahoo YUI? Ext.js?

    I've seen builder.node and can't recall where it's from


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •