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 8493751
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T23:06:28+00:00 2026-06-10T23:06:28+00:00

been working on this way too long…but can’t seem to identify the problem. Already

  • 0

been working on this way too long…but can’t seem to identify the problem. Already read dozens of articles on stackoverflow and elsewhere.

when I click and change the value, it doesn’t auto-submit:

   <form id="orderbyfrm" name="orderbyfrm" action="http://staging.whiterabbitexpress.com/" method="post" class="orderbyfrm">
            <input name="s" value="<?php echo $wre_search_txt?>" type="hidden">
            <label for="orderby" class="sortByLabel">Sort by&nbsp;</label>
            <select class="sortByDropdown" name="orderby" id="orderby" onchange="this.form.submit();">
                <option value="Relevance">Relevance</option>
                <option value="likes" selected="selected">Likes</option>
            <option value="comments" selected="comments">Comments</option>
            </select>
</form>

in Chrome inspector I see an error
“Uncaught TypeError: Cannot call method ‘submit’ of null” onchange

I also tried onchange=”javascript:document.orderbyfrm.submit” but that didn’t work either.

  • 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-10T23:06:30+00:00Added an answer on June 10, 2026 at 11:06 pm

    Probably you have element or JS object called form or submit somewhere, conflicting with the real form.

    Most safe way is using document.getElementById:

    <select onchange="SubmitForm('orderbyfrm');">
    

    And the JavaScript:

    function SubmitForm(formId) {
        var oForm = document.getElementById(formId);
        if (oForm) {
            oForm.submit(); 
        }
        else {
            alert("DEBUG - could not find element " + formId);
        }
    }
    

    Further debugging with good old alert.. instead of the alert("DEBUG ... have this:

    var sDebugInfo = "found " + document.forms.length + " forms: \n";
    for (var i = 0; i < document.forms.length; i++) {
        var curForm = document.forms[i];
        sDebugInfo += "name: " + curForm.name + ", id: " + curForm.id;
        sDebugInfo += "\n";
    }
    alert(sDebugInfo);
    

    Depending on what you get, debug should continue.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've been working on this problem way too long, and I'm getting nowhere. So
I've been working on this for way too long. I'm trying to put HTML
I have been up far too long tonight working on a long program. But
I have been working on this problem for 2 days now and it's an
I have been working on this for days but I don't get it so
I'm really drawing a blank on this one. I've been working on globalization but
Have been working on this question for a couple hours and have come close
I have been working on this app for at least 3-4 months and just
I have been working on this sort of ATM (With a maximum of 50
I have been working on this for few hours and got stuck, so how

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.