views:

87

answers:

3

Hi Guys, after playing around this morning, i've found that there's this default chunk of html code in the amazon webstore which will add a toolbar on top of the page. the html looks like below:

    <td id="wba_logo_bg">
<table class="logo" border="0" cellpadding="0" cellspacing="0" width="100%">
<tbody><tr><td align="left"></td>
<td class="wba_account" style="padding: 5px;" align="right" valign="top">
<table border="0" cellpadding="0" cellspacing="0">
<form action="#" id="searchForm" method="get" name="searchForm"></form>
<tbody><tr><td class="wba_account_link">
<a xmlns:xhtml="http://www.w3.org/1999/xhtml" class="myAccountNav" href="#" onclick="return false;">home</a></td>
<td class="myAccountDots"></td>
<td class="wba_account_link"><a class="myAccountNav" href="#" onclick="return false;">view cart</a></td>
<td class="myAccountDots"></td><td class="wba_account_link"><a class="myAccountNav" href="#" onclick="return false;">my account</a></td>
<td class="myAccountDots"></td><td class="wba_account_link"><a class="myAccountNav" href="#" onclick="return false;">order status</a></td>
<td><img src="pageEditor_files/1_pixel.gif" hspace="7"></td>
<td><input name="keyword" tabindex="1" type="text"></td>
<td><img alt="Search" class="wba_search_btn" onclick="return false;" onkeyup="if (13==event.keyCode) searchForm.submit();" 
src="pageEditor_files/btn_search.gif" style="cursor: pointer;" tabindex="2" title="Search" hspace="3">
</td></tr></tbody>
</table>
</td></tr></tbody>
</table>

</td>

and thus far i was able to use prototype to find those with the class name of wba_account_link and hide them via the codes below:

    function hideAmazonToolbar()
{
    $("#wba_logo_bg").hide();
}//end function

but what i really want to do is preferably to hide the whole tbody instead, but with my limited prototype skills, i don't really know how to do this. can anybody point me to the right resources on how to get this done?

thanks!

EDIT

Went higher up and apparently there's a td with an id, and solve it using prototype hide function! man, i love javascript framework :)

thanks :)

+1  A: 

You want the up function. I think this should do it.

document.getElementsByClassName('wba_account_link').up('tbody');
Andy Gaskell
A: 

I'm trying to hide the webstore content too, but where and how do I call:

function hideAmazonToolbar()

{ $("wba_logo_bg").hide(); }//end function

or

document.getElementsByClassName('wba_account_link').up('tbody');

?

Do I put into the amazon as a custom script or do I make a specific call from a different server?

Paul
actually you can use either. i just like the function as it's more cleaner approach. you can call it whenever you need to hide it or put that inside the $document.ready for jquery.
melaos
A: 

test ffd fsdgdfgdfgfdgf