Gossamer Forum
Home : Products : DBMan : Customization :

List All from static .html drop down menu

Quote Reply
List All from static .html drop down menu
Hi JPD,

I'm trying to do a list all from a static html page. I would like to bypass the Main Menu of DBMan. I have set $auth_logging = 1; to allow anyone access.

This is what I have on my page.
html code:
<form METHOD="GET" ACTION="http://www.xprt-solutions.com/cgi-bin/db.pl?">
<input type="hidden" name value><table border="0" width="71%">
<tr>
<td width="50%" align="center"><div align="center"><center><p><small><font face="Verdana"><select
name="db" size="1" style="font-family: Book Antiqua" tabindex="15">
<option> </option>
<option value="CT">CT </option>
<option selected value="NJ">NJ</option>
<option value="NY">NY </option>
<option value="PA">PA </option>
<option value="VT">VT </option>
</select> </font></small><input type="submit" value="Search" target="main"></td>
</tr>
</table>

Thanks in advance.
Bryan Moscato
Quote Reply
Re: List All from static .html drop down menu In reply to
First of all, to make the search form work, you need to add in the following hidden fields:

Code:
<input type=hidden name="db" value="default">
<input type=hidden name="uid" value="default">

You may need to change the "name" of your db value to whatever you have named your database file.

To create a list all link from your static web page, use the following link:

Code:
<a href="/cgi-bin/db.pl?db=default&uid=default&vr=1&ID=*&sb=1&so=descend">List All Records</a>

(It looks like Carol beat me to the punch again...her instructions are more detailed and should address your problem.) Smile

Hope this helps.

Regards,

------------------
Eliot Lee
Founder and Editor
Anthro TECH, L.L.C
http://www.anthrotech.com/
info@anthrotech.com
==========================
Coconino Community College
http://www.coco.cc.az.us/
Web Technology
Coordinator
elee@coco.cc.az.us

[This message has been edited by Eliot (edited August 23, 1999).]

[This message has been edited by Eliot (edited August 23, 1999).]

[This message has been edited by Eliot (edited August 23, 1999).]
Quote Reply
Re: List All from static .html drop down menu In reply to
First off, $auth_logging=1 won't give access to anyone. You need to have $auth_default=1 in order for a default user to have access. (That may have been a typo, though. Smile )

Problems I see:

<form METHOD="GET" ACTION="http://www.xprt-solutions.com/cgi-bin/db.pl?">

Take out the ?

<input type="hidden" name value>

This is a problem.

Replace the above with

<input type="hidden" name="uid" value="default">

You need to add a search term.

<input type="hidden" name="the field name of your db_key field value="*">

Your submit form needs to add the action you want to accomplish:

<input type="submit" value="Search" name="view_records" target="main">

I think that should do it.


------------------
JPD





Quote Reply
Re: List All from static .html drop down menu In reply to
I'm sorry, I should have mentioned that each state is it's own database w/ it's own .cfg file.

Bryan Moscato
Quote Reply
Re: List All from static .html drop down menu In reply to
Hmm...that may be complicated. What you could do is use radio buttons for each database, but that will make your form pretty messy.

There are other Threads that discuss using "Radio Buttons for Multiple Databases". You might try searching this forum for these keywords and find those Threads.

Regards,

------------------
Eliot Lee
Founder and Editor
Anthro TECH, L.L.C
http://www.anthrotech.com/
info@anthrotech.com
==========================
Coconino Community College
http://www.coco.cc.az.us/
Web Technology
Coordinator
elee@coco.cc.az.us
Quote Reply
Re: List All from static .html drop down menu In reply to
I took the select field into consideration. I'm pretty sure if you make the changes I suggested it will work just fine.


------------------
JPD





Quote Reply
Re: List All from static .html drop down menu In reply to
I just wanted to thank both JPD and Eliot for there time, and yes JPD it worked. =]
Quote Reply
Re: List All from static .html drop down menu In reply to
No problem...Glad to help out.

Smile

Regards,

------------------
Eliot Lee
Founder and Editor
Anthro TECH, L.L.C
http://www.anthrotech.com/
info@anthrotech.com
==========================
Coconino Community College
http://www.coco.cc.az.us/
Web Technology
Coordinator
elee@coco.cc.az.us
Quote Reply
Re: List All from static .html drop down menu In reply to
One last question, I made the sujested changes to the html page and it calls up the search page w/ the states bold. I found this thread: http://www.gossamer-threads.com/scripts/forum/resources/Forum12/HTML/000761.html which describes my problem but I don't know where to put the code.

My html.pl file does not have: ($db_auto_generate and print &build_html_record(%rec) and return);

The problem is being returned from:
if (( $rec{'Address1'} && $rec{'City'} && $rec{'State'} ) ) { $addr = &urlencode($rec{'Address1'}); $city = &urlencode("$rec{'City'}, $rec{'State'}"); print qq|<BR> <a href="http://maps.yahoo.com/py/maps.py?addr=$addr&csz=$city">Map</a> |;
Quote Reply
Re: List All from static .html drop down menu In reply to
In your sub html_record and sub html_record_long (depending if you are using the Short/Long Mod), put the following codes at the top before the print qq| line:

Code:
$rec{'Address1'} =~ s/<?.B>//g;
$rec{'City'} =~ s/<?.B>//g;
$rec{'State'} =~ s/<?.B>//g;

Hope this helps.

Regards,

------------------
Eliot Lee
Founder and Editor
Anthro TECH, L.L.C
http://www.anthrotech.com/
info@anthrotech.com
==========================
Coconino Community College
http://www.coco.cc.az.us/
Web Technology
Coordinator
elee@coco.cc.az.us
Quote Reply
Re: List All from static .html drop down menu In reply to
Thanks again Eliot, it worked.

Bryan Moscato
Quote Reply
Re: List All from static .html drop down menu In reply to
You're welcome.

Smile

Regards,

------------------
Eliot Lee
Founder and Editor
Anthro TECH, L.L.C
http://www.anthrotech.com/
info@anthrotech.com
==========================
Coconino Community College
http://www.coco.cc.az.us/
Web Technology
Coordinator
elee@coco.cc.az.us