I created an ajax based contact form in my module.Then I made a block view for the form. I tried putting that block to several regions. When I put the block to ‘Sidebar Second’ the form works as desired.But when I put the same block to ‘contact’ Region (custom region) , the form’s ajax part does not work .
This is the code I used to print the block .
$contact = render(block_get_blocks_by_region('contact')); print $contact;
When I inspect the element the form-id is ‘myform’ as given by me . Still the ajax part is not working .