Sanju Menon Sanju Menon - 1 month ago 5
Javascript Question

Javascript linking with window.open

I am trying to give a link from my php page. But its showing an error. Is the following script correct? Can anyone help me pls? Its an annotation problem. Some where i have not put the annotation correctly?

window.open('add_new_shipment.php?tender_id='+result["tender_id"]&
id='+result["id"], 'quotation', 'scrollbars=yes', 'menubar=no', 'status=no', 'width=800, height=600');

Answer

Missing + ' Plus sign and single quote

window.open('add_new_shipment.php?tender_id='+result["tender_id"] +'&id='+result["id"], 'quotation', 'scrollbars=yes', 'menubar=no', 'status=no', 'width=800, height=600');
                                                             ------^
Comments