So this is what i have:
a textbox, label as a link with id of #gen, and an anchor.
what ever i set in the texbox, should transfer to the anchor href attribute after i click on #gen label.
im PRETTY sure i just about have this correct. lol it’s driving me nuts why it’s not working!
html:
<input type='text' value='' />
<label id='gen'>Generate</label>
</br></br>
<a href=''>Download</a>
JQuery:
var textbox=$('input[type="text"]'); //texbox target into a var//
var address=$(textbox).val(); // var address//getting Vaue of textbox. Use it for address into link.
$('#gen').click( function(){
$('a').attr('href', address);
//$(textbox).val('Download Ready!');
});
oh yea, i used to have a value in the texbox set but i took it off cuz that would transfer to the anchor href.
Thanks in advance guys!
Try this
HTML
JS
DEMO.
I think you should use an
idwith thea tagand can use abuttoninstead oflabelsee this.