Skip to main content
Finally manage to put some dhtml drop down menu onto WALHI website, though till i write this it still kinda buggy when using M$ IE and work great on Firefox.
I create style element script_dhtml for storing javascript and css file that used by dhtml dropdown menu. For top navbar I modify banner_menu and put javascript function inside html link tag and for left horizontal kampanye I modify the variable in subtopics_menu and change fetch section to
<a class="subtopic2"
href="<?=$site->uri.$topics_array[$subtopic->id];?>/"
onMouseover="ddropdownmenu(this, event, <?=$subtopic->name;?>,
'150px')"
onMouseout="ddelayhidemenu()">&(subtopic.extra);</a>

Add several new global variable on code-global so that the dhtml
can get array for the subtopic.

And to give subtopic array on the javascript dhtml dropdown from
midgard subtopic function,
I came up with following lines of code


<?
$campaigns_topic = mgd_list_topics(169);
?>
var campaign=new Array()
var c = 0
<?
while ($campaigns_topic_menu && $campaigns_topic_menu->fetch())
{ ?>
campaign[c] ='
<a href="<?=$site->uri.$topics_array[$campaigns_topic_menu->id];
?>/">&(campaigns_topic_menu.extra);</a>'
c++
<?}?>

Comments

Popular posts from this blog

django realtime currency rate

Its been a really long time since I post something here For some dumb reason, I forgot my blogger login/password :hammer: Anyway, since I'm now heavily work with django stuff Here are some django related projects that hopefully can benefit anyone who need it * django-currency_rate, simple django app that can give you realtime currency rate base on http://themoneyconverter.com . Owh its even can calculate the rate with templatetag :) https://github.com/avenpace/django-exchange_rate

python-oauth2 hack

When you are using python-oauth2 from simplegeo on your Google App Engine instance, you'll get some exception that cause by "ImportError: No module named httplib2" Yes, apparently httplib2 are not supported by GAE and instead they oblige you to use google.appengine.api.urlfetch.fetch instead So I hack python-oauth2 to use google.appengine.api.urlfetch.fetch You can found my python-oauth2 fork on https://github.com/avenpace/python-oauth2

Yet another online shop launch

For housewife who use to work, daily activities are dull and boring. So I've been persuade my wife to run online shop to add variation on her daily routine. Finally we decided to start selling clothing goods and knick knacks, some are airbrush paint t shirt, woman snake leather handbag are there also Since I've been working with python, I came out to use satchmo for our online shop framework After doing customizing here and there and build some payment modules, we lauch WarungRupa.com  on early January 2012 We have some ideas which are still in our thoughts and we keen to work on it Hope WarungRupa.com  can have many visitors and buyers Next to do are SEO and promotions ^_^