문제

I am using codeigniter and in one of the views I have the following function triggered when the employee code does not exist in the database(using jquery ajax - works fine). the confirm popup displayes when the entered code is not valid but when the result of confrim is true, the following code does not fire the popup window!

function popup(){
        if(confirm("Employee_code not available! \nSave the code as new employee?")){
            //var new_emp_window = "<?php echo base_url().'index.php/it_inventory/new_employee'; ?>";
            widnow.open('www.google.com', 'width=500, height=500');
        }else{
            alert("ohh!");
            $('#employee_code').val('').focus();
        }
    }
도움이 되었습니까?

해결책 2

  1. First of all change www.google.com to http://www.google.com. As the browser handles URLs without protocol prefix as relative paths.

  2. Check that popup blocker is not active on your browser.

다른 팁

it should be window not widnow, change:

widnow.open

to

window.open

try:

window.open("www.google.com", "_blank", "width=500,height=500");

See: window.open()

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top