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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T18:11:02+00:00 2026-06-08T18:11:02+00:00

How to send enter from javascript to site? What I real need is to

  • 0

How to send enter from javascript to site?

What I real need is to send text to site like filehippo.com in search box, and press enter to search for those text.
So piece of code from site is:

<div id="searchbox">
<form name="f" action="/search">
<input style="color: #999" type="text" id="q" name="q" maxlength="150" value="Search..." onfocus="javascript:clearInputValue('q', 'Search...')" onblur="javascript:setDefaultIfEmpty('q', 'Search...')">
<input type="submit" id="search-submit" value="GO" onclick="javascript:submitQuery('q', 'Search...')">
</form></div>

And my simple code look like this:

javascript: document.getElementById('q').focus();document.getElementById('q').value='Winrar';document.getElementById('f').item(0).click();

And those script just put focus on search box and send text to them, but I need also to do automatically search (send enter), how to do that?

document.getElementById('f').item(0).click(); -> dont work

What I need is to simulate click of mouse, by enter, cause can’t send click to element that work properly.

Is it possible to send enter with text?

  • 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-08T18:11:03+00:00Added an answer on June 8, 2026 at 6:11 pm

    Use document.f.submit(); to submit the form.

    The problem is that there are multiple forms named ‘f’

    javascript:document.f[0].submit();
    

    So the fully functional line would be:

    javascript:document.getElementById('q').value='Winrar';document.f[0].submit();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Send Text Messages (SMS) From Android When Near A Predefined Location... Ex. i enter
I send an email from my smtp server, for example, setting From to anyemail@anydomain.com
I am using javascript validation for my input box from javascript-coder and it works
I'm writing a C program under Windows that should send an ENTER key to
The server should send a message Hello :: enter QUIT to exit to the
I want to send a textarea's data when user presses shift + enter ,
I am trying to send an email message with data collected from an html
I am using jQuery to load the search results from a php class when
in SO you can search for tags without pressing enter. i want to know:
I have use Ajax and jquery for get data from database and send data,

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.