I'm using mootools-core-1.3.2.js to hide/show a div tag.
Now what I want to do is :
* slide the div tag away (done and works);
* get the value from the "horizontal_status" and put in in PHP var to toggle something else
Here's the javascript code:
<script type="text/javascript">
window.addEvent('domready', function() {
var status = {
'true': 'open',
'false': 'close'
};
// -- horizontal
var myHorizontalSlide = new Fx.Slide('site_layout_sidebar', {mode: 'horizontal'});
$('h_slidein').addEvent('click', function(event){
event.stop();
myHorizontalSlide.slideIn();
});
$('h_slideout').addEvent('click', function(event){
event.stop();
myHorizontalSlide.slideOut();
});
$('h_toggle').addEvent('click', function(event){
event.stop();
myHorizontalSlide.toggle();
});
$('h_hide').addEvent('click', function(event){
event.stop();
myHorizontalSlide.hide();
$('horizontal_status').set('text', status[myHorizontalSlide.open]);
});
$('h_show').addEvent('click', function(event){
event.stop();
myHorizontalSlide.show();
$('horizontal_status').set('text', status[myHorizontalSlide.open]);
});
// When Horizontal Slide ends its transition, we check for its status
// note that complete will not affect 'hide' and 'show' methods
myHorizontalSlide.addEvent('complete', function() {
$('horizontal_status').set('text', status[myHorizontalSlide.open]);
});
});
</script>
How do I get the $('horizontal_status') into a PHP var so that I can do something with that?
Thanks in advance