OutFront Forums
     Home    Register     Search      Help      Login    

Follow Us
On Facebook
On Twitter
RSS
Via Email

Recent Posts
Todays Posts
Most Active posts
Posts since last visit
My Recent Posts
Mark posts read

Sponsors
Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.
Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.
Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

 

Frontpage/ Access drop down box query help

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> ASP, PHP, and Database >> Frontpage/ Access drop down box query help
Page: [1]
 
webgyrl

 

Posts: 52
Joined: 2/9/2009
Status: offline

 
Frontpage/ Access drop down box query help - 5/17/2009 18:08:41   
I would like to create a form where members of my site can sign up. However i want the form to do the following.
for example.. my site allows dancers, actors and singers to register. when they select whether they are a dancer or singer i want them to also be able to select what type of dancer they are or singer (ie. ballet, tap, etc) but i want a second drop down box to appear based on what they select in the original box (i.e dancer, singer, actor)
Help Please!
TexasWebDevelopers

 

Posts: 722
Joined: 2/22/2002
From: Dallas, TX
Status: offline

 
RE: Frontpage/ Access drop down box query help - 5/17/2009 23:59:54   
http://www.texaswebdevelopers.com/examples/our_supplier_in.asp

A variation of the above code will work.

Or a simple if..then statement.
If x is selected then
display second dd menu
end if

_____________________________

:)

Follow us on TWITTER

(in reply to webgyrl)
webgyrl

 

Posts: 52
Joined: 2/9/2009
Status: offline

 
RE: Frontpage/ Access drop down box query help - 5/18/2009 0:10:59   
this is exactly what i want however i want it to be in a form where the poster will eventually submit this info to the database..is this possible with frontpage and access...if so how do i do it...

(in reply to TexasWebDevelopers)
TexasWebDevelopers

 

Posts: 722
Joined: 2/22/2002
From: Dallas, TX
Status: offline

 
RE: Frontpage/ Access drop down box query help - 5/18/2009 11:53:19   
Yes, it's possible..you just have to persist the first drop down entry and use it in a hidden from field when the submit button is used.
Something like this:
(1) OnSelect the form is submitted with the selected dd menu value
(2) capture the value
(3) use the captured value to display the second dd menu
(4) stick the captured value in a hidden form field
(5) the user selects the second value from the second dd menu, finishes the form and submits.


_____________________________

:)

Follow us on TWITTER

(in reply to webgyrl)
webgyrl

 

Posts: 52
Joined: 2/9/2009
Status: offline

 
RE: Frontpage/ Access drop down box query help - 5/18/2009 15:46:20   
thanks!...ok can you help me with this...
i am creating a member website with 2 different kinds of members..those who post jobs and those who search jobs. I am using 1 database to store all members. i would like the posters not to be able to access the job search page as their membership is free..how can i block some users from accessing a page while others can...i am using frontpage and access and here is a link to the method i used to create the site..

http://support.microsoft.com/kb/825498

(in reply to TexasWebDevelopers)
TexasWebDevelopers

 

Posts: 722
Joined: 2/22/2002
From: Dallas, TX
Status: offline

 
RE: Frontpage/ Access drop down box query help - 5/19/2009 11:56:58   
OK--this assumes everyone on the site has to register and therefore is in the database of users.
You could create a toggle.
Add a column to the database.
Name it something like "xgranted".
Use numbers in the columns next to each users name.
"1" = access to both pages
"0"= access to only one set of pages.
Then something like:
<%
If rs("xgranted")="0" then
response.write("I am sorry but you do not have access to this page")
%>

Then put the <%end if%> at the bottom of the page.

There are many ways to do this and it really depends on how you have coded the site.



_____________________________

:)

Follow us on TWITTER

(in reply to webgyrl)
webgyrl

 

Posts: 52
Joined: 2/9/2009
Status: offline

 
RE: Frontpage/ Access drop down box query help - 5/19/2009 12:43:55   
hey there..thanks for all your help... here is a copy of the code of the page that i dont want some members to access...where would i put the code you sent me once i updated the database...?

<html>

<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>New Page 1</title>
</head>

<body bgcolor="#FFFFFF" topmargin="0" link="#FFFFFF" vlink="#FFFFFF" alink="#FFFFFF" background="red124.jpg">

<div align="center">
<table border="0" cellpadding="0" cellspacing="0" width="850" height="521">
<!-- MSTableType="layout" -->
<tr>
<td valign="top" bgcolor="#D51426" colspan="2">
<!-- MSCellType="ContentBody" -->
<p align="left">
 <b><font color="#FFFFFF" face="Arial" size="2">Welcome:</font><font face="Arial" size="2">
