Gossamer Forum
Home : Products : DBMan : Customization :

Not getting any search results.

Quote Reply
Not getting any search results.
Hi all.
I reconfigured the cfg. page and set some permissions. When I try to search the database, it does not yield any search results! even if I choose an option that I know for sure is there. What did I do wrong?
Quote Reply
Re: Not getting any search results. In reply to
Oh, I forgot tomention one more thing.
If I check "match any" I do get results. Is there a setting I can make the search automatically a "match any" by default? Thanks in advance for your help.

Jay
Quote Reply
Re: Not getting any search results. In reply to
What error message do you get? "No matching records" or "No search terms specified"?



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





Quote Reply
Re: Not getting any search results. In reply to
Yes, you can have it "match any" by default. In sub html_view_search after

<input type=hidden name="uid" value="$db_uid">

add

<input type=hidden name="ma" value="1">



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





Quote Reply
Re: Not getting any search results. In reply to
JPD.
I get no matching records. If you wanna check it out it is here http://www.styleforliving.com/cgi-bin/dbman2/db.cgi?db=default&uid=default I have made a whole bunch of check boxes--thats what I want the search page to look like(well sort of) COuld you tell me how I can go about making further modifications to make it look similar to that? I am going through your tutorial as I am writing this, so perhaps my question will be automatically be answered Smile By the way, Your tutorial has been extremely helpful to me. Without it, I probably haven't been able to get this far... Thanks JPD~~>Is your name Carol??? Why is Eliot calling you Carol??? no biug deal, just wondering.
Quote Reply
Re: Not getting any search results. In reply to
JayR,

JPDeni's name is Carol. I looked at your search form and could not see any syntax errors. I know that searches with checkboxes can be tricky.

May be Carol (JP, JPDeni, Kind Lady) can help you.

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: Not getting any search results. In reply to
Eliot.
Now I know Smile
A newbie question for you: Is the key field absolutely necessary? What happens if I don't have one??? Thanks in advance.

Jay
Quote Reply
Re: Not getting any search results. In reply to
The key field is not necessary for all databases. It depends on what you want your Registered Users to do in your database. I would refer to JPDeni's DBMAN Permission Tutorials for more information on setting your authentication schemes and key fields.

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: Not getting any search results. In reply to
Eliot is wrong. The key field is very necessary. There are things that will not function without it. For example, the add success page is dependent upon the key field, as is the modify record. You *MUST* have a key field.

I think Eliot was thinking of a userid field.

Jay, your problem is undoubtedly due to your checkbox fields. I tried the URL you gave for you site and I got a "File Not Found" error, or I would be able to tell you for sure.

The problem with checkboxes is that you probably have more than one option defined for a checkbox. You can't do that and be able to do searches. You must make a separate field for each checkbox.

If you want me to look at your files to know for sure what the problem is, copy your files (default.cfg and html.pl) to a web-accessible directory -- one where you would place html files -- and rename them to default_cfg.txt and html_pl.txt. Then come back here and tell me where they are and I'll look at them.


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





Quote Reply
Re: Not getting any search results. In reply to
Hi Carol! I looked up your section on ypur site~~~duhh~~~X)
Yeh..I took Eliot's advice and removed the Keys and had problems so I included it. But is there a way I can "hide" the key from viewers???
sorry about the link I changed it its here
http://www.styleforliving.com/cgi-bin/db/db.cgi?db=default&uid=default

I'll load the cfg and pl files in the following dir.
cfg---> styleforliving.com/dbman/default_cfg.txt
html.pl--->
styleforliving.com/dbman/html_pl.txt
Thanks for all your help.

Jay
Quote Reply
Re: Not getting any search results. In reply to
Yes, you can hide the ID from users. Since you're using the autogenerate feature, just set the field length of the ID field to -1.

Now for your checkboxes.

You can have more than one option for a checkbox field, but, as you see, it doesn't look very good on the forms. And, as you found out, it causes a lot of problems with searches.

What you need to do is to take each one of the checkbox options and make a field for it. Then you will have much more control over the look of your form and you will be much more successful in your searches.

