Hello all. We have purchased the engraving script that works very well. but we found a website that does a very similar script but adds something else - a way for the text to be typed, but also placed above a jpg. This gives the engraving a visual look - https://www.roadid.com/Builder/Builder. ... tyle=WRIST Ive found some code for that to happen -
<p id="line1"> </p>
<p> </p>
<p id="line2"> </p>
<input type="text" onkeyup="document.getElementById('line1').innerHTML=this.value">
But not sure how to add that to the engraving array. any ideas would be helpful
Engraving add on?
Re: Engraving add on?
This would require some skill to implement. Here is an untested suggestion as to how this might be done.
Overlay a DIV onto your product image and give it an ID like
<div class="myoverlaytext" id="text_<actinic:variable name="ProductID" />"> </div>
(I'm not a CSS expert so can't help further on how to do this.)
Edit textfieldsupport.js and look for the block of code
replace it with
Overlay a DIV onto your product image and give it an ID like
<div class="myoverlaytext" id="text_<actinic:variable name="ProductID" />"> </div>
(I'm not a CSS expert so can't help further on how to do this.)
Edit textfieldsupport.js and look for the block of code
Code: Select all
function countallchars(prodref){
var chars = 0;
var maxlines = document.getElementById('inf0' + '_' + prodref).value;
for ( var i = 1; i <= maxlines; i++ ) // for all length entries
{
if ( document.getElementById('inf' + i + '_' + prodref) )
{
var thisline = document.getElementById('inf' + i + '_' + prodref).value
thisline = thisline.replace(/\s/g,''); // remove spaces
chars += thisline.length;
}
}
return chars;
}
Code: Select all
function countallchars(prodref){
var text = ''; // text to overlay image
var chars = 0;
var maxlines = document.getElementById('inf0' + '_' + prodref).value;
for ( var i = 1; i <= maxlines; i++ ) // for all length entries
{
if ( document.getElementById('inf' + i + '_' + prodref) )
{
var thisline = document.getElementById('inf' + i + '_' + prodref).value
text += thisline + '<br/>'; // add to overlay text
thisline = thisline.replace(/\s/g,''); // remove spaces
chars += thisline.length;
}
}
if ( document.getElementById('text_' + prodref) ) // have we an overlay area
{
document.getElementById('text_' + prodref).innerHTML = text;// display text in overlay
}
return chars;
}
Norman