<%
If Len(Session("UID")) = 0 Then
Response.Write "<b>Guest</b>"
Else
Response.Write "<b>" & Session("UID") & "</b>"
End If
%>
</font></b>
</td>
<td valign="top" bgcolor="#D51426" height="21" colspan="2">
<!-- MSCellType="ContentBody" -->
<p align="right">    </font><b><font face="Arial" color="#FFFFFF" style="font-size: 9pt"> <SCRIPT LANGUAGE="JAVASCRIPT">
<!--

var d_names = new Array("Sun", "Mon", "Tue",
"Wed", "Thur", "Fri", "Sat");

var m_names = new Array("Jan", "Feb", "Mar",
"Apr", "May", "Jun", "Jul", "Aug", "Sept",
"Oct", "Nov", "Dec");

var d = new Date();
var curr_day = d.getDay();
var curr_date = d.getDate();
var sup = "";
if (curr_date == 1 || curr_date == 21 || curr_date ==31)
{
sup = "st";
}
else if (curr_date == 2 || curr_date == 22)
{
sup = "nd";
}
else if (curr_date == 3 || curr_date == 23)
{
sup = "rd";
}
else
{
sup = "th";
}
var curr_month = d.getMonth();
var curr_year = d.getFullYear();

document.write(d_names[curr_day] + " " + curr_date + "<SUP>"
+ sup + "</SUP> " + m_names[curr_month] + " " + curr_year);

//-->
</SCRIPT>          </font></b>
<font color="#FFFFFF" face="Arial" style="font-size: 9pt"></b>  </font></font></td>
</tr>
<tr>
<td valign="top" bgcolor="#FFFFFF" rowspan="6">
<img border="0" src="gigsmall.gif" width="297" height="108"></td>
<td bgcolor="#FFFFFF" valign="bottom" rowspan="6" colspan="2">
<table border="0" width="100%">
<tr>
<td> </td>
<td width="93" align="center"><b>
<font face="Arial" size="2" color="#94B33E">
<a href="aboutus.htm" style="text-decoration: none">
<font color="#94B33E">about us</font></a></font></b></td>
<td width="87" align="center"><b>
<font face="Arial" size="2" color="#94B33E">
<a href="contact.asp" style="text-decoration: none">
<font color="#94B33E">contact us</font></a></font></b></td>
<td width="91" align="center"><b>
<font face="Arial" size="2" color="#94B33E">
<a href="members.asp" style="text-decoration: none">
<font color="#94B33E">membership</font></a>
</font></b></td>
<td width="72" align="center"><b>
<font face="Arial" size="2" color="#94B33E">
<a href="help.asp" style="text-decoration: none">
<font color="#94B33E">help</font></a></font></b></td>
</tr>
</table>
</td>
<td valign="top" height="24" bgcolor="#FFFFFF">
 <b><font color="#FFFFFF" face="Arial" size="2">Welcome:
<%
If Len(Session("UID")) = 0 Then
Response.Write "<b>Guest</b>"
Else
Response.Write "<b>" & Session("UID") & "</b>"
End If
%>
</font></b>
</p></td>
</tr>
<tr>
<td valign="top" height="20" bgcolor="#FFFFFF">
 </td>
</tr>
<tr>
<td valign="top" height="20" bgcolor="#FFFFFF">
 </td>
</tr>
<tr>
<td valign="top" height="20" bgcolor="#FFFFFF">
</td>
</tr>
<tr>
<td valign="top" height="19" bgcolor="#FFFFFF">
 </td>
</tr>
<tr>
<td valign="top" height="19" bgcolor="#CC0000">
<p align="center"><b><font face="Arial" size="2" color="#FFFFFF">
<a href="logoff.asp" style="text-decoration: none">log off</a></font></b></td>
</tr>
<tr>
<td valign="top" height="19" colspan="4">
<!-- MSCellType="ContentBody" -->
 </td>