To illustrate:

Instead of

Code:
'by Item' => [0, 'alpha', 0, 255, 0, '', '' ],

Make a field of each of the checkbox options:

Code:
Accessories => [ 0, 'alpha', 0, 255, 0, '', ''],
Appliances => [ 1, 'alpha', 0, 255, 0, '', ''],
Armoire => [ 2, 'alpha', 0, 255, 0, '', ''],
Art => [ 3, 'alpha', 0, 255, 0, '', ''],
and so on.

In your %db_checkbox_fields, define your fields like:
Code:
Accessories => 'Accessories(decorative)',
Appliances => 'Appliances(stoves ranges etc.)',
Armoire => 'Armoire/Wardrobes/Entertainment Center',
Art => 'Art/Galleries/Framing',
and so on.

When you get to the point of creating your own forms and displays, you'll be able to make some really nifty looking checkbox fields, instead of the mess that's there now.

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





Quote Reply
Re: Not getting any search results. In reply to
I AGREE. It is totally messy!@ I was hoping to further customize it after I have a working prototype. I am going through your tutorials and it has been extremely helpful. And thank you for all of your support! I'll take your advice and make changes right now.

Jay
Quote Reply
Re: Not getting any search results. In reply to
JP.
If I mke each individual check boxes a separate field, will I have any control over where on the form it will appear? will all of the check boxes be in one vertical column?

Jay
Quote Reply
Re: Not getting any search results. In reply to
You'll get rid of the labels to the left of the checkboxes in the next step.

I was afraid that part of the tutorial wouldn't be clear to everyone. The trouble is that I don't know how to explain it any better.

I just realized that you possibly didn't connect "the code below for each different kind of field" with the sections marked "Text fields," "Select fields," "Radio fields," "Checkbox fields" and "Textareas." Those are the "C" notes I suggested you make on your printout -- the type of field it is.

For example, your Store Name field would be a text field. You'll probably want that right up at the top. So, just after your hidden ID field, add

Code:
<TR><TD ALIGN="Right" VALIGN="TOP"><$font>Store Name:</font></TD>
<TD VALIGN="TOP">
<input type="text" name="Store Name" value="$rec{'Store Name'}" size="40" maxlength="255"></TD></TR>

Does that help?

As I say, I can give you a better way of working with your checkbox fields. We can let Perl do some of the work for you.

You had mentioned before that you wanted to have a form that looked like that on another site. Did you want your checkboxes in columns? How many?



Then again, with all of your checkboxes, I think we need to do something a little different.

Could you put your new default.cfg file up on your site? It would make it easier to explain if I have something to look at.

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





Quote Reply
Re: Not getting any search results. In reply to
When you get ready to make your own form, I've got some sneaky ways of making it a lot quicker to create the form instead of typing all of that stuff in. Just remind me of it when the time is right.


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





Quote Reply
Re: Not getting any search results. In reply to
JP.
How do I get rid of the fieldname to the left of checkbox??
Definitely the search results are more accurate!

My next questionis from our tutorial on "create your own forms and displays" What do you mean by the following statement??
"Next, add all the other fields, in the order you want them listed on your form. Don't worry about any "admin-only" fields right now. We'll get to them in a bit. Again, copy the code below for each different kind of field and paste it into sub html_record_form, between the <TABLE... and </TABLE> tags, substituting the letters in bold print for the values on your printout from the default.cfg file. Make sure that you enter an input field on your form for every field in your database. "

Jay

Quote Reply
Re: Not getting any search results. In reply to
JP.
I made the form length on the ID field to -1 and its gone.

When I administer like adding a record, I also have no ID field. Does this mean I no longer have a key?? or is the ID there but just not visible.

Jay
Quote Reply
Re: Not getting any search results. In reply to
If you are still using autogenerate, the field is still there. It's just hidden. Take a look at the source code of the form in your browser and you'll see there's a hidden field with the name of "ID."

However -- and this is a very big however -- when you make your own forms, you *must* include the hidden field in your form.


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





