2012-11-27, 03:13 PM
I've been trying in vain to incorporate an ajax menu into some code I'm writing. I have no idea why it won't work but I've tried everything I can think of.
The javascript looks right, and I even have a working script outside of mybb; but as soon as I try to integrate it into my script, I get weird behavior: either nothing happens, or the entire page gets returned where the ajax is supposed to fire (so I have a page within a page). I've also tried moving things to a separate file, but it only works with an echo, which puts the new content before anything else.
I feel I'm close, but I don't think I know enough about front end to find the issue, and I'm about at my wits end
I've attached both a clean version of my code and the working example I have. The specific lines I'm working with are around the 265-ish area.
Can anyone offer any ideas of why it's doing what I described above? Or help me integrate the ajax menu into the code?
Thanks for reading.
The javascript looks right, and I even have a working script outside of mybb; but as soon as I try to integrate it into my script, I get weird behavior: either nothing happens, or the entire page gets returned where the ajax is supposed to fire (so I have a page within a page). I've also tried moving things to a separate file, but it only works with an echo, which puts the new content before anything else.
I feel I'm close, but I don't think I know enough about front end to find the issue, and I'm about at my wits end
I've attached both a clean version of my code and the working example I have. The specific lines I'm working with are around the 265-ish area.
Can anyone offer any ideas of why it's doing what I described above? Or help me integrate the ajax menu into the code?
Thanks for reading.