Title: JavaScript

Hi,

I have this code in the class WebFormHtml.layout. My problem is the bold lines. SalesLine_ItemId is a field in a webform. I want this value in the confirm box. It only works if i chose yes to allowedit on the field properties. But I wont the properties to be no.

 if(_webrun.name() == 'HNDEPSalesOrders')
{
        parmrec         = str2int(this.getParm("cursor"));
        checksalestable = SalesTable::findRecId(parmrec);
        salesQty        = EPParameters::find().HNDSalesmax;
         #Output('var hndName;'+'\n');
        while select checksalesLine
            where checksalesLine.SalesId == checksalestable.SalesId
        {
            #Output('   if(document.'+_webrun.name()+'.fvd_qty_'+int2str(checksalesLine.recid)+'.value > '+int2str(salesQty)+'){');

            +InventTable::find(checksalesLine.itemId).ItemName+" '�nsker du � bestille';");           
            #Output('   hndName = "Itemnumber "+document.'+_webrun.name()+'.SalesLine_ItemId_'+int2str(checksalesLine.recid)+'.value;   \n');

            #Output('   conf = confirm(hndName+document.'+_webrun.name()+'.fvd_qty_'+int2str(checksalesLine.recid)+'.value);\n');

            #Output('   if(conf == false) {\n');
            #Output('   document.'+_webrun.name()+'.fvd_qty_'+int2str(checksalesLine.recid)+'.value = '+int2str(checksalesLine.SalesQty)+';}}\n');

        }
    }
I got the fail: HNDEPSalesOrders.Salesline_ItemId_265205.value is null or not a object.

I have trie this:

        text = "ItemNumber "+InventTable::find(checksalesLine.itemId).ItemNumber+" ";
        #Output('   conf = confirm(text+document.'+_webrun.name()+'.fvd_qty_'+int2str(checksalesLine.recid)+'.value);\n');

I got the fail: espected ")"

Best regards

Henrik



Yahoo! Groups Links

Reply via email to