Quote Reply
Re: Not getting any search results. In reply to
Carol.
What do you mean " a big However"?? Is it that difficult to modify the form?? Even with your help??

Jay
Quote Reply
Re: Not getting any search results. In reply to
JP.
The following is a link to my mock search(I wanna add a keyword search on the bottom) form styleforliving.com/furnishings/index.htm

the new form with the modified(from my last messy check boxes) form with the new check boxes are here
http://www.styleforliving.com/cgi-bin/db/db.cgi?db=default&uid=default

and for the updated cfg source code,
styleforliving.com/dbman/default_cfg.txt

I haven't found any errors to my knowledge...Could you look at it tell me if I am OK for your next phase of the tutorial to modify my form?

Always thankful for your insights,
Jay
Quote Reply
Re: Not getting any search results. In reply to
What Carol means is that you have to include the "hidden" fields for the .cfg and userid in your modified search forms. It is possible to create static web search forms. But you have to include the following hidden fields:

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

The form seems to work. I checked Bedroom and it came up with the record.

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 26, 1999).]
Quote Reply
Re: Not getting any search results. In reply to
What I mean about the "big however" is that you need to include a hidden field for the ID in your sub html_record_form for adding and modifying your data. You don't need to worry about it with the search form, if you have a separate subroutine for the search or if you are using a static html page.

(BTW, sorry I didn't get back to you earlier. I had to spend the afternoon with my mother-in-law. Smile )

It is not difficult to modify the form. It's just that people forget to add hidden fields to their forms and get into all sorts of trouble that way.

Your form and .cfg file look great. You're doing very well! Smile


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





Quote Reply
Re: Not getting any search results. In reply to
JP.
I am still unsure of the underlying "principle" of dbMan. For example, there are things on the search form I don't want to appear but still have those fields showing up on the search results. If you look on my form, the "store description" (http://styleforliving.com/cgi-bin/db/db.cgi?uid=default) should only show up on the results, not on the actual form itself... Am I jumping the gun here with question that will be answered once I start modifying the form?? Thanks JP. I thought you were getting sick of me asking so many newbie questions, so not writing back to me anymore Smile

Jay
Quote Reply
Re: Not getting any search results. In reply to
No. It takes a lot more than this to make me sick of you. (My m-i-l got a new television and couldn't figure out how to get it to work. My choice was to listen to her complain about how she didn't know what to do with it, or go over there and show her. Smile )

I understand what you mean about people not being able to search on the store description field. That makes perfect sense. But you do need to have the description field within html_record_form so that you can input the store description when you add the record and so you can modify it if you need to.

First, build your sub html_record_form with all of your fields in it. Make sure it works perfectly. After that, we'll make a separate form for searching that only lists the fields you want people to be able to search on. Make sense?


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

PS -- I almost forgot to ask. When you had your "messy" checkboxes, you had three different ones -- by Type, by Room(?) and by Style. Do you still want to group your checkboxes in that way -- with different categories? Do you want to have three columns of checkboxes?



[This message has been edited by JPDeni (edited August 26, 1999).]
Quote Reply
Re: Not getting any search results. In reply to
JPD.
The three groupings: "by Item, by Room, and by Style" are gropu that I'd like to divide up all the checkboxes into. If you wanna see my mock page on it here it is
styleforliving.com/furnishings/index.htm
that's how I'd like the final version to look like with an additional keyword search field at the end of it. What do ya think??

Jay
Quote Reply
Re: Not getting any search results. In reply to
Looks great!

Go ahead and make up the form like you need it to be for adding and modifying -- except don't put in the checkboxes yet. I'll give you the code for the checkboxes in a little while.


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





Quote Reply
Re: Not getting any search results. In reply to
JPD.
I just loaded the html_pl.txt file to the following directory.
http://www.styleforliving.com/dbman/html_pl.txt

Jay

Oh almost forgot...
I thought I saw on your site where you said you did not like frames too much. For the portion of the site that will have the search form, I am using frames. Is that gonna be a problem you think???

[This message has been edited by JayR (edited August 26, 1999).]
Quote Reply
Re: Not getting any search results. In reply to
No. Frames shouldn't be a problem I just don't like them as a user.

Would you be needing to go from one frame to another within DBMan? If not, there's no problem at all. If so, there's a little bit of a problem, but not much.

Are you planning on using the static page for your search form?


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





Quote Reply
Re: Not getting any search results. In reply to
Actually I am making some updates on a new static form page to give you a better idea.
It should be up in a few minutes at styleforliving.com/furnishings/index.htm

jay
Quote Reply
Re: Not getting any search results. In reply to
You can add as many fields as you want. You will have to start over with a blank database or add delimiters to each record if you do. Also, be sure to add them to the end of your database. Don't try to stick a new field into the middle, unless you start with a completely blank .db file.

The way I have things set up, everything will come out alphabetical, so there's no problem there.

I guess I missed the "match any" part. Smile I forget things a lot!

I'll have to think about listing the keywords on the search form. That might take some doing, but I think I can.

You could make the sorting option from the individual fields, but that might be pretty unwieldy. You've got a lot of fields there. I really think sorting by the store name is the best way to go.

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





Quote Reply
Re: Not getting any search results. In reply to
Sorting by store name is fine.
Should I stick in the table from my static form page into html_record_form?? What about the check boxes, are they OK to put in asis?

jay
Quote Reply
Re: Not getting any search results. In reply to
No. Just put in the fields for the ID, the Store Name, the Store Description and the URL. I'll give you the code for the checkboxes.


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





Quote Reply
Re: Not getting any search results. In reply to
Carol.
I just modified the html.pl file. but I am afraid to load it. Could you check it out and let me know if I am on the right track? From the search form, I wanna hide the following fields: Store name, Store Description, URL, and ID
the .pl file is here
styleforliving.com/dbman/html_pl.txt
Thanks.
Jay
Quote Reply
Re: Not getting any search results. In reply to
No syntax errors!! Smile

I know that you want to hide some of the fields for your search form, but right now we're worrying about the form for entering and modifying the data. We'll get to the rest in just a bit.

You need to delete

<input type="hidden" name="Store Name" value="$rec{'Store Name'}">
<input type="hidden" name="Store Description" value="$rec{'Store Description'}">
<input type="hidden" name="URL" value="$rec{'URL'}">

and

<TR><TD ALIGN="Right" VALIGN="TOP"><$font>ID:</font></TD>
<TD VALIGN="TOP">
<input type="text" name="ID" value="$rec{'ID'}" size="40" maxlength="255"></TD></TR>

You can't have two fields, even hidden ones that have the same name within a form. (Well, you can, but it's a really bad idea. Smile )

