Forums

Admin Ajax to clone metabox (1 post)

  1. Dale Sattler
    Member
    Posted 4 months ago #

    HI,

    Interesting issue I'm having.

    I've set up a metabox class which I'm trying to allow for the ability of cloning metaboxes within via javascript. Each metabox is a new instance of this class.

    I've set up a standard wp_ajax call. The functions are executing correctly.

    However, the issue I have is that when I have more than one metabox then the wp_ajax call is highjacked by the first metabox instance, so it always returns the incorrect metabox html code.

    What I need to figure out is how to get a javascript call from say the second metabox to be resolved by that metaboxes constructing class.

    Any ideas on how to approach getting around this?

Reply

You must log in to post.

About this Topic