Naga Raju Ch
Naga Raju Ch

Reputation: 11

i am getting the popup when using the window.open, i didnt want to get the popup, link has to be open directly

$.post('<?php echo base_url()?>index.php/user/clickcode',{'ccode':ssid},function(res){
          if(res) {         //res will have url like http://google,com

          window.open(res);
}

Upvotes: 1

Views: 28

Answers (1)

Ashwini Agarwal
Ashwini Agarwal

Reputation: 4858

Replace window.open(res); with location.href = res;

window.open() will open a new window while location.href will update the current window.

Upvotes: 1

Related Questions