Adding a dynamic submenu for smartwizard 2.0

Hi, I am using smartwizard 2.0 plugin and I am wondering if anyone can help me here.

Basically I try to add another menu dynamically when the user clicks on some button. I gave the code below.

function add_submenu() {
        var ulid = document.getElementById("ulsub1");
        var newli = document.createElement("li");

        newli.innerHTML = "<a href=\"#step-7\" class=\"done\" isdone=\"1\" rel=\"7\"><label class=\"stepNumber\">7</label><span class=\"stepDesc\">Dy Coupon<br /></span></a>";
        ulid.appendChild(newli);

        var maintab = document.getElementById("stpContainer");
        var newdiv = document.createElement("div");
        newdiv.setAttribute('id', 'step-7');
        newdiv.setAttribute('class', 'content');
        newdiv.setAttribute('style', 'display: block;');
        newdiv.innerHTML = "<h2 class=\"StepTitle\">Dynamic Coupon</h2><table cellspacing=\"3\" cellpadding=\"3\" align=\"center\"><tr><td align=\"center\" colspan=\"3\">&nbsp;</td></tr><tr><td align=\"right\">Hello Name :</td><td align=\"left\"><input type=\"text\" id=\"coupon-8\" name=\"Coupon Name\" class=\"txtBox\"></td><td align=\"left\"><span id=\"msg_firstname\"></span>&nbsp;</td></tr></table>";
        maintab.appendChild(newdiv);
}

The problem I encountered is that the added menu does not work according to the functionality.

Any help is greatly appreciated.

you can find smartwizard 2.0 on this website http://techlaboratory.net/products.php?product=smartwizard&action=2

+3
source share
1 answer

I'm probably late, but after adding a new menu, you should try calling the SmartWizard function again.

0
source

All Articles