Вопрос

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