www.webdeveloper.com
Recent Articles
  • Finding Slow Running Queries in ASE 15
  • A More Advanced Pie Chart for Analysis Services Data
  • Adobe AIR Programming Unleashed: Working with Windows
  • Performance Testing SQL Server 2008's Change Data Capture Functionality
  • The ABC's of PHP: Introduction to PHP
  • How to Migrate from BasicFiles to SecureFiles Storage
  • Why the Twitter Haters Are Wrong
  • User Personalization with PHP: Beginning the Application
  • Whats in an Oracle Schema?
  • Lighting Enhancement in Photoshop
  •  

    Go Back   WebDeveloper.com > Client-Side Development > JavaScript

    JavaScript JavaScript (not Java) Discussion and technical support, including AJAX and frameworks (JQuery, MooTools, Prototype...)

    Reply
     
    Thread Tools Search this Thread Rate Thread Display Modes
      #1  
    Old 06-02-2007, 04:46 PM
    prays prays is offline
    Registered User
     
    Join Date: Jun 2007
    Posts: 3
    resolved [RESOLVED] Tracking url in popup

    Hi,

    I have been searching the internet for a script that checks the url in a popup window every 2 seconds, it shall be noted that the url isn't from the site where the script is, but a external. And then, if the url in the window changes, it should perform an action on the "script"-site, the action is to run a php function.

    It may sound a bit confusing, but just ask if something isn't clear enough, and i will explain.

    I hope someone can help me, thanks
    Reply With Quote
      #2  
    Old 06-02-2007, 10:20 PM
    konithomimo konithomimo is offline
    Registered User
     
    Join Date: Jan 2005
    Posts: 3,071
    Modern browsers prevent you from accessing the location of frames and popups that are not located on your server.
    Reply With Quote
      #3  
    Old 06-03-2007, 06:52 AM
    prays prays is offline
    Registered User
     
    Join Date: Jun 2007
    Posts: 3
    I know it can be done, i'm just not sure about the way to do it. On http://www.komogvind.dk you earn points by playing online games OR filling out leads. The leads open in a new window, and when you have completed filling out the forms and posted it, then komogvind.dk registers the points to you.
    Reply With Quote
      #4  
    Old 06-03-2007, 10:47 AM
    konithomimo konithomimo is offline
    Registered User
     
    Join Date: Jan 2005
    Posts: 3,071
    All of those files are on the same server, or are on the same network/serverer farm, thus they are able to interact. That site does not use JS to find out what page the user is on. To do what that sites does you will have to use a server-side script to access a DB. Most modern browsers deny permission to access the location of a frame or window, sometimes even when the location in on the same server. So, NO this cannot be done as you are asking.
    Reply With Quote
      #5  
    Old 06-03-2007, 03:40 PM
    prays prays is offline
    Registered User
     
    Join Date: Jun 2007
    Posts: 3
    <script type="text/JavaScript" language="JavaScript">
    a = null;
    url = "url2";

    function vispopup(adresse)
    {
    a = window.open(adresse, "a", "");
    window.setTimeout("check('" + adresse + "');", 5000);
    }

    function check(adresse)
    {
    if (a != null)
    {
    if (a.location.href != url)
    {
    alert("the");
    }
    }
    setTimeout("check('" + adresse + "')", 1000);
    }
    </script>

    <a href="#" onclick="vispopup('url1');return false">click here</a>

    --------------------------------------------------------------------------
    it can be done
    Reply With Quote
    Reply

    Bookmarks


    Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
     
    Thread Tools Search this Thread
    Search this Thread:

    Advanced Search
    Display Modes Rate This Thread
    Rate This Thread:

    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is Off
    HTML code is Off
    Forum Jump


    All times are GMT -5. The time now is 02:41 PM.



    Acceptable Use Policy


    The Network for Technology Professionals

    Search:

    About Internet.com

    Legal Notices, Licensing, Permissions, Privacy Policy.
    Advertise | Newsletters | E-mail Offers

    Powered by vBulletin® Version 3.7.3
    Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.