Format of Last Extra Info Prompt
Posted: Sat Jul 04, 2009 2:05 pm
Dear Norman,
Please could you have a look at the following page (first item on the page) :
http://www.pettag.co.uk/acatalog/Medica ... _Care.html
I am trying to get the last extra info field to appear on the same line as the heading. I assume I need to edit the actiniccore.js file ?
The file currently has the following in it :
------------------------------------------------------------------------------------------------------------------------------------
function setotherinfo(pre, name, size, max) {
// alert('Pre ' + pre + ' Name ' + name + ' Size ' + size + ' Max ' + max);
var prodref = name.substr(8); // the product reference part start
var prodref = prodref.slice(0, -1); // lose the > char
var p1 = prodref.indexOf('"'); // end of the text
var prodvalue = prodref.substr(p1 + 1); // any additional value text
prodref = prodref.substring(0, p1); // the actual prodref
// see if simple form
if (pre.indexOf('|') == -1 )
{
// alert('Simple ' + name + ' Prodref-' + prodref + '-Value-' + prodvalue + '-');
document.write(pre + '<INPUT TYPE=text NAME="O_' + prodref + '" ' + prodvalue + ' SIZE="' + size + '" MAXLENGTH="' + max
+ '" onchange="stripspecial(\'O_' + prodref + '\')">');
}
else
{ // now have a complex selection
var p1 = pre.indexOf('<BR>');
var before = pre.substring(0, p1 + 4); // before the prompt.
var rest = pre.substr(p1 + 4); // whats after the <BR>
p1 = rest.indexOf('<BR>'); // final <BR>
var prompt = rest.substring(0, p1); // the prompt text.
var after = rest.substr(p1 + 4); // after the prompt (we don't need this data).
// alert('Complex-' + name + '- Prodref-' + prodref + '- Value-' + prodvalue + '-');
if ( prodvalue == '') // we're not bouncing back with an error
{
var items = prompt.split('|'); // create default list from prompt text
var S = ' value="'
for (var I = 0; I < items.length - 1; I++) S += items + '¬ ¦ ';
S += items[items.length - 1] + '¬';
}
else
{
p1 = prodvalue.indexOf(' VALUE="'); // we've had an error bounce
var S = prodvalue.slice((p1 + , -1); // so extract the old data
var items = S.split(' ¦ '); // the items and their data
S = prodvalue.slice(p1, -1); // the value="..." substring
}
------------------------------------------------------------------------------------------------------------------------------------
I am not sure what i need to change
You will also see this item has your Terms and Conditions Tick Box dev work you did for us which is working lovely.
Many Thanks
Giles
Please could you have a look at the following page (first item on the page) :
http://www.pettag.co.uk/acatalog/Medica ... _Care.html
I am trying to get the last extra info field to appear on the same line as the heading. I assume I need to edit the actiniccore.js file ?
The file currently has the following in it :
------------------------------------------------------------------------------------------------------------------------------------
function setotherinfo(pre, name, size, max) {
// alert('Pre ' + pre + ' Name ' + name + ' Size ' + size + ' Max ' + max);
var prodref = name.substr(8); // the product reference part start
var prodref = prodref.slice(0, -1); // lose the > char
var p1 = prodref.indexOf('"'); // end of the text
var prodvalue = prodref.substr(p1 + 1); // any additional value text
prodref = prodref.substring(0, p1); // the actual prodref
// see if simple form
if (pre.indexOf('|') == -1 )
{
// alert('Simple ' + name + ' Prodref-' + prodref + '-Value-' + prodvalue + '-');
document.write(pre + '<INPUT TYPE=text NAME="O_' + prodref + '" ' + prodvalue + ' SIZE="' + size + '" MAXLENGTH="' + max
+ '" onchange="stripspecial(\'O_' + prodref + '\')">');
}
else
{ // now have a complex selection
var p1 = pre.indexOf('<BR>');
var before = pre.substring(0, p1 + 4); // before the prompt.
var rest = pre.substr(p1 + 4); // whats after the <BR>
p1 = rest.indexOf('<BR>'); // final <BR>
var prompt = rest.substring(0, p1); // the prompt text.
var after = rest.substr(p1 + 4); // after the prompt (we don't need this data).
// alert('Complex-' + name + '- Prodref-' + prodref + '- Value-' + prodvalue + '-');
if ( prodvalue == '') // we're not bouncing back with an error
{
var items = prompt.split('|'); // create default list from prompt text
var S = ' value="'
for (var I = 0; I < items.length - 1; I++) S += items + '¬ ¦ ';
S += items[items.length - 1] + '¬';
}
else
{
p1 = prodvalue.indexOf(' VALUE="'); // we've had an error bounce
var S = prodvalue.slice((p1 + , -1); // so extract the old data
var items = S.split(' ¦ '); // the items and their data
S = prodvalue.slice(p1, -1); // the value="..." substring
}
------------------------------------------------------------------------------------------------------------------------------------
I am not sure what i need to change
You will also see this item has your Terms and Conditions Tick Box dev work you did for us which is working lovely.
Many Thanks
Giles