That has nothing to do with Laravel, and not even PHP.
This is a javascript issue, and not even with pure javascript can you solve this in a good way. Google "javascript copy clipboard" and you will find alternatives to solve the problem.
I found solution but this solution for one textbox and one button copy any help to make code javascript create copy many textbox and many button
$('button#copy-dynamic').zclip({
path:'/ibportal/public/assets/js/ZeroClipboard.swf',
copy:function(){return $('input#link').val();},
beforeCopy:function(){
$('input#link').css('background','green');
$(this).css('color','orange');
},
afterCopy:function(){
$('input#link').css('background','white');
$(this).css('color','purple');
$(this).next('.check').show();
}
});
view code
<?php
$index = 1;
?>
@foreach($oLinks as $oLink)
<div class="controls">
{{ Form::label( 'Link','link '.$index++,array('class'=>'btn btn-primary ')) }}
{{Form::text('link', 'http://www.appits.com/'.$oLink->link ,array('class'=> 'span8','id'=>'link'))}}
{{ Form::button( 'COPY', array('class'=>'btn btn ','id'=>'copy-dynamic')) }}
</div>
Thanks
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community