Support the ongoing development of Laravel.io →
Views Blade
Last updated 2 years ago.
0

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.

0

Thanks mengidd

0

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

0

Sign in to participate in this thread!

Eventy

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.