Good day! Here's a problem I have such a div for example
<div> <form action='update_user.php' method='post' enctype='multipart/form-data'> ΠΠ·ΠΌΠ΅Π½ΠΈΡΡ Π°Π²Π°ΡΠ°Ρ:<br> ΠΠ·ΠΎΠ±ΡΠ°ΠΆΠ΅Π½ΠΈΠ΅ Π΄ΠΎΠ»ΠΆΠ½ΠΎ Π±ΡΡΡ ΡΠΎΡΠΌΠ°ΡΠ° jpg, gif ΠΈΠ»ΠΈ png. <br> <input type="FILE" name="fupload"> <input type='submit' name='submit' value='ΠΈΠ·ΠΌΠ΅Π½ΠΈΡΡ'> </form> </div>
and there are two links to launch functions like this
<div class="classnewsbg"> <a href="javascript:Swapsettings('osnov')">ΠΡΠ½ΠΎΠ²Π½ΡΠ΅ Π½Π°ΡΡΡΠΎΠΉΠΊΠΈ</a> </div> <div class="classnewsbg"> <a href="javascript:Swapsettings('personal')">ΠΠ΅ΡΡΠΎΠ½Π°Π»ΡΠ½ΡΠ΅ Π½Π°ΡΡΡΠΎΠΉΠΊΠΈ</a> </div>
the essence of the task is that the content of the Diva with the form when you click on a link changes to another, say, another
I tried it like this
<script src="javascript/jquery-1.10.2.min.js" type="text/javascript"></script> <script type="text/javascript"> function Swapsettings(swapto) { if (swapto == 'osnov') { $(".settings").replaceWith("<div class='settings'><?php require_once('phpscripts/ossettings.php');?></div>"); } else if (swapto == 'personal') { $(".settings").replaceWith("<div class='settings'>Π’ΡΡ Ρ
ΡΠΌΠ» ΠΊΠΎΠ΄ Ρ ΡΠΎΡΠΌΠΎΠΉ </div>"); } } </script>
But neither the insertion of the finished code into the function nor the insertion of the code from the file helps. Tell me how best to do?