Topic: hotspotlogin.cgi in iframe open redirect in iframe

I think this is easy to fix- can someone tell me if I'm on the right path? Users complain that on login, their home page is "locked" in the iframe I'm using for the hotspotlogin.cgi script. I'm using SurferTim's multilingual script ( http://www.dd-wrt.com/phpBB2/viewtopic.php?t=16085&highlight=hotspotlogin ).

Looks like this is the section that I need to work with:

      if ((result == 12) && (self.name == \"chillispot_popup\")) {
        doTime();
        if (redirurl) {
          opener.location = redirurl;
        }
        else if (userurl) {
          opener.location = userurl;
        }
        else if (opener.home) {
          opener.home();
        }
        else {
          opener.location = \"about:home\";
        }
        self.focus();
        blur = 0;
      }

Is there any easy command to use that will force the redirect page to open in a new browser window?

2 (edited by simplywifi 2008-03-12 22:34:41)

Re: hotspotlogin.cgi in iframe open redirect in iframe

DOH:

(self.name == \"chillispot_popup\")) {


change "chillispot_popup" to a new current Windows name or remove it!

Re: hotspotlogin.cgi in iframe open redirect in iframe

Thanks- I did end up figuring this out iby making the following changes to the  "function doOnload" section:

function doOnLoad(result, URL, userurl, redirurl, timeleft) {

      if (timeleft) {
        mytimeleft = timeleft;
      }
      if ((result == 1) && (self.name == \"chillispot_popup\")) {
        doTime();
      }
      if ((result == 1) && (self.name != \"chillispot_popup\")) {
        chillispot_popup = window.open(URL, 'chillispot_popup', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=500,height=300');
      }
      if ((result == 2) || result == 5) {
   getCookies();
        document.form1.UserName.focus()
      }
      if ((result == 2) && (self.name != \"chillispot_popup\")) {
        chillispot_popup = window.open('', 'chillispot_popup', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=400,height=200');
        chillispot_popup.close();
      }
      if ((result == 12) && (self.name == \"chillispot_popup\")) {
        doTime();
        if (redirurl) {
          window.opener.top.location.href = redirurl;
        }
        else if (userurl) {
          window.opener.top.location.href = userurl;
        }
        else if (opener.home) {
          window.opener.top.location.href.home();
        }
        else {
          window.opener.top.location.href = \"about:home\";
        }
        self.focus();
        blur = 0;
      }
      if ((result == 13) && (self.name == \"chillispot_popup\")) {
        self.focus();
        blur = 1;
      }
    }

As you can see I'm using "window.opener.top.location.href"

Re: hotspotlogin.cgi in iframe open redirect in iframe

Thank you for the post.
Hi guys, Im a newbie. Nice to join this forum.

_________________
Watch Remember Me Online Free

Re: hotspotlogin.cgi in iframe open redirect in iframe

Glad to know that you have easily fixed the issue home page is "locked". I am a beginner in programming and saved the codes for future reference. As we have to maintain the sites for users we can also experience similar issues in future. Hope the code you had shared here can be used as a reference.




Thanks
LOURENE
anti snoring devices