|
| |
|
|
Joey
Posts: 172 Joined: 5/15/2002 From: Status: offline
|
DRW Drop Down Jump Box - 11/7/2007 16:22:26
I'm trying to use a drw drop down menu that submits onclick I looked at the example in the tutorial but cannot figure it out, can anyone help? </form>
<form method="POST" action="index.asp" name="AutoCategories">
<p><nobr>
<!--#include file="_fpclass/fpdblib.inc"-->
<% if 0 then %>
<SCRIPT Language="JavaScript">
document.write("<div style='background: yellow; color: black;'>The Database Results component on this page is unable to display database content. The page must have a filename ending in '.asp', and the web must be hosted on a server that supports Active Server Pages.</div>");
</SCRIPT>
<% end if %>
<%
fp_sQry="SELECT * FROM categories ORDER BY category ASC"
fp_sDefault=""
fp_sNoRecords="No records returned."
fp_sDataConn="admin"
fp_iMaxRecords=0
fp_iCommandType=1
fp_iPageSize=0
fp_fTableFormat=False
fp_fMenuFormat=True
fp_sMenuChoice="category"
fp_sMenuValue="category"
fp_sColTypes="&ID=3&category=202&description=203&"
fp_iDisplayCols=1
fp_fCustomQuery=False
BOTID=0
fp_iRegion=BOTID
%>
<p><select name="category" size="1" language="javascript" onchange="gotoLink(this.form);">
<!--#include file="_fpclass/fpdbrgn1.inc"-->
<option><%=FP_FieldHTML(fp_rs,"category")%></option>
<!--#include file="_fpclass/fpdbrgn2.inc"-->
</select></nobr></p>
</form>
<script language="JavaScript">
<!--
function gotoLink(form) {
var OptionIndex=form.AutoCategories.selectedIndex;
parent.location = form.AutoCategories.options[OptionIndex].value;}
//-->
</script>
|
|
|
|
rdouglass
Posts: 9280 From: Biddeford, ME USA Status: offline
|
RE: DRW Drop Down Jump Box - 11/7/2007 16:35:31
This one work any better?
<form method="POST" action="index.asp" name="AutoCategories">
<p><nobr>
<p><select name="category" size="1" language="javascript" onchange="gotoLink(this.form);">
<!--#include file="_fpclass/fpdblib.inc"-->
<% if 0 then %>
<SCRIPT Language="JavaScript">
document.write("<div style='background: yellow; color: black;'>The Database Results component on this page is unable to display database content. The page must have a filename ending in '.asp', and the web must be hosted on a server that supports Active Server Pages.</div>");
</SCRIPT>
<% end if %>
<%
fp_sQry="SELECT * FROM categories ORDER BY category ASC"
fp_sDefault=""
fp_sNoRecords="No records returned."
fp_sDataConn="admin"
fp_iMaxRecords=0
fp_iCommandType=1
fp_iPageSize=0
fp_fTableFormat=False
fp_fMenuFormat=True
fp_sMenuChoice="category"
fp_sMenuValue="category"
fp_sColTypes="&ID=3&category=202&description=203&"
fp_iDisplayCols=1
fp_fCustomQuery=False
BOTID=0
fp_iRegion=BOTID
%>
<!--#include file="_fpclass/fpdbrgn1.inc"-->
<option><%=FP_FieldHTML(fp_rs,"category")%></option>
<!--#include file="_fpclass/fpdbrgn2.inc"-->
</select></nobr></p>
</form>
<script language="JavaScript">
<!--
function gotoLink(form) {
var OptionIndex=form.AutoCategories.selectedIndex;
parent.location = form.AutoCategories.options[OptionIndex].value;}
//-->
</script>
_____________________________
Don't take you're eye off your final destination. ASP Checkbox Function Tutorial.
|
|
|
|
Joey
Posts: 172 Joined: 5/15/2002 From: Status: offline
|
RE: DRW Drop Down Jump Box - 11/7/2007 18:35:30
No, The error reads line 74 char 4 error "AutoVategories.selectedIndex is null or not an object" code 0
|
|
|
|
rdouglass
Posts: 9280 From: Biddeford, ME USA Status: offline
|
RE: DRW Drop Down Jump Box - 11/8/2007 0:03:44
How 'bout adding this: <option value="<%=FP_FieldHTML(fp_rs,"category")%>"><%=FP_FieldHTML(fp_rs,"category")%></option> And this: function gotoLink(form) { var OptionIndex=document.form.AutoCategories.selectedIndex; parent.location = document.form.AutoCategories.options[OptionIndex].value;}
_____________________________
Don't take you're eye off your final destination. ASP Checkbox Function Tutorial.
|
|
|
|
Joey
Posts: 172 Joined: 5/15/2002 From: Status: offline
|
RE: DRW Drop Down Jump Box - 11/8/2007 14:12:01
The error message is gone but no page change on selection. <form method="POST" action="index.asp" name="AutoCategories">
<p><nobr>
<p><select name="category" size="1" language="javascript" onchange="gotoLink(document.this.form);">
<!--#include file="_fpclass/fpdblib.inc"-->
<% if 0 then %>
<SCRIPT Language="JavaScript">
document.write("<div style='background: yellow; color: black;'>The Database Results component on this page is unable to display database content. The page must have a filename ending in '.asp', and the web must be hosted on a server that supports Active Server Pages.</div>");
</SCRIPT>
<% end if %>
<%
fp_sQry="SELECT * FROM categories ORDER BY category ASC"
fp_sDefault=""
fp_sNoRecords="No records returned."
fp_sDataConn="admin"
fp_iMaxRecords=0
fp_iCommandType=1
fp_iPageSize=0
fp_fTableFormat=False
fp_fMenuFormat=True
fp_sMenuChoice="category"
fp_sMenuValue="category"
fp_sColTypes="&ID=3&category=202&description=203&"
fp_iDisplayCols=1
fp_fCustomQuery=False
BOTID=0
fp_iRegion=BOTID
%>
<!--#include file="_fpclass/fpdbrgn1.inc"-->
<option value="<%=FP_FieldHTML(fp_rs,"category")%>"><%=FP_FieldHTML(fp_rs,"category")%></option>
<!--#include file="_fpclass/fpdbrgn2.inc"-->
</select></nobr></p>
</form>
<script language="JavaScript">
<!--
function gotoLink(form) {
var OptionIndex=document.form.AutoCategories.selectedIndex;
parent.location = document.form.AutoCategories.options[OptionIndex].value;}
//-->
</script>
|
|
|
|
rdouglass
Posts: 9280 From: Biddeford, ME USA Status: offline
|
RE: DRW Drop Down Jump Box - 11/8/2007 16:50:54
Do you have a URL or the code of the generated page we can look at? If you could post what the page produces - at least the part between the form tags - that would help narrow it down.
_____________________________
Don't take you're eye off your final destination. ASP Checkbox Function Tutorial.
|
|
|
|
Joey
Posts: 172 Joined: 5/15/2002 From: Status: offline
|
RE: DRW Drop Down Jump Box - 11/8/2007 18:27:11
the dropdown is in http://65.175.102.13/test2.asp The entire page htlm was posted on my last post. Thanks
|
|
|
|
William Lee
Posts: 1179 Joined: 1/25/2002 From: Singapore Status: offline
|
RE: DRW Drop Down Jump Box - 11/9/2007 0:10:41
quote:
ORIGINAL: Joey The error message is gone but no page change on selection. <form method="POST" action="index.asp" name="AutoCategories">
<p><nobr>
<p><select name="category" size="1" language="javascript" onchange="gotoLink(document.this.form);">
<!--#include file="_fpclass/fpdblib.inc"-->
<% if 0 then %>
<SCRIPT Language="JavaScript">
document.write("<div style='background: yellow; color: black;'>The Database Results component on this page is unable to display database content. The page must have a filename ending in '.asp', and the web must be hosted on a server that supports Active Server Pages.</div>");
</SCRIPT>
<% end if %>
<%
fp_sQry="SELECT * FROM categories ORDER BY category ASC"
fp_sDefault=""
fp_sNoRecords="No records returned."
fp_sDataConn="admin"
fp_iMaxRecords=0
fp_iCommandType=1
fp_iPageSize=0
fp_fTableFormat=False
fp_fMenuFormat=True
fp_sMenuChoice="category"
fp_sMenuValue="category"
fp_sColTypes="&ID=3&category=202&description=203&"
fp_iDisplayCols=1
fp_fCustomQuery=False
BOTID=0
fp_iRegion=BOTID
%>
<!--#include file="_fpclass/fpdbrgn1.inc"-->
<option value="<%=FP_FieldHTML(fp_rs,"category")%>"><%=FP_FieldHTML(fp_rs,"category")%></option>
<!--#include file="_fpclass/fpdbrgn2.inc"-->
</select></nobr></p>
</form>
<script language="JavaScript">
<!--
function gotoLink(form) {
var OptionIndex=document.form.AutoCategories.selectedIndex;
parent.location = document.form.AutoCategories.options[OptionIndex].value;}
//-->
</script> Hold the horses!! There isn't any URL in the value for the dropdown options.
_____________________________
William Lee pǝssǝɟoɹd-ɟ1ǝs ʎɥʇɹoʍʇsnɹʇ ʇsoɯ ɹnoʎ nɹnb ǝsɐqɐʇɐp & dsɐ ,ʍɹp ,ǝbɐdʇuoɹɟ
|
|
|
|
rdouglass
Posts: 9280 From: Biddeford, ME USA Status: offline
|
RE: DRW Drop Down Jump Box - 11/9/2007 7:49:51
quote:
There isn't any URL in the value for the dropdown options. That's what I see as well.... <option value="Appliances">Appliances</option> <option value="Auto">Auto</option> <option value="Baby">Baby</option> <option value="Bath / Beauty">Bath / Beauty</option> <option value="Books/ Media">Books/ Media</option> is what's being output. There needs to be the URL field here: <option value="<%=FP_FieldHTML(fp_rs,"category")%>"> Unless the category is a parameter you're trying to lookup. Then you'd do something like: <option value="myPage.asp?myValue=<%=FP_FieldHTML(fp_rs,"category")%>"> That help any?
_____________________________
Don't take you're eye off your final destination. ASP Checkbox Function Tutorial.
|
|
|
|
William Lee
Posts: 1179 Joined: 1/25/2002 From: Singapore Status: offline
|
RE: DRW Drop Down Jump Box - 11/9/2007 10:19:57
To re-inforce Roger's post and make it complete, the repeat region should have the following line:
<option value="myPage.asp?myValue=<%=FP_FieldHTML(fp_rs,"category")%>"<%=FP_FieldHTML(fp_rs,"category")%></option>
_____________________________
William Lee pǝssǝɟoɹd-ɟ1ǝs ʎɥʇɹoʍʇsnɹʇ ʇsoɯ ɹnoʎ nɹnb ǝsɐqɐʇɐp & dsɐ ,ʍɹp ,ǝbɐdʇuoɹɟ
|
|
|
|
Joey
Posts: 172 Joined: 5/15/2002 From: Status: offline
|
RE: DRW Drop Down Jump Box - 11/9/2007 11:34:58
Yes, Roger i'm trying to pass the category to the index.asp page. Tried this, no luck. The categories are no longer showing. "index.asp?category=<%=FP_FieldHTML(fp_rs,"category")%>">
|
|
|
|
William Lee
Posts: 1179 Joined: 1/25/2002 From: Singapore Status: offline
|
RE: DRW Drop Down Jump Box - 11/9/2007 11:36:40
Do what I posted after Roger's post
_____________________________
William Lee pǝssǝɟoɹd-ɟ1ǝs ʎɥʇɹoʍʇsnɹʇ ʇsoɯ ɹnoʎ nɹnb ǝsɐqɐʇɐp & dsɐ ,ʍɹp ,ǝbɐdʇuoɹɟ
|
|
|
|
Joey
Posts: 172 Joined: 5/15/2002 From: Status: offline
|
RE: DRW Drop Down Jump Box - 11/9/2007 11:59:36
William, i did this: <option value=<option value="index.asp?category=<%=FP_FieldHTML(fp_rs,"category")%>"<%=FP_FieldHTML(fp_rs,"category")%></option> the categories go away in the drop down, if I do this: <option value=<option value="index.asp?category=<%=FP_FieldHTML(fp_rs,"category")%>"><%=FP_FieldHTML(fp_rs,"category")%></option> the categories show but no page change. Sorry for being a pain, thanks for helping me!
|
|
|
|
William Lee
Posts: 1179 Joined: 1/25/2002 From: Singapore Status: offline
|
RE: DRW Drop Down Jump Box - 11/9/2007 12:11:34
quote:
ORIGINAL: Joey William, i did this: <option value=<option value="index.asp?category=<%=FP_FieldHTML(fp_rs,"category")%>"<%=FP_FieldHTML(fp_rs,"category")%></option>
the categories go away in the drop down, if I do this: <option value=<option value="index.asp?category=<%=FP_FieldHTML(fp_rs,"category")%>"><%=FP_FieldHTML(fp_rs,"category")%></option>
the categories show but no page change. Sorry for being a pain, thanks for helping me! Yes you are a pain indeed , sorry You are still not doing it right. Compare what you did and what I have posted that you should do. Go on.
_____________________________
William Lee pǝssǝɟoɹd-ɟ1ǝs ʎɥʇɹoʍʇsnɹʇ ʇsoɯ ɹnoʎ nɹnb ǝsɐqɐʇɐp & dsɐ ,ʍɹp ,ǝbɐdʇuoɹɟ
|
|
|
|
Joey
Posts: 172 Joined: 5/15/2002 From: Status: offline
|
RE: DRW Drop Down Jump Box - 11/9/2007 12:17:29
No luck! <form method="POST" action="index.asp" name="AutoCategories">
<p><nobr>
<p><select name="category" size="1" language="javascript" onchange="gotoLink(document.this.form);">
<!--#include file="_fpclass/fpdblib.inc"-->
<% if 0 then %>
<SCRIPT Language="JavaScript">
document.write("<div style='background: yellow; color: black;'>The Database Results component on this page is unable to display database content. The page must have a filename ending in '.asp', and the web must be hosted on a server that supports Active Server Pages.</div>");
</SCRIPT>
<% end if %>
<%
fp_sQry="SELECT * FROM categories ORDER BY category ASC"
fp_sDefault=""
fp_sNoRecords="No records returned."
fp_sDataConn="admin"
fp_iMaxRecords=0
fp_iCommandType=1
fp_iPageSize=0
fp_fTableFormat=False
fp_fMenuFormat=True
fp_sMenuChoice="category"
fp_sMenuValue="category"
fp_sColTypes="&ID=3&category=202&description=203&"
fp_iDisplayCols=1
fp_fCustomQuery=False
BOTID=0
fp_iRegion=BOTID
%>
<!--#include file="_fpclass/fpdbrgn1.inc"-->
<option value="myPage.asp?myValue=<%=FP_FieldHTML(fp_rs,"category")%>"<%=FP_FieldHTML(fp_rs,"category")%></option>
<!--#include file="_fpclass/fpdbrgn2.inc"-->
</select></nobr></p>
</form>
<script language="JavaScript">
<!--
function gotoLink(form) {
var OptionIndex=document.form.AutoCategories.selectedIndex;
parent.location = document.form.AutoCategories.options[OptionIndex].value;}
//-->
</script>
|
|
|
|
William Lee
Posts: 1179 Joined: 1/25/2002 From: Singapore Status: offline
|
RE: DRW Drop Down Jump Box - 11/9/2007 12:19:25
I can take the pain. Substitute mypage.asp to index.asp
_____________________________
William Lee pǝssǝɟoɹd-ɟ1ǝs ʎɥʇɹoʍʇsnɹʇ ʇsoɯ ɹnoʎ nɹnb ǝsɐqɐʇɐp & dsɐ ,ʍɹp ,ǝbɐdʇuoɹɟ
|
|
|
|
William Lee
Posts: 1179 Joined: 1/25/2002 From: Singapore Status: offline
|
RE: DRW Drop Down Jump Box - 11/9/2007 12:23:16
OK. This is the final one, I left out the closing ">" Just copy and paste the following code into your script, it is using index.asp?category=
<option value="index.asp?category=<%=FP_FieldHTML(fp_rs,"category")%>"> <%=FP_FieldHTML(fp_rs,"category")%></option>
< Message edited by William Lee -- 11/9/2007 12:30:27 >
_____________________________
William Lee pǝssǝɟoɹd-ɟ1ǝs ʎɥʇɹoʍʇsnɹʇ ʇsoɯ ɹnoʎ nɹnb ǝsɐqɐʇɐp & dsɐ ,ʍɹp ,ǝbɐdʇuoɹɟ
|
|
|
|
Joey
Posts: 172 Joined: 5/15/2002 From: Status: offline
|
RE: DRW Drop Down Jump Box - 11/9/2007 12:41:04
Not jumping. Looks good tho' <form method="POST" action="index.asp" name="AutoCategories">
<p><nobr>
<p><select name="category" size="1" language="javascript" onchange="gotoLink(document.this.form);">
<!--#include file="_fpclass/fpdblib.inc"-->
<% if 0 then %>
<SCRIPT Language="JavaScript">
document.write("<div style='background: yellow; color: black;'>The Database Results component on this page is unable to display database content. The page must have a filename ending in '.asp', and the web must be hosted on a server that supports Active Server Pages.</div>");
</SCRIPT>
<% end if %>
<%
fp_sQry="SELECT * FROM categories ORDER BY category ASC"
fp_sDefault=""
fp_sNoRecords="No records returned."
fp_sDataConn="admin"
fp_iMaxRecords=0
fp_iCommandType=1
fp_iPageSize=0
fp_fTableFormat=False
fp_fMenuFormat=True
fp_sMenuChoice="category"
fp_sMenuValue="category"
fp_sColTypes="&ID=3&category=202&description=203&"
fp_iDisplayCols=1
fp_fCustomQuery=False
BOTID=0
fp_iRegion=BOTID
%>
<!--#include file="_fpclass/fpdbrgn1.inc"-->
<option value="index.asp?category=<%=FP_FieldHTML(fp_rs,"category")%>"><%=FP_FieldHTML(fp_rs,"category")%></option>
<!--#include file="_fpclass/fpdbrgn2.inc"-->
</select></nobr></p>
</form>
<script language="JavaScript">
<!--
function gotoLink(form) {
var OptionIndex=document.form.AutoCategories.selectedIndex;
parent.location = document.form.AutoCategories.options[OptionIndex].value;}
//-->
</script>
|
|
|
|
BeTheBall
Posts: 6381 Joined: 6/21/2002 From: West Point Utah USA Status: offline
|
RE: DRW Drop Down Jump Box - 11/9/2007 12:50:25
Mind if I chime in? change this: <select name="category" size="1" language="javascript" onchange="gotoLink(document.this.form);"> to: <select name="category" size="1" onchange="location.href=this.options[this.selctedIndex].value">
_____________________________
Duane Some people are like Slinkies . . . Not really good for anything . . . . . But they still bring a smile to your face when you push them down a flight of stairs.
|
|
|
|
Joey
Posts: 172 Joined: 5/15/2002 From: Status: offline
|
RE: DRW Drop Down Jump Box - 11/9/2007 14:00:25
Still no jump. error says "this.options value null or does not exist <form method="POST" action="index.asp" name="AutoCategories">
<p><nobr>
<select name="category" size="1" onchange="location.href=this.options[this.selctedIndex].value">
<!--#include file="_fpclass/fpdblib.inc"-->
<% if 0 then %>
<SCRIPT Language="JavaScript">
document.write("<div style='background: yellow; color: black;'>The Database Results component on this page is unable to display database content. The page must have a filename ending in '.asp', and the web must be hosted on a server that supports Active Server Pages.</div>");
</SCRIPT>
<% end if %>
<%
fp_sQry="SELECT * FROM categories ORDER BY category ASC"
fp_sDefault=""
fp_sNoRecords="No records returned."
fp_sDataConn="admin"
fp_iMaxRecords=0
fp_iCommandType=1
fp_iPageSize=0
fp_fTableFormat=False
fp_fMenuFormat=True
fp_sMenuChoice="category"
fp_sMenuValue="category"
fp_sColTypes="&ID=3&category=202&description=203&"
fp_iDisplayCols=1
fp_fCustomQuery=False
BOTID=0
fp_iRegion=BOTID
%>
<!--#include file="_fpclass/fpdbrgn1.inc"-->
<option value="index.asp?category=<%=FP_FieldHTML(fp_rs,"category")%>"><%=FP_FieldHTML(fp_rs,"category")%></option>
<!--#include file="_fpclass/fpdbrgn2.inc"-->
</select></nobr></p>
</form>
<script language="JavaScript">
<!--
function gotoLink(form) {
var OptionIndex=document.form.AutoCategories.selectedIndex;
parent.location = document.form.AutoCategories.options[OptionIndex].value;}
//-->
</script>
|
|
|
|
BeTheBall
Posts: 6381 Joined: 6/21/2002 From: West Point Utah USA Status: offline
|
RE: DRW Drop Down Jump Box - 11/9/2007 15:31:12
Typo. Should be: <select name="category" size="1" onchange="location.href=this.options[this.selectedIndex].value">
_____________________________
Duane Some people are like Slinkies . . . Not really good for anything . . . . . But they still bring a smile to your face when you push them down a flight of stairs.
|
|
|
|
Joey
Posts: 172 Joined: 5/15/2002 From: Status: offline
|
RE: DRW Drop Down Jump Box - 11/9/2007 15:36:17
Perfect! It's great to have an IT team like you guys helping me. Thanks Joey
|
|
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
|
|
|