wwfc_barmy_army
02-04-2006, 10:09 AM
Hello.
I am currently using this code on my website so that the user can copy the info in the textbox:
<input type="submit" name="Submit" value="Copy Code" onClick="CopySelection(<?php echo "Pro".$qry['ProductID'] ?>)">
I've had a further look and i believe this is to do with it (found in the same file):
<script language="JavaScript">
function CopySelection(Control)
{
// alert(ControlID.value);
Control.focus();
Control.select();
CopiedTxt = document.selection.createRange();
CopiedTxt.execCommand("Copy");
}
</script>
I have found that this doesn't work in firefox but it does in IE. How can i change this code so it works in firefox too?
Thanks in advance.
Regards.
P Plant.
I am currently using this code on my website so that the user can copy the info in the textbox:
<input type="submit" name="Submit" value="Copy Code" onClick="CopySelection(<?php echo "Pro".$qry['ProductID'] ?>)">
I've had a further look and i believe this is to do with it (found in the same file):
<script language="JavaScript">
function CopySelection(Control)
{
// alert(ControlID.value);
Control.focus();
Control.select();
CopiedTxt = document.selection.createRange();
CopiedTxt.execCommand("Copy");
}
</script>
I have found that this doesn't work in firefox but it does in IE. How can i change this code so it works in firefox too?
Thanks in advance.
Regards.
P Plant.