Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Pulling Quick Login to main ASP page
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Pulling Quick Login to main ASP page

 Post Reply Post Reply
Author
lodogg View Drop Down
Groupie
Groupie


Joined: 22 August 2003
Location: United States
Status: Offline
Points: 161
Post Options Post Options   Thanks (0) Thanks(0)   Quote lodogg Quote  Post ReplyReply Direct Link To This Post Topic: Pulling Quick Login to main ASP page
    Posted: 16 April 2008 at 2:04am

So I'm trying to pull the Quick Login to my main *.asp page, the only problem is I can not find the code to do so:\  I tried to the follow the link below and I'm receiving an error probably because I'm missing a few things any help would be much appreciated.

<%
'If the user has not logged in (guest user ID = 2) then show them a quick login form
 If lngLoggedInUserID = 2 AND blnWindowsAuthentication = False AND (blnMemberAPI = False OR blnMemberAPIDisableAccountControl = False) Then
   
    vbCrLf & "  <form method=""post"" name=""frmLogin"" id=""frmLogin"" action=""forum/login_user.asp" & strQsSID1 & """>" & strTxtQuickLogin & _
    vbCrLf & "   <input type=""text"" size=""10"" name=""name"" id=""name"" style=""font-size: 10px;"" tabindex=""1"" />" & _
    vbCrLf & "   <input type=""password"" size=""10"" name=""password"" id=""password"" style=""font-size: 10px;"" tabindex=""2"" />" & _
    vbCrLf & "   <input type=""hidden"" name=""NS"" id=""NS"" value=""1"" />" & _
    vbCrLf & "   <input type=""hidden"" name=""returnURL"" id=""returnURL"" value=""returnURL=forum/default.asp"" />" & _
    vbCrLf & "   <input type=""submit"" value=""" & strTxtGo & """ style=""font-size: 10px;"" tabindex=""3"" />" & _
    vbCrLf & "  </form>"
  
End If
 %>
Just trying to have some fun and learn in the process.
Come have Some Fun
Back to Top
markradaba View Drop Down
Newbie
Newbie
Avatar

Joined: 02 September 2005
Location: United States
Status: Offline
Points: 39
Post Options Post Options   Thanks (0) Thanks(0)   Quote markradaba Quote  Post ReplyReply Direct Link To This Post Posted: 16 April 2008 at 5:19pm
You need to add a link to the common.asp file in your forums folder, like this:
 
<!--#include file="forum/common.asp" -->
 
You might have to change the path depending on where your files are located.
Back to Top
lodogg View Drop Down
Groupie
Groupie


Joined: 22 August 2003
Location: United States
Status: Offline
Points: 161
Post Options Post Options   Thanks (0) Thanks(0)   Quote lodogg Quote  Post ReplyReply Direct Link To This Post Posted: 16 April 2008 at 6:39pm
Error:
 
~~~~~~`

Microsoft VBScript compilation error '800a03ea'

Syntax error

/test.asp, line 10

vbCrLf & "  <form method=""post"" name=""frmLogin"" id=""frmLogin"" action=""forum/login_user.asp" & strQsSID1 & """>" & strTxtQuickLogin & _
-------^
 
 
<!--#include file="forum/common.asp" -->
<%
'If the user has not logged in (guest user ID = 2) then show them a quick login form
 If lngLoggedInUserID = 2 AND blnWindowsAuthentication = False AND (blnMemberAPI = False OR blnMemberAPIDisableAccountControl = False) Then
   
    vbCrLf & "  <form method=""post"" name=""frmLogin"" id=""frmLogin"" action=""forum/login_user.asp" & strQsSID1 & """>" & strTxtQuickLogin & _
    vbCrLf & "   <input type=""text"" size=""10"" name=""name"" id=""name"" style=""font-size: 10px;"" tabindex=""1"" />" & _
    vbCrLf & "   <input type=""password"" size=""10"" name=""password"" id=""password"" style=""font-size: 10px;"" tabindex=""2"" />" & _
    vbCrLf & "   <input type=""hidden"" name=""NS"" id=""NS"" value=""1"" />" & _
    vbCrLf & "   <input type=""hidden"" name=""returnURL"" id=""returnURL"" value=""returnURL=forum/default.asp"" />" & _
    vbCrLf & "   <input type=""submit"" value=""" & strTxtGo & """ style=""font-size: 10px;"" tabindex=""3"" />" & _
    vbCrLf & "  </form>"
  
End If
 %>
 
Just trying to have some fun and learn in the process.
Come have Some Fun
Back to Top
StarDust View Drop Down
Senior Member
Senior Member


Joined: 14 May 2007
Location: Bangladesh
Status: Offline
Points: 310
Post Options Post Options   Thanks (0) Thanks(0)   Quote StarDust Quote  Post ReplyReply Direct Link To This Post Posted: 16 April 2008 at 7:23pm
You need a Response.Write()

Here it is:
<!--#include file="forum/common.asp" -->
<%
'If the user has not logged in (guest user ID = 2) then show them a quick login form
 If lngLoggedInUserID = 2 AND blnWindowsAuthentication = False AND (blnMemberAPI = False OR blnMemberAPIDisableAccountControl = False) Then
   
    Response.Write(vbCrLf & "  <form method=""post"" name=""frmLogin"" id=""frmLogin"" action=""forum/login_user.asp" & strQsSID1 & """>" & strTxtQuickLogin & _
    vbCrLf & "   <input type=""text"" size=""10"" name=""name"" id=""name"" style=""font-size: 10px;"" tabindex=""1"" />" & _
    vbCrLf & "   <input type=""password"" size=""10"" name=""password"" id=""password"" style=""font-size: 10px;"" tabindex=""2"" />" & _
    vbCrLf & "   <input type=""hidden"" name=""NS"" id=""NS"" value=""1"" />" & _
    vbCrLf & "   <input type=""hidden"" name=""returnURL"" id=""returnURL"" value=""returnURL=forum/default.asp"" />" & _
    vbCrLf & "   <input type=""submit"" value=""" & strTxtGo & """ style=""font-size: 10px;"" tabindex=""3"" />" & _
    vbCrLf & "  </form>")
  
End If
 %>
 






Originally posted by lodogg lodogg wrote:

Error:
 
~~~~~~`

Microsoft VBScript compilation error '800a03ea'

Syntax error

/test.asp, line 10

vbCrLf & "  <form method=""post"" name=""frmLogin"" id=""frmLogin"" action=""forum/login_user.asp" & strQsSID1 & """>" & strTxtQuickLogin & _
-------^
 
 
<!--#include file="forum/common.asp" -->
<%
'If the user has not logged in (guest user ID = 2) then show them a quick login form
 If lngLoggedInUserID = 2 AND blnWindowsAuthentication = False AND (blnMemberAPI = False OR blnMemberAPIDisableAccountControl = False) Then
   
    vbCrLf & "  <form method=""post"" name=""frmLogin"" id=""frmLogin"" action=""forum/login_user.asp" & strQsSID1 & """>" & strTxtQuickLogin & _
    vbCrLf & "   <input type=""text"" size=""10"" name=""name"" id=""name"" style=""font-size: 10px;"" tabindex=""1"" />" & _
    vbCrLf & "   <input type=""password"" size=""10"" name=""password"" id=""password"" style=""font-size: 10px;"" tabindex=""2"" />" & _
    vbCrLf & "   <input type=""hidden"" name=""NS"" id=""NS"" value=""1"" />" & _
    vbCrLf & "   <input type=""hidden"" name=""returnURL"" id=""returnURL"" value=""returnURL=forum/default.asp"" />" & _
    vbCrLf & "   <input type=""submit"" value=""" & strTxtGo & """ style=""font-size: 10px;"" tabindex=""3"" />" & _
    vbCrLf & "  </form>"
  
End If
 %>
 
Back to Top
lodogg View Drop Down
Groupie
Groupie


Joined: 22 August 2003
Location: United States
Status: Offline
Points: 161
Post Options Post Options   Thanks (0) Thanks(0)   Quote lodogg Quote  Post ReplyReply Direct Link To This Post Posted: 16 April 2008 at 8:25pm

StarDust you are awesome!  Thanks..   Obviously I am a network guy not a programmer : \

I do have one more issue I am pulling the top 8 topics to my front page and when I add the code above it seems to break the page?  The line that kills everything is the (include).

<!--#include file="forum/common.asp" -->

Here is a snippet of code I’m using to pull my topics.

<%
Dim rsLastestPosts
Dim strPosts
Dim adoCon
Dim strCon
Dim strSQL
Dim strRecentPosts 

'Create a connection odject
Set adoCon = Server.CreateObject("ADODB.Connection")

'Database connection info and driver
strCon = "Provider=;Data Source=;Database=forum;User ID=;Password=;"

'Set an active connection to the Connection object
adoCon.Open strCon

Set rsLastestPosts = Server.CreateObject("ADODB.Recordset")

strSQL = "SELECT TOP 8 topic_ID,subject from tblTopic WHERE Forum_ID NOT IN(9,10,14,19,31) ORDER BY Last_Thread_ID DESC"

rsLastestPosts.Open strSQL, strCon


Do until rsLastestPosts.eof or rsLastestPosts.bof
strRecentPosts = strRecentPosts + ("<a href=""http://www.lodogg.com/forum/forum_posts.asp?TID=" & rsLastestPosts("topic_ID") & "&PN=1&TPN=1"">" & rsLastestPosts("subject") & "</a><BR>")
rsLastestPosts.movenext
loop

rsLastestPosts.close

%>

<%= strRecentPosts %>

Just trying to have some fun and learn in the process.
Come have Some Fun
Back to Top
lodogg View Drop Down
Groupie
Groupie


Joined: 22 August 2003
Location: United States
Status: Offline
Points: 161
Post Options Post Options   Thanks (0) Thanks(0)   Quote lodogg Quote  Post ReplyReply Direct Link To This Post Posted: 17 April 2008 at 7:35pm

Process of elimination, I removed the following and now I'm all good...

adoCon
Dim strCon
Dim strSQL

-lo
Just trying to have some fun and learn in the process.
Come have Some Fun
Back to Top
lodogg View Drop Down
Groupie
Groupie


Joined: 22 August 2003
Location: United States
Status: Offline
Points: 161
Post Options Post Options   Thanks (0) Thanks(0)   Quote lodogg Quote  Post ReplyReply Direct Link To This Post Posted: 17 April 2008 at 7:58pm

Is there a way I can resize the Quick Login borders?  The code above does not include any sizing and when I try to resize it with a CSS it begins the wrap the login boxes to the next row.

 

You can see me dilemma here.

 
Just trying to have some fun and learn in the process.
Come have Some Fun
Back to Top
StarDust View Drop Down
Senior Member
Senior Member


Joined: 14 May 2007
Location: Bangladesh
Status: Offline
Points: 310
Post Options Post Options   Thanks (0) Thanks(0)   Quote StarDust Quote  Post ReplyReply Direct Link To This Post Posted: 18 April 2008 at 4:48am
Add this line
vbCrLf & _


After this line
Response.Write(vbCrLf & "  <form method=""post"" name=""frmLogin"" id=""frmLogin"" action=""forum/login_user.asp" & strQsSID1 & """>" & strTxtQuickLogin & _



Please open a new thread for issues other than quick login.


Originally posted by lodogg lodogg wrote:

Is there a way I can resize the Quick Login borders?  The code above does not include any sizing and when I try to resize it with a CSS it begins the wrap the login boxes to the next row.

 

You can see me dilemma here.

 
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.