Jump to content

Colorbox Will Not Go Away In Ben's Cms


Boneshank

Recommended Posts

I'm following along with Ben's CMS tutorial (great, by the way).

All is working as it should, until we get to the part where we enable the login functionality on the colorbox buttons.

 

When I login, I can see (through the partial opacity) that when the page reloads, the 'login_link' at the bottom changes to 'Logout', but the colorbox continually reloads, and cannot be stopped.

What I get from this is that every time the v_login/v_loggingin pages get called, the JS fires & loads the colorbox. And everything I do inside the colorbox reloads the v_login/v_loggingin pages. Just a vicious circle!

 

I can comment out the 'window.location.href' portion of the code, and it solves the issue, but I understand the need for it (getting rid of the ? info), so want to keep it as close to Ben's original as possible.

 

I also changed the .live to .on in the script.

 

I can post code as needed here, but I'm hoping this may just be a forehead-slapping moment that someone will correct me on just by hearing the issue.

 

Thanks!

 

UPDATE: I got it working. A silly error on my part within core.php's head() function. I had '||' in place of the needed '&&' in the second if statement. Carry on, folks! Nothing to see here... 

Edited by Boneshank
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...