Now here's where you build your checkbox fields.

Go into your default.cfg file and add the following:

Code:
%Categories = (
Room => 'Bathroom Bedroom Childrens Diningroom HomeOffice Kitchen LivingRoom OutdoorLiving',
Style => 'Antiques Arts Asian Biedermeier Consignment Contemporary Country Custom European Fine Ironwork
Leather Mexican MidCentury Reproduction World',
Item => 'Accessories Appliances Armoire Art Beds Chairs Children Desks Fabrics Flooring
Hardware Lighting Outdoor Paint Sofas Sinks Tables1 Tables2 Tabletop Tiles'
);

I put linefeeds in there so things wouldn't scroll too much, but you need to keep all the field names for each of the categories on one line. You should end up with just 3 lines of real text.

The purpose of this is to be able to group your fields together.

Every one of your checkbox fields should be listed there. If you've added any more, just put the name of the field into the correct category.

Then go back to the html.pl file, sub html_record.

You would have already deleted the extra fields I mentioned above.

After

Code:
<input type="text" name="URL" value="$rec{'URL'}" size="40" maxlength="255"></TD></TR>

add

Code:
<tr><td colspan=2>
<table width=100%>|;
foreach $category (sort keys %Categories) {
$i = 0;
print qq|<tr><td colspan=3>
<font face="Arial, Helvetica, sans-serif" size="2" color="#000099"><B>By $category</b></font></td></tr>\n|;
@array = split (/ /, $Categories{$category});
foreach $item (sort @array) {
unless ($i%3) {
print "<tr>";
}
print qq|<td><font face="Arial, Helvetica, sans-serif" size="1" color="#000000">|;
print &build_checkbox_field($item,$rec{$item});
print "</font></td>\n";
if ($i%3 == 2) {
print "</tr>\n";
}
++$i;
}
while ($i%3 > 1) {
print "<td>&nbsp;</td>\n";
++$i;
}
print "</tr><tr><td colspan=3>&nbsp;</td></tr>";
}
print "</table></td></tr>";
print qq|

That will give you your checkboxes.

Once you're done with that, we'll work on the search form. It'll be a piece o' cake! Smile


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







[This message has been edited by JPDeni (edited August 27, 1999).]

[This message has been edited by JPDeni (edited August 27, 1999).]
Quote Reply
Re: Not getting any search results. In reply to
JPD.
I've also put up a mock search result page. Could you check it out and tell me if its possible to do?? styleforliving.com/furnishings/index.htm
on the bottom of the search form there is a link going to the result page. Thanks in advance.

Jay
Quote Reply
Re: Not getting any search results. In reply to
Several questions --

I notice that your search page has more fields on it now. Have you added those to your .cfg file? (It's not a problem, but I sorta need to keep track.)

On your results page -- it might be a little tough to get it exactly that way. For one thing, someone could choose more than one of the Style, Room and Item options. Do you want all of them listed? For another, I'll have to think about how to manage to divide the search terms up into the categories.

I don't know about the wording "most relevant." The search will only return records that have all of the search terms -- unless you include a "match any" hidden field.

I don't think your sorting option on your search field page is going to work. Again, it requires the grouping of the checkboxes, which is tough. (It's a trade off. Either the options are grouped and the form looks really messy or they're not grouped and you can't sort by groups.) I don't see how that would work anyway. I think it would be best to just sort by store name.

These are the thoughts off the top of my head.

I've just about got the checkbox part of your forms worked out.


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





Quote Reply
Re: Not getting any search results. In reply to
Yes there are few more fields, and I have not yet added to my cfg file. I wanted to know if its possible that way.

Yes having all the stuff listed(the checked item by user) is OK

I did add a match any in the hidden fields few posts earlier Smile

In regards to the sorting option, thats fine, I can take it out all together if its going to cause headaches. How about if I make the sorting option from the individual fields?? Would that be more feasible?? But sorting by store name is cool also. I was just trying to be fancy Smile

jay
Quote Reply
Re: Not getting any search results. In reply to
JP.
Should the .cfg category come before or after the %db_def? or does it matter??

Jay
Well...I just took a wild guess and put it before, and it worked! Except there are few errors in the check boxes like the following

error building checkboxes: no checkboxes specified in config for field ' Hardware'

so I checked out my .cfg file and the fields are there. incase you wanna see what I did here is the link to the default_cfg.txt file
styleforliving.com/dbman/default_cfg.txt

Thanks

[This message has been edited by JayR (edited August 27, 1999).]
Quote Reply
Re: Not getting any search results. In reply to
It doesn't matter. I'd probably put it somewhere around where the checkbox definitons are.

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





Quote Reply
Re: Not getting any search results. In reply to
Jay, it's a really bad idea to come back and edit your previous message to ask another question or tell of a problem. When you add another post, it sends the thread to the top of the list where I can see it. I almost didn't look at this thread just now, but I wasn't sure of the time that I was last on, so I thought I'd check.

I guess you missed my notation a couple of messages up:
Quote:
I put linefeeds in there so things wouldn't scroll too much, but you need to keep all the field names for each of the categories on one line. You should end up with just 3 lines of real text.

You must put all the field names on one line for each of the categories. There should be no new line between Ironwork and Leather or between Flooring and Hardware.



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





Quote Reply
Re: Not getting any search results. In reply to
Sorry.
I'll try that now and will let you know how it went.
Jay
Quote Reply
Re: Not getting any search results. In reply to
Only if I read your previous post more thoroughly I would have saved so much agony
X(
It works fine now with no errors. Now do I make further changes in the .pl file??

Jay
Quote Reply
Re: Not getting any search results. In reply to
Next you need to make a search form.

I think I sent you the instructions in an email, but I'll go over it here, too.

Copy all of sub html_record_form and paste it just below the current subroutine. You'll now have two identical subroutines. Rename the second one to sub html_search_form. Delete the hidden field for ID and the other fields you don't want people to search on. In fact, here's what your sub html_search_form should look like:

Code:
sub html_search_form {
# --------------------------------------------------------

my (%rec) = @_;

my $font = 'Font face="Verdana, Arial, Helvetica" Size=2 Color=#003399';

print qq|
<TABLE WIDTH="450" CELLPADDING=0 CELLSPACING=0 BORDER=1 BGCOLOR="#FFFFCC">
<tr><td colspan=2>
<table width=100%>|;
foreach $category (sort keys %Categories) {
$i = 0;
print qq|<tr><td colspan=3>
<font face="Arial, Helvetica, sans-serif" size="2" color="#000099">
<B>By $category</b></font></td></tr>\n|;
@array = split (/ /, $Categories{$category});
foreach $item (sort @array) {
unless ($i%3) {
print "<tr>";
}
print qq|<td><font face="Arial, Helvetica, sans-serif" size="1" color="#000000">|;
print &build_checkbox_field($item,$rec{$item});
print "</font></td>\n";
if ($i%3 == 2) {
print "</tr>\n";
}
++$i;
}
while ($i%3 > 1) {
print "<td> </td>\n";
++$i;
}
print "</tr><tr><td colspan=3> </td></tr>";
}
print "</table></td></tr>";
print qq|

</TABLE>
|;
}

In sub html_view_search change

&html_record_form();

to

&html_search_form();

In sub html_view_failure change

&html_record_form(%in);

to

&html_search_form(%in);

You'll probably also want to make some changes to sub html_search_options so it has what you want.



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





Quote Reply
Re: Not getting any search results. In reply to
Thanks JPD.
My search form is REALLY coming along. This is more of a cosmetic question, but how do I make the checkboxes and the letters associated with it look "neater"??? Any advice?
Jay
Quote Reply
Re: Not getting any search results. In reply to
Can I see your database in action? It would really help, especially if we're talking about cosmetics.


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





Quote Reply
Re: Not getting any search results. In reply to
Hey Deni,
I feel like a total dork~~~>you doing all the actual work & me doing the no brainer cut and pasting X) However, as I am viciously cutting and pasting, I am learning how the different files are actually working together Smile Also, I have been totally disecting your instructions but due to my limited experience, I had to let it settle for a while, and resulting in asking the same dorky questions over and over...I hope it didn't frustrate you.
Quote Reply
Re: Not getting any search results. In reply to
Yea...The killer search is over here(keke)<~~~a happy camper!!!
http://styleforliving.com/cgi-bin/db/db.cgi?uid=default

Jay
Quote Reply
Re: Not getting any search results. In reply to
After the code I gave you in my previous response, put back

Code:
return $output;
}

That should fix it.


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





Quote Reply
Re: Not getting any search results. In reply to
Deni.
That fixed it.

I did everything you listed & still the boxes aren't lined-up.
Quote Reply
Re: Not getting any search results. In reply to
You added the

Code:
unless ($i%3) {
print "<tr valign=top>";
}

to the subroutine? It didn't come out in the source code for your page.

Try changing it to

Code:
unless ($i%3) {
print qq|<tr valign="top">|;
}


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





Quote Reply
Re: Not getting any search results. In reply to
I just tried your search page again. Looks like you removed the line

&html_print_headers;

from sub html_view_search. You need to have that in there! Smile


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





Quote Reply
Re: Not getting any search results. In reply to
Deni.
I inserted
unless ($i%3) {
print qq|<tr valign="top">|;
}
to my cgi file after
foreach $name (@names) {
(grep $_ eq $name, @values) ?
($output .= qq!<INPUT TYPE="CHECKBOX" NAME="$column" VALUE="$name" CHECKED> $name\n!) :
($output .= qq!<INPUT TYPE="CHECKBOX" NAME="$column" VALUE="$name"> $name\n!);
}
return $output;
}
and still doesn't wanna change. What am I doing wrong??
Quote Reply
Re: Not getting any search results. In reply to
Again, I was unclear.

