Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript how to not show ugly profile after form submit

  • This topic is empty.
Viewing 1 post (of 1 total)
  • Author
    Posts
  • #151564
    rahul kapoor
    Participant

    hey, please help i am working on a project in which when form submits it inserts into “posts” table and after that it shows profile.php page beneath the user profile , is there anything i can do so that it doesn’t show that.

    mine javascript code:

    $(document).ready(function() {
    
        var options = { 
        beforeSend: function() 
        {
            $("#progress").show();
            //clear everything
            $("#bar").width('0%');
            $("#message").html("");
            $("#percent").html("0%");
        },
        uploadProgress: function(event, position, total, percentComplete) 
        {
            $("#bar").width(percentComplete+'%');
            $("#percent").html(percentComplete+'%');
    
    
        },
        success: function() 
        {
            $("#bar").width('100%');
            $("#percent").html('100%');
    
        },
        complete: function(response) 
        {
            $("#message").html(""+response.responseText+"");
        },
        error: function()
        {
            $("#message").html(" ERROR: unable to upload files");
    
        }
    
    
    };
    
         $("#myForm").ajaxForm(options);
    
    
    });
    

    <form id="myForm" action="" method="post" enctype="multipart/form-data">
    <input type="text" placeholder="Title of the song" name="title_hoot">
    <input type="text" placeholder="Artist Name" name="artist_hoot">
    <input type="file" size="60" name="myfile">
    <input type="submit" id="hootthissong" value="Hoot This Song">
    </form>

Viewing 1 post (of 1 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.