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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T11:58:39+00:00 2026-05-25T11:58:39+00:00

Background: The website I am working on has a search bar at the top.

  • 0

Background: The website I am working on has a search bar at the top. The user inputs a part code for a product and the website returns information about that product.

So, I have a basic search bar that posts parameters from a HTML form into a PHP script, which then does a lookup on a MySQL server to get the Product.

The problem is because some part codes have “#” characters, I have to use Javascript to insert escape characters, otherwise I only get some of the part code in the PHP script.

Example – 123#ABC would be read as 123.

I use a hidden value in the form, which is populated with the Text Box value, modified by the escape() function in Javascript.

This is my code currently, it works in every browser except for IE.

Any help would be much appreciated 🙂

<script language="jscript">
    function changeTextBox()
    {
        hiddenSearch.value = escape(txtSearch.value);
        formSearch.submit;
    }
</script>

<form id="formSearch" name="Search" action="?page=search" method="post">
    Search by <u>Part Code</u> or <u>Description</u>
    <input id="txtSearch" type="text" size="35">
    <input id="hiddenSearch" name="Search" type="hidden">
    <input name="Submit" onclick='jscript:changeTextBox();' type="submit" value="Submit">
</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-05-25T11:58:40+00:00Added an answer on May 25, 2026 at 11:58 am

    take a look at changes– i think there were issues with your javascript.

       <script language="jscript">
            function changeTextBox()
            {
                document.getElementById("hiddenSearch").value = escape(document.getElementById("txtSearch").value);
                this.submit();
            }
        </script>
    
    <form id="formSearch" name="Search" action="?page=search" method="post" onsubmit='changeText()'>
        Search by <u>Part Code</u> or <u>Description</u>
        <input id="txtSearch" type="text" size="35">
        <input id="hiddenSearch" name="Search" type="hidden">
        <input name="Submit"  type="submit" value="Submit">
    </form>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The website I am working on has a repeating background pattern applied to the
I'm working on a website where the homepage has a dark background, yet all
Background: I'm working on an e-commerce website. It was my original intention to add
I have a website im working on and right now it has a gradient
The website I'm working on has a menu that includes a logo image as
I'm working on an Asp.net website (it's been awhile) coming from an MVC background.
I'm working on a band website that has a Flash-based music player always visible.
I need to make a background for a website cover the entire screen, BUT
I have a website that I'm making that needs a background resizer. Currently, I
I have a website that requires a very large background image. The page loads

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.