pass varible to window.open

Discussion in 'JavaScript' started by nikoo56, Jul 19, 2010.

  1. #1
    Hi,
    I have this function that I want to pass 2 variables to it, the window. Open works the way that you see and I can pass 1 variable I am not sure how to pass the second variable that is LeadId.

    Thanks.

    function poponload()
    {
    var Entity = document.getElementById('EntityId').value;
    var LeadId = document.getElementById('LeadId').value;


    window.open ("test.cfm?EntityId="+Entity ,"mywindow","width=500,height=300");
    }
     
    nikoo56, Jul 19, 2010 IP
  2. Rainulf

    Rainulf Active Member

    Messages:
    373
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    85
    #2
    Wouldn't it be something like this?
    
    window.open ("test.cfm?EntityId="+Entity+"&LeadId="+LeadId ,"mywindow","width=500,height=300"); 
    
    Code (markup):
     
    Rainulf, Jul 19, 2010 IP