3

Hi I am using smartwizard 2.0 plugin and I wonder if someone can help me out here.

Basically I am trying to add one more menu dynamically when user clicks the some button. I have given 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 am facing is the added menu is not working according to the functionality.

Any help is greatly appreciated.

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

Dipu Raj
  • 1,784
  • 4
  • 29
  • 37

1 Answers1

0

I may be late but you should try calling the smartWizard function again after adding the new menu.

Synryu
  • 38
  • 8
  • after calling the smartwizard function again there is no luck even i tried with binding the ready function in document and triggered after the added the tab – Chandru velan Jul 08 '13 at 13:04