Solution 1 :

Try the following:

$('form[name=  "Log"]').on('submit',function(){
    window.location = 'about.html'; //or whatever is the name of the html file
});

Problem :

I have embedded a login and sign-in page on my homepage. but what I want is, if submit is clicked on sign in page, then a new page ‘about’ should be opened – not as embedded but as homepage goes to about page.

Before I tried to load the page into the homepage through jquery but code was not working at all

homepage


<body>
    <header>

        <div class="btn"><button class="login">login</button><button class="sign">signup</button></div>
<div class="login" id="log" name="Login">

     <embed src="login.html" class="login hidden" style="width:45%; 
     height:auto !important; border:none;"></embed>


</div>
<div class="signup">
       <embed src="signup.html" class="signup hidden" 
        style="width:50%; height:50% !important; border:none;" 
       scrolling="no"></embed>

<script type="text/javascript">





$('button.login').on('click',function(){

    $('embed.login').removeClass('hidden');
    $('embed.signup').addClass('hidden');   
}); 


$('button.sign').on('click',function(){
    $('embed.signup').removeClass('hidden');
    $('embed.login').addClass('hidden');


});



</script>


signin page code

<body>
<form class="hidden login" name="Log"><input type="email" name="email" placeholder="enter email" required>
        <input type="password" name="password" placeholder="enter password" required>
        <button > submit</button>
    </form>

Comments

Comment posted by sid

my signin page is embed in home page i want that if someone signin from embed page of signin then from home page user goes to about page not in the embed section

By