Foros de discusión

Script not works

Madasamy P, modificado hace 6 años.

Script not works

Junior Member Mensajes: 90 Fecha de incorporación: 27/07/16 Mensajes recientes
<li class="maintab" style="background: #FAA519;"><a href="#tabs-1">PROJECT</a></li>
<li class="maintab" style="margin-top: 7px; "><a href="#tabs-2">GENERAL</a></li>

<form name="fm" id="fm" >
<div id="tabs-1">
<input type="text" id="Notifyamnet" name="Notifyamnet" autocomplete="off" onkeypress="Notifyamnet()" style="width:97.5%;"/>
</div>
<div id="tabs-2">
<input type="text" id="eauthorto" name="eauthor " autocomplete="off" onkeypress="eauthorto()" style="width:97.5%;"/>
</div>
</form>

this is my form I'm getting an html content inside form by $("#fm").html(); to store it as a file in document and media
and get the file content when I need and replace the form html by file contents

$("#fm").html(content);

It replaces the form value correctly but the script function not works i.e., the tab not works
thumbnail
Pedro Martínez, modificado hace 6 años.

RE: Script not works

New Member Mensajes: 4 Fecha de incorporación: 19/07/11 Mensajes recientes
Looks like you are changing the tab div after the render so the script can't fork the new one.
You'll need to call again the tab render every time you change the content of the form.

YUI().use(
'aui-tabview',
function(Y) {
new Y.TabView(
{
srcNode: '#myTab'
}
).render();
}
);
Madasamy P, modificado hace 6 años.

RE: Script not works

Junior Member Mensajes: 90 Fecha de incorporación: 27/07/16 Mensajes recientes
Thank you pedro