Format of Last Extra Info Prompt

Collect several lines of customer entered data with a product.
Post Reply
gtkeen
Posts: 5
Joined: Sun Sep 03, 2006 3:08 pm

Format of Last Extra Info Prompt

Post by gtkeen »

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 + 8), -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
norman
Site Admin
Posts: 1252
Joined: Sat Feb 07, 2004 9:55 pm

Re: Format of Last Extra Info Prompt

Post by norman »

You don't need any JavaScript tweaking. Just make sure the last promt has a space after it. Said space will be invisible but should work fine.
Norman
gtkeen
Posts: 5
Joined: Sun Sep 03, 2006 3:08 pm

Re: Format of Last Extra Info Prompt

Post by gtkeen »

Thank you, that worked a treat.

As you can see the space at the end, its quite an easy one to miss.

Thanks for your time as always.
Post Reply