Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8880089
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T20:05:53+00:00 2026-06-14T20:05:53+00:00

I’m pretty sure it has to do with my core.js file with the ajax

  • 0

I’m pretty sure it has to do with my core.js file with the ajax hashing url. But I’m trying to submit a form, but it’s not submitting like I want it to. This is the core.js file:

// call init
$(init);


function init() {
    ajax_page_handler();
    page_load($(window.location).attr("hash")); // goto first page if #! is available
}

function page_load($href) {
    if($href != undefined && $href.substring(0, 2) == '#/') {
        // replace body the #content with loaded html
        $('#content').load($href.substring(2), function () {
            $('#content').hide().fadeIn('slow');
        });
    }
}

function ajax_page_handler() {
    $(window).bind('hashchange', function () {
        $href = $(window.location).attr("hash");
        page_load($href);
    });

    // this allow you to reload by clicking the same link
    $('a[href^="#/"]').live('click', function() {
        $curhref = $(window.location).attr("hash");
        $href = $(this).attr('href');
        if($curhref == $href) {
            page_load($href);
        }
    });
}

The live viewing is over at http://www.krissales.com. The form is here: http://www.krissales.com/#/media/5.Testing-1

Hit the link “Post Comment”, then you’ll type info in, then hit comment, but it just refreshes, but doesn’t submit it.

The steps I’ve taken to solve it was in the comment file, in the form action field, I inserted the tag name="#content" simply because that’s the name of my div that I’m submitting to.

The original stuff is on http://blog.krissales.com/article/7.Testing-3-man ( where you can actually post a comment, and it’ll work)

But apparently it’s not working. Do you guys have a clue as to what it is that I’m doing wrong? thanks for your help in advance!

<script type="text/javascript">
    tinyMCE.init({
        mode : "textareas",
        theme : "simple"
    });
</script>
<form action="#/media/article.php" name="#content" method="POST">

    Name:
    <br />
    <input type="text" name="name" class="userpass"/>
    <br /><br />
    Comment:
    <br />
    <textarea id="elm1" name="comment" rows="7" cols="30" style="width: 500px;"> 
    </textarea>
    <br />
    <input type="submit" name="submit" value="Comment" class="button" />
    <input type="reset" name="submit" value="Reset" class="button" />

</form> 
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T20:05:54+00:00Added an answer on June 14, 2026 at 8:05 pm

    Your current core.js handles changes in the URL hash, and it reroutes any links with a hash to load that relative path into #content. What’s missing is code to redirect form submits to do the same thing (add this to ajax_page_handler):

     $('form').live('submit', function(e) {
        var $action = $(this).attr('action');
    
        if($action.substring(0, 2) == '#/') {
            // replace the #content with result of the form post
            $.ajax({
                url: $action.substring(2),
                type: $(this).attr('method'),
                data: $(this).serialize(),
                success: function(data) {
                    $('#content').html(data);
                    $('#content').hide().fadeIn('slow');
                }
            });
            // stop the real form submit from happening
            e.preventDefault();
        }
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm not entirely sure how I managed to jack this up. http://pretty-senshi.com If you
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I want to count how many characters a certain string has in PHP, but
In my XML file chapters tag has more chapter tag.i need to display chapters
I am trying to render a haml file in a javascript response like so:
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I'm trying to convert HTML to plain text. I get many &\#8217; &\#8220; etc.
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
link Im having trouble converting the html entites into html characters, (&# 8217;) i

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.