The forum of the forums
Welcome to the Official Support Forum of Forumotion!

To take full advantage of everything offered by our forum, please log in if you are already a member, or join our community if you've not yet.



Create a free forum like this one.

HTML Page Login Form redirect to another Html Page when failed

View previous topic View next topic Go down

HTML Page Login Form redirect to another Html Page when failed

Post by DossettH on March 27th 2013, 7:12 pm

Hello, I am currently making an Html login page for my forum. The problem is when your login attempt fails it redirects to the forum login failed page: "/login.forum"
Is there a way to make it when your login fails it goes to another Html page?
Thanks in advance!

DossettH
New Member

Posts : 11
Reputation : 1
Language : English

http://crazedoutsiders.niceboard.com

Back to top Go down

Re: HTML Page Login Form redirect to another Html Page when failed

Post by Neymar1 on March 28th 2013, 10:19 pm

Well all the stuff regarding the form is dealt with on the /login.form page, probably including the redirect stuff. I wouldn't take this message as an absolute "no" though, as I'm not sure.

Neymar1
Forumember

Male Posts : 406
Reputation : 27
Language : HTML, CSS, and a bit of JavaScript
Location : Scotland

http://www.simplyfifa.com

Back to top Go down

Re: HTML Page Login Form redirect to another Html Page when failed

Post by kirk on March 29th 2013, 1:49 am

what is the coding you are using to place this on a html page. and what about when the log in is a success, then what it opens/redirects to the forum homepage index.

I would have to see what the html page is all about. is there more then just a log-in on the page, and where exactly would it be redirected if log in attempt did fail?

kirk
Forumaster

Male Posts : 11037
Reputation : 651
Language : English,Vulcan,Klingon, Romulan,& Gorn

Back to top Go down

Re: HTML Page Login Form redirect to another Html Page when failed

Post by DossettH on March 29th 2013, 2:02 am

Well the coding for login form derives from this:
Javascript:
Code:
  function LGlogin() {
          var x = document.getElementById('LGlogin'); 
          if (x.style.display == 'none') {
              jQuery(x).add('#LGoverlay').fadeIn('slow');
              var r = x.getElementsByTagName('form')[0].redirect;
              r.value = window.location.href;
          }
          else {
              jQuery(x).add('#LGoverlay').fadeOut('slow');
          }
        }
        jQuery(function(){ if(document.getElementById('logout')) document.getElementById('LGloginbtn').style.display = 'none'; });
HTML:
Code:
<form action="/login.forum" method="post">
    <ul>
      <strong><label for="username" style="color: #000000;"></label></strong>
      <input type="text" name="username" size="25" style="color: #FFFFFF; background-color: #000000; border: 2px inset #540f0a;" placeholder="Username" />
      <strong><label for="password"  style="color: #000000;"></label></strong>
      <input type="password" name="password" size="25" style="color: #FFFFFF; background-color: #000000; border: 2px inset #540f0a;" placeholder="Password" />
    <input type="image" class="login-submit" name="login" value="Log in" src="http://i.imgur.com/mfrtMAF.png" style="position: absolute; left: -9999px" />
    <input name="redirect" type="hidden" value="">
  </form>
And when the login would fail it would go to another html page, and when it would be a success it would be directed as a normal login function and take me to the forum.
HTML Page Login: http://crazedoutsiders.niceboard.com/
Other HTML Page Login Fail: http://crazedoutsiders.niceboard.com/h7-access-denied

DossettH
New Member

Posts : 11
Reputation : 1
Language : English

http://crazedoutsiders.niceboard.com

Back to top Go down

Re: HTML Page Login Form redirect to another Html Page when failed

Post by DossettH on March 29th 2013, 3:35 pm

bump.

DossettH
New Member

Posts : 11
Reputation : 1
Language : English

http://crazedoutsiders.niceboard.com

Back to top Go down

Re: HTML Page Login Form redirect to another Html Page when failed

Post by DossettH on April 1st 2013, 3:41 am

bump

DossettH
New Member

Posts : 11
Reputation : 1
Language : English

http://crazedoutsiders.niceboard.com

Back to top Go down

Re: HTML Page Login Form redirect to another Html Page when failed

Post by DossettH on April 5th 2013, 2:40 am

bump

DossettH
New Member

Posts : 11
Reputation : 1
Language : English

http://crazedoutsiders.niceboard.com

Back to top Go down

Re: HTML Page Login Form redirect to another Html Page when failed

Post by kirk on April 5th 2013, 5:54 am

Sorry for the late reply. in the future if you do not get a reply by a staff member like myself feel free to send me a pm and remind me of the thread/problem Smile

i cant really see anywhere to add a new/redirect link so i am unsure.
I don't really understand why a log in would fail anyway unless someone was not a member, or putting wrong username and pass in?

So yeah i am not really sure how to set this to redirect to a different link with a log in fail?

kirk
Forumaster

Male Posts : 11037
Reputation : 651
Language : English,Vulcan,Klingon, Romulan,& Gorn

Back to top Go down

Re: HTML Page Login Form redirect to another Html Page when failed

Post by DossettH on April 5th 2013, 5:57 am

Oh ok thanks for the reply anyway. I'll see if there is something else I can do.

DossettH
New Member

Posts : 11
Reputation : 1
Language : English

http://crazedoutsiders.niceboard.com

Back to top Go down

Re: HTML Page Login Form redirect to another Html Page when failed

Post by kirk on April 5th 2013, 6:49 pm

Since i answered all i can and no one else seems to know as well at this time. o will move the thread to the garbage considering it was really not solved. If someone else dose know how to complete this please message me and i will add it back t the board here.

Thanx

kirk
Forumaster

Male Posts : 11037
Reputation : 651
Language : English,Vulcan,Klingon, Romulan,& Gorn

Back to top Go down

View previous topic View next topic Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum