Hi,
i have several links which i am trying to add an on click command to which copies a certain code to the clip board so the user can paste the code with out having to manually copy it first.
i have this
but when i click on the link nothing seems to copy
at least in firefox anyway? can anyone help me please
thanks
Luke
i have several links which i am trying to add an on click command to which copies a certain code to the clip board so the user can paste the code with out having to manually copy it first.
i have this
Code:
$latest = simplexml_load_file('codes_ending_soon.xml');
foreach ($latest->discount as $discount)
{
$code = $discount->id;
$link = $discount->link;
$store = $discount->storeName;
$logo = $discount->logo;
$details = $discount->details;
if($code_count <=4)
{?>
<div class="code_cont">
<div class="code_logo"><img src="<?php echo $logo?>" alt="<?php echo $store." code"?>" title="<?php echo $store." code"?>" height="32" /></div>
<a class="code" href="<?php echo $link?>" title="Click to see related product(s) / retailer and apply code" onclick="window.clipboardData.setData(<?php echo $code?>)"><?php echo $code?></a>
<div class="description"><?php echo $details?></div>
</div><?php
$code_count++;
}
}?>

thanks
Luke
Comment