The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.

HTML Page Login Form redirect to another Html Page when failed

3 posters

Go down

HTML Page Login Form redirect to another Html Page when failed Empty HTML Page Login Form redirect to another Html Page when failed

Post by DossettH 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
DossettH
New Member

Posts : 11
Reputation : 1
Language : English

http://crazedoutsiders.niceboard.com

Back to top Go down

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

Post by Neymar1 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
Neymar1
Forumember

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

http://www.simplyfifa.com

Back to top Go down

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

Post by kirk 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
kirk
Forumaster

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

Back to top Go down

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

Post by DossettH 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
DossettH
New Member

Posts : 11
Reputation : 1
Language : English

http://crazedoutsiders.niceboard.com

Back to top Go down

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

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

bump.
DossettH
DossettH
New Member

Posts : 11
Reputation : 1
Language : English

http://crazedoutsiders.niceboard.com

Back to top Go down

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

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

bump
DossettH
DossettH
New Member

Posts : 11
Reputation : 1
Language : English

http://crazedoutsiders.niceboard.com

Back to top Go down

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

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

bump
DossettH
DossettH
New Member

Posts : 11
Reputation : 1
Language : English

http://crazedoutsiders.niceboard.com

Back to top Go down

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

Post by kirk 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
kirk
Forumaster

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

Back to top Go down

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

Post by DossettH 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
DossettH
New Member

Posts : 11
Reputation : 1
Language : English

http://crazedoutsiders.niceboard.com

Back to top Go down

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

Post by kirk 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
kirk
Forumaster

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

Back to top Go down

Back to top

- Similar topics

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