2

I was working on CakePHP as part of class project. I had to demonstrate AJAX. So I created some text files filled with random Wikipedia articles. On drop down item change, my AJAX handler would fetch the content of corresponding file and return it back.

But the problem was, it wasn't returning just the file content, but the whole HTML document. So the calling page would get another set of header, menu, footer and all! There was no time to fix layout for AJAX calls as it was added at last minute before the presentation. So, I just hid the duplicate menu etc using CSS and went for the presentation. It passed with flying colours.

So, if you can't fix something, just hide it! 😂

Comments
Add Comment