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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T14:09:39+00:00 2026-05-21T14:09:39+00:00

I want to draw a form where there will be some textarea, on the

  • 0

I want to draw a form where there will be some textarea, on the textarea there will be a little image [the image’s size will be smaller than the size of the textarea], and clicking on the image will call a function fx()
Can anyone code this for me in JavaScript/jquery/CSS ?

Sample Image

In this image the GO is an image, clicking on it will call Fx()

i tried with it and failed (and dont know how to attach a function on the image)

.searchform {
display: inline-block;
padding: 3px 5px;
}
.searchform input {
font: normal 12px/100% Arial, Helvetica, sans-serif;
}
.searchform .searchfield {
background: #fff;
padding: 6px 6px 6px 8px;
width: 202px;
border: solid 1px #bcbbbb;
outline: none;
}
.searchform .searchbutton {
color: #fff;
border: solid 1px #494949;
font-size: 11px;
height: 27px;
width: 27px;
}


<form class="searchform">
<input id="t" class="searchfield" value="Search..." type="text">
<input class="searchbutton" value="Go" type="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-05-21T14:09:40+00:00Added an answer on May 21, 2026 at 2:09 pm

    What I would do is

    • Place the “go” element before the textarea, make it position: absolute so it hovers over the top left corner of the area

    • Put a wrapper with position: relative around the elements

    • Use jQuery’s .width() and .height() functions to adjust the position of the “go” element.

    HTML:

    <div id="wrapper">
    <div id="go">Go</div> 
    <textarea id="area" rows=33 cols=22></textarea>
    </div>
    

    CSS:

    #wrapper { position: relative }
    #go { width: 16px; tpp: 16px; position: absolute; background-color: yellow }
    

    JS:

    $(function(){
    $("#go").css("left", $("#area").width() - $("#go").width());
    $("#go").css("top", $("#area").height() - $("#go").height());
    });
    

    http://jsfiddle.net/WUnQW/

    There’s an even simpler approach that doesn’t need JavaScript at all, but uses display: inline-block which won’t work properly in IE6/7 (although I guess it could be made work in IE7 by using a span instead of a div for wrapper).

    http://jsfiddle.net/WUnQW/6/

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

Sidebar

Related Questions

I want to draw some lines and rectangles on a panel. Sometimes it does
I want to draw some listview items disabled and would like to mimic the
I want to draw a rectangle on a form in C#. I read and
I want to draw random shapes in random colors in an image using python.
I have a PDF file that I want to draw in outline form. I
I have winform with a TextBox and I want to draw some GDI graphics
so having a canvas and canvasContext I want to draw an image onto that
I have some Label controls sitting on Panel controls on a Form. I want
I want to plot a function in a form without the forms background being
I want to draw form like this (Windows Form or I don't what it

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.