Jump to content

[SOLVED] Click link -> fill input value


Brandon Jaeger

Recommended Posts

I need to be able to click a link like this:

<a href="#" onclick="someFunction('input_value', 'field_name');return false;">link</a>

and have it fill whatever form object is named field_name with the value input_value.

 

Visual example:

 

User clicks that link above...

 

[input_value    ]

 

Then it fills it the value="" parameter of the form object.

 

I would make it, but I'm really bad at JavaScript.

 

Help is appreciated!!

 

Thanks

Brandon

Link to comment
https://forums.phpfreaks.com/topic/127585-solved-click-link-fill-input-value/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.