Foren

Script not works

Madasamy P, geändert vor 6 Jahren.

Script not works

Junior Member Beiträge: 90 Beitrittsdatum: 27.07.16 Neueste Beiträge
<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, geändert vor 6 Jahren.

RE: Script not works

New Member Beiträge: 4 Beitrittsdatum: 19.07.11 Neueste Beiträge
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, geändert vor 6 Jahren.

RE: Script not works

Junior Member Beiträge: 90 Beitrittsdatum: 27.07.16 Neueste Beiträge
Thank you pedro