uhmm.. i have three textboxes and i combine the three values to generate a barcode value..

below is the function

function getBarCode(ItemCode,VendCode,Cat){
    
    var Item = ItemCode;
    var Mcode = VendCode;
    var Category = Cat;
    var barcodeval = Item+Mcode+Category;
    if (Item == ''){
        alert('Input A Itemcode Code');
        return false;
    }else if(Mcode == ''){
        alert('Input A Merchant');
        return false;
    } else {
    swDisplayOpen = true;
    winID = window.open ('','selectWin2','scrollbars=yes,resizable=yes,width=220,height=200');
    winID.document.write( "<HTML><HEAD><TITLE>Please wait....</TITLE></HEAD><BODY><I>Please wait....</I></BODY></HTML>" );
    winID.document.location = 'barcode.php?barcode='+ barcodeval +'&width=200&height=100';
    }
        return false;
}

it is running already.

my question is how i can get the value of var barcodeval and output in the texbox called barcode

thanks in advance!

.
.
.
<input id=barcode type=text>
.
.

in your function you can write

.
.
.
function getBarCode(ItemCode,VendCode,Cat)
{
.
.
.
.
.
.
.
   var barcodeval = Item+Mcode+Category;
   document.getElementById("barcode").value=barcodeval;
.
.
.
}
.
.
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.