jquery - Hiding popup window in parent window using JavaScript -


in site registration done step step process.

in first step open popup window using javascript , close popup window automatically after tasks in window have been completed.

next go next step clicking button. there button in second step return first step.

when come first step clicking on button in second step popup window in first step loaded.

it not need load pop window when return first step.

how can this?

this javascript code :

function show_gal() { var windowsizearray = [ "width=935,height=580", "width=935,height=600,scrollbars=yes" ]; var url1 = "<?php echo base_url();?>plugin/index.php"; var id = $("#hidtuid").val(); var url = url1+"?usrid=" + id; var windowname = "image upload"; var windowsize = windowsizearray; window.open(url, windowname, windowsize); } 

this code in popup window after completing task in popup window:

window.close(); 

its more logical question, find different ways this. 1 way is:

are loading first window on page load?

if use hidden variable in first page when ever first popup closed assign value hidden feild.

on page load function before calling popup check value of hidden feild if not assigned not show popup.


Comments

Popular posts from this blog

javascript - backbone.js Collection.add() doesn't `construct` (`initialize`) an object -

c++ - Accessing inactive union member and undefined behavior? -

php - Get uncommon values from two or more arrays -