Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New to the CF scene
    Join Date
    Sep 2006
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    complicated looping and redirecting..just complicated

    im gonna try and explain this as best as i can
    here goes

    basically i have my main page, this page is where users fill out a form using document.myForm.submit()

    I am trying to submit this information serveral times, in a timed loop using setTimeout()

    NOW! the post goes to an outside website which spawns a 2ndWindow(this second window is a different website, i do not have access to the code 2ndWindow). This window must be open to complete the task at hand.

    the problem lys here.... this 2ndWindow that opens contains this code

    function redirectParentFast(){
    window.opener.location='http://url.com';
    }

    that code is executed on the 2ndWindow, and my mainScript window is redirected, therefore kicking it out of the loop the first time it goes though.

    im not real sure on how to correct this problem....
    any ideas?

  • #2
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    If you have no access to the 2nd page then there is nothing you can do as javascript cannot go across domains.
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #3
    New to the CF scene
    Join Date
    Sep 2006
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    tell i was thinking this maybe?
    u some how have the info that u collect for the post
    send that information to another window u have created and then have that other window post it to the web page, that way when the page2 doest the window.opener.location **** it only effects the extra TEMP page
    Leaving ur main script alone

    ..>
    would that work?

  • #4
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    You would probably still get an access denied error and your script will stop.
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #5
    Smokes a Lot
    Join Date
    Jul 2003
    Location
    CA, USA
    Posts
    1,594
    Thanks
    5
    Thanked 20 Times in 20 Posts
    Quote Originally Posted by kaptin View Post
    tell i was thinking this maybe?
    u some how have the info that u collect for the post
    send that information to another window u have created and then have that other window post it to the web page, that way when the page2 doest the window.opener.location **** it only effects the extra TEMP page
    Leaving ur main script alone

    ..>
    would that work?
    That should work actually. Just spawn a window to open the 2ndwindow. The script is redirecting on the opener in this case being the temp, which shouldn't be a problem since it seemed to work just fine for the main page. The script on the main page will just have to redirect the temp window to the page that opens the 2ndwindow at each loop, since it will be redirected when the 2nd window opens.
    Helping to build a bigger box. - Adam Matthews


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •