Sunday 15 August 2010

php - how to detect if child window has been submitted using javascript? -


I have a child window through which it includes the Twitter sharing page ... how will it know that the Twitter sharing form Or has not been submitted to Twitter? Note: This is a hair window.

Because I want to show a warning box after the sharing window is closed submit the Twitter share detection

  var myWindow; Function openTwitterWindow (url) {var width = 550; Var height = 425; Var left = parseInt ((screen.availWidth / 2) - (width / 2)); Var top = parseInt ((screen.availHeight / 2) - (height / 2)); Var window = "width =" + width + ", height =" + height + ", position, resizable, left =" + left + ", up =" + up + "screenx =" + left + ", Screenwise = "+ up; MyWindow = window.open (URL, "subWind", windowFeatures); Jquery ('form # update-form'). Submit (function () {onWindowClose (myWindow, myCallback);}); } MyCallback function () {Warning ("Your message has been shared."); } Function on Windowclosures (Windorph, Callback, Duration) {Period = Period || 20; SetTimeout (function check (if (windowRef == tap) windowRef.closed {callback ();} else {setTimeout (check, duration);}}, duration);}   < P> wrong on top of that code ... I need help  
  & lt; a style = "cursor: pointer" onclick = "opentwitterWindow ('https: //twitter.com / Share? Url = & lt ;? php echo $ url ;? & gt; and text = and so on ... further    

You can try something like this:

  var child = window.open ('urlofchild'); var closetime = set Interval (Czech Childclose, 500); Function CheckbedClose () {if (child.closed) {s Avni ( "Child Close window"), a clear gap (closing time);}}    

No comments:

Post a Comment