</tr>
<tr>
<td bgcolor="#FFFFFF" colspan="2" valign="top">
<div align="center">
<table border="0" width="100%">
<tr>
<td> 
<p> </p>
<p> </p>
<p> </td>
</tr>
</table>
</div>
<p> </td>
<td bgcolor="#CC0000" colspan="2" valign="top">
<div align="center">
<table border="0" width="100%">
<tr>
<td align="left" height="21"><b>
<font face="Arial" size="2" color="#FFFFFF"> 
<a href="myaccount.asp" style="text-decoration: none">my
account</a></font></b></td>
</tr>
<tr>
<td align="left" height="22"><b>
<font face="Arial" size="2" color="#FFFFFF"> 
<a href="searchtalent.asp" style="text-decoration: none">find talent</a></font></b></td>
</tr>
<tr>
<td align="left" height="22"><b>
<font face="Arial" size="2" color="#FFFFFF"> 
<a href="jobsearch.asp" style="text-decoration: none">search jobs</a></font></b></td>
</tr>
<tr>
<td width="94%" align="left" height="8"><b>
<font face="Arial" size="2" color="#FFFFFF"> 
<a href="jobpost.asp" style="text-decoration: none">post jobs</a></font></b></td>
</tr>
<tr>
<td width="94%" align="left" height="21"><b>
<font color="#FFFFFF" face="Arial" size="2">  news</font></b></td>
</tr>
<tr>
<td width="94%" align="left" height="9">  <b>
<font color="#FFFFFF" face="Arial" size="2">the junction</font></b></td>
</tr>
<tr>
<td width="94%" align="left" height="9"> <b><font color="#FFFFFF" face="Arial" size="2">
<a href="ratings.asp" style="text-decoration: none">
ratings</a></font></b></td>
</tr>
</table>
</div>
<p> </td>
</tr>
<tr>
<td width="297"></td>
<td width="417"></td>
<td width="0"></td>
<td height="1" width="136"></td>
</tr>

</body>

</html>

(in reply to TexasWebDevelopers)
TexasWebDevelopers

 

Posts: 722
Joined: 2/22/2002
From: Dallas, TX
Status: offline

 
RE: Frontpage/ Access drop down box query help - 5/19/2009 15:07:04   
First you have to make a db call to see if they are xgranted 0 or 1.
Then put this bit at the top of the page (but after the db call, obviously):
<%
If rs("xgranted")="0" then
response.write("I am sorry but you do not have access to this page")
%>

and this bit at the very bottom:
<%end if%>

You page needs a DOCTYPE.
You should really design with CSS and not tables--tables are for tabular data--not layout.

_____________________________

:)

Follow us on TWITTER

(in reply to webgyrl)
webgyrl

 

Posts: 52
Joined: 2/9/2009
Status: offline

 
RE: Frontpage/ Access drop down box query help - 5/20/2009 19:38:20   
ok so i tried this and was unsuccessful which i know is due to error on my part as i am a newbie to access and have no clue what i am doing...i tried this...even though i have two different membership forms for paid members and free members i send them to the same user database. what i did was create a column in the database called "memtype" and send a hidden form field from each form saying paid or free to the column when they sign up. Next i tried adding this to my page
<%
If Session("memtype") = "free" Then Response.Redirect "nopermission.asp"
%>

but this does not work...help please!!!! i have no clue what i am doing lol just tell me the fools way of doing this...

(in reply to TexasWebDevelopers)
webgyrl

 

Posts: 52
Joined: 2/9/2009
Status: offline

 
RE: Frontpage/ Access drop down box query help - 5/25/2009 1:25:51   
hey there..so i tried this (see code below) and i keep getting the error message...
"Item cannot be found in the collection corresponding to the requested name or ordinal./logon/TEST.asp, line 32 "

all i want it to do is forward to error.asp if the memtype = free what am i doing wrong help please!!!


<% @language="vbscript" %>
<!--#include virtual="/logon/_private/logon.inc"-->
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>New Page 2</title>
</head>
<%
'First we create a connection object
Set Conn = Server.CreateObject("ADODB.Connection")

'Next, we open the connection object by calling the connection string
'that FrontPage created and stored in the global.asa file when the "tblUsers"
'connection was created
Conn.Open Application("tblUsers_ConnectionString")

'Then we create a record set object and a SQL statement
Set RS = Conn.Execute ("SELECT * From tblusers WHERE UID = '" & Request("UID") & "' AND memtype = '" & Request("memtype") & "'")

'Loop through the database to check for the users information
Do until RS.EOF
memtype = RS("memtype")
UID = RS("UID")
RS.MoveNext
loop

'Close the recordset and database connection
RS.Close
Conn.Close

If rs("tblusers.memtype")="free" then
response.redirect("error.asp")
End IF %>
<body>

</body>

</html>
<p> </p><p> </p>
<p> </p>

(in reply to TexasWebDevelopers)
TexasWebDevelopers

 

Posts: 722
Joined: 2/22/2002
From: Dallas, TX
Status: offline

 
RE: Frontpage/ Access drop down box query help - 5/25/2009 10:28:15   
quote:

'Close the recordset and database connection
RS.Close
Conn.Close

If rs("tblusers.memtype")="free" then
response.redirect("error.asp")
End IF %>


You cannot close the record set and THEN look for records!
Move the RS.Close
Conn.Close to the very last lines--after your call to the db " If rs("tblusers.memtype")="free" then" ....and so on




_____________________________

:)

Follow us on TWITTER

(in reply to webgyrl)
Page:   [1]

All Forums >> Web Development >> ASP, PHP, and Database >> Frontpage/ Access drop down box query help
Page: [1]
Jump to: 1





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts