While inside a lightbox, I want to execute the following code and still remain in the lightbox. Currently it displays the results in the main browser window. I tried removing “parent” from the code below, but this did not help.
Lightbox is just a div stylized to be on top of your page
That means you can’t load content to that div with location.href (because it will change entire page)
You should use AJAX
Example for jQuery: