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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T21:01:45+00:00 2026-06-03T21:01:45+00:00

I have two html files namely file1.html and file2.html. File1 is supposed to encode

  • 0

I have two html files namely “file1.html” and “file2.html”. File1 is supposed to encode a string written in an input file and send it to file2 via URL so that it could be decoded there.

My problem is an embarrassing one as I’m having trouble while passing from file1 to file2. Here is my code:

<html>
<head>
<script type="text/javascript">
function encode()
{
    var encodeThis = document.getElementById("exampleText").value;
    document.getElementById("exampleText").value = escape(escape(encodeThis));
}
</script>
</head>

<body>

<form name="input" action="file2.html" method="get">
<input id="exampleText" type="text" name="example" value="Not strongly encoded" />
<input type="button" value="Encode and Submit!" onclick="encode()" />
</form>

</body>
</html>

When I click to submit button, I expect to send the encoded string via URL and pass to file2.html where I can process it, however I remain at my first page: “file1.html”. Which fundamental knowledge do I lack here ? Thanks in advance for your time.

  • 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-03T21:01:47+00:00Added an answer on June 3, 2026 at 9:01 pm

    Because there is no submit. Either you give the input-tag the type submit instead of button or you make a form.submit () via JS.

    document.input.submit(); should do this.

    BTW… why double-escape?

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

Sidebar

Related Questions

I have two files: master/newsletter1/file.html master/newsletter2/file.html newsletter1/file.html has a lot of new changes that
I currently have two files, register.html and register.jsp. The HTML file asks the user
I have two js files, both called by one HTML file. <script type=text/javascript src=scripts/levelmovement.js></script>
I have two files(html and js) as shown below. test.html <body> <script> /*Loads the
I have an application with two html files: app/page1.html app/page2.html These pages share dependencies,
I have two jsp files as follow: myform.jsp <%@ page contentType='text/html; charset=UTF-8' errorPage='' %>
I have three files in a folder 'test' one.php two.php print.html And i have
Afternoon, I am trying have an HTML file containing a frameset which contains two
I have two HTML input boxes, that need to calculate the time difference in
I have two web-sites and two files: provider.com/provide.js viewer.com/index.html viewer.com/index.html renders information to the

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.