The
Code:
unless ($i%3) {
print qq|<tr valign="top">|;
}

Does not go into db.cgi. Take it out of that file.

It is a replacement for the code in sub html_record_form and sub html_search_form.

Look carefully at the code in both of those subroutines and find

Code:
unless ($i%3) {
print "<tr>";
}

That's where you need to put the align=top code.


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





Quote Reply
Re: Not getting any search results. In reply to
Deni.
Thanks for all your help today. Here are the directories that have all the file that I modified
styleforliving.com/dbman/db_cgi.txt
styleforliving.com/dbman/default_cfg.txt
styleforliving.com/dbman/html_pl.txt

I deleted some stuff in sub html_view_search. Let me know if this is gonna be problematic. So far it seems to be working OK with the lines deleted~~~>thats sort of the look I wanna achieve.
By the way, how do I make links from the BB??

[This message has been edited by JayR (edited August 28, 1999).]
Quote Reply
Re: Not getting any search results. In reply to
Deni.
How do I make links on the URL field??? and is there a code associated with the target frame that I need to inser in PERL or can I do that with HTML??
Quote Reply
Re: Not getting any search results. In reply to
Regarding frames -- if the DBMan pages are all going to be within the same frame, you don't need to worry about target frames within DBMan. Just use the frames stuff in the URLs in your menus.

To get a url to print out, use

<a href="$rec{'URL'}>$rec{'URL'}</a>

To make your checkboxes a little nicer, one thing you can do is to go into db.cgi and look for sub build_checkbox_field

In that subroutine, look for

Code:
foreach $name (@names) {
(grep $_ eq $name, @values) ?
($output .= qq!<INPUT TYPE="CHECKBOX" NAME="$column" VALUE="$name" CHECKED> $name\n!) :
($output .= qq!<INPUT TYPE="CHECKBOX" NAME="$column" VALUE="$name"> $name\n!);
}

Instead of the space before $name in the lines above, use &nbsp;. That will keep the checkbox and the words on the same line.

You also might want to add tags to your tables to vertically align the rows to the top, in case there's something that ends up going over two lines.

Code:
unless ($i%3) {
print "<tr valign=top>";
}

The other thing I would do is to make the table width 100%

<TABLE WIDTH=100% CELLPADDING=0 CELLSPACING=0 BORDER=1 BGCOLOR="#FFFFCC">

I think that will look a lot better.

You can, of course, change the background color for the table to anything you want.

Not to worry about "cutting and pasting." I know you're learning some as we're going along. Besides, the code for printing out the checkboxes is pretty advanced. I could have made you type in all those things, but this is much better. Smile

Also, I know you're on a time schedule, so it's faster to give you the code than to make you work for it. Smile


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





Quote Reply
Re: Not getting any search results. In reply to
You are DA BOMB JPD. No other words. THANK YOU
Quote Reply
Re: Not getting any search results. In reply to
Deni.
I did this:
Instead of the space before $name in the lines above, use . That will keep the checkbox and the words on the same line.
and got that nasty 500 error. I will put the modified .cgi file in the followint path
styleforliving.com/dbman/db_cgi.txt

Thanks
Quote Reply
Re: Not getting any search results. In reply to
I should have been more specific. Make the lines look like

Code:
foreach $name (@names) {
(grep $_ eq $name, @values) ?
($output .= qq!<INPUT TYPE="CHECKBOX" NAME="$column" VALUE="$name" CHECKED>&nbsp;$name\n!) :
($output .= qq!<INPUT TYPE="CHECKBOX" NAME="$column" VALUE="$name">&nbsp;$name\n!);
}



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





Quote Reply
Re: Not getting any search results. In reply to
I did it and still getting that error.
here is the updated code
styleforliving.com/dbman/db_cgi.txt
did I do something wrong again???