1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Onclick Text

Discussion in 'JavaScript' started by dew1234, Mar 7, 2013.

  1. #1
    Hi everyone,
    I am building a page similiar to this: Example
    i have most of it done so far: My code
    I just don't know how to create a function to:
    Onclick text --> text appears in input boxes
    Solved! View solution.
    dew1234, Mar 7, 2013 IP
  2. #2
    I am not a good programmer, but I try your code :

    in fruits link change :
    Code (Text):
    1. <a href="#" onclick="show_visibility('foo1','myinput','some fruits here!')">
    added myinput and 'some fruits here' text to pass to function show_visibility.

    function visibility change to :
    Code (Text):
    1. function show_visibility(IDS,txtb,thetext){
    2.   hide_visibility();
    3.   document.getElementById(IDS).style.display = 'block';
    4.   document.getElementById(txtb).value=thetext;
    5. }
    hope that help and probably other member have a better solution..
    bluebenz, Mar 8, 2013 IP
  3. dew1234

    dew1234 Peon

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    1
    #3
    I have already found a solution! Thank you so much for your response though!
    dew1234, Mar 8, 2013 IP