Gossamer Forum
Home : Products : DBMan : Customization :

For JPdeni from other forum

Quote Reply
For JPdeni from other forum
Hi there you can access the script at
http://www.thehairshop.co.uk/cgi-bin/db/db.cgi your username is jpdeni and password: thankyou

if you view the modify page you get the yellow background display of all the fields if you click on list all it displays the output display and not the yellow boxes which i would like.

Regards

MDJ
Quote Reply
Re: For JPdeni from other forum In reply to
Thanks for moving the question. Smile

The first problem I see is that the modify search page is blank when I used Netscape. You're missing a table tag somewhere.

The modify routine uses sub html_record to list the records to be modified. If you would like the format of the record display to be different, you can create a new subroutine.

Here's what I would do.

--Copy sub html_record
--Paste it just below the current subroutine so that you have two identical subroutines.
--Rename the second one to sub html_record_modify.
--Edit the new subroutine so it appears as you want it to.
--In sub html_modify_form, change

Code:
&html_record (%tmp);

to

Code:
&html_record_modify (%tmp);

You might also want to do that with sub html_delete_form.


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





Quote Reply
Re: For JPdeni from other forum In reply to
Hi there,

Ive done this but im getting an error

try http://www.thehairshop.co.uk/cgi-bin/db/db.cgi
for the error

the file can be viewed at http://www.thehairshop.co.uk/html.txt

MMM so close
Quote Reply
Re: For JPdeni from other forum In reply to
In sub html_record_form, you are missing some stuff at the end. It should be

Code:
print &build_select_field("Product Range",$rec{'Product Range'});
print qq|</td></table>|;

In sub html_record_modify, you just need to add the print qq| at the same place.


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





Quote Reply
Re: For JPdeni from other forum In reply to
JPD
You R A *****STAR*****

THANKS

MDJ

PS I still havnt worked out how to modify the layout as in my thread in the other forum

Quote Reply
Re: For JPdeni from other forum In reply to
It just takes a little looking and having Perl installed on your home computer to find errors. Smile

What layout did you mean? Can you explain it again?


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





Quote Reply
Re: For JPdeni from other forum In reply to
How do I install PERL on my home computer??

I didnt know you could.

Anyway What I'm trying to achieve with the layout is this.

When you look at the main page http://www.thehairshop.co.uk/index.htm you see a table on the left with some links and info in it what i would like to do is to keep this table in the page that dispalys the products try the manufactureres page and then fudge view products. there is a blue band down the left but this only corresponds to each record.

Regards

MDJ

PS do you need the password anymore?
Quote Reply
Re: For JPdeni from other forum In reply to
I started answering this last night, and then my server went down and I got disconnected.

You can install Perl on your home computer. Go to http://www.activestate.com/ActivePerl/ and pick up the Perl distribution from there. (It's quite a long download.) Then run the installer and it will be on your system.

You won't be able to directly run DBMan from your computer unless you have server software too. But you can use it to compile your scripts and see where the errors are.

A really good way of doing this is to use the EditPlus text editor. It has a little feature where you can define keystrokes to compile the current script and find the errors. (Other text editors may do this, too, but EditPlus was the first one I came across with this feature.)

I have it set up on my computer so that whenever anyone has a syntax error they can't locate, I go download the file, open it in EditPlus and hit one key. It tells me right away where the problems are. I also use it as I'm writing my own code. I've gotten into the habit of saving the file every few minutes and then compiling it quickly to make sure I don't have any errors.

If you want more info about how to set up EditPlus, I'll be glad to help.

As for your page formatting, what version of the html.pl file are you using? The one that came with the DBMan distribution or the "user-friendly" one? It makes a difference in the process. Smile

No, I don't need the password any longer.

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





Quote Reply
Re: For JPdeni from other forum In reply to
hi JPD,

Im using the user friendly version

Regards

MDJ
Quote Reply
Re: For JPdeni from other forum In reply to
The thing to do is to take one of your .html files and, in the middle where you want your stuff to print out, make another table. Just include

Code:
<table>
<tr>
<td>
</td>
</tr>
</table>

Expand all of your URLs on the page to the full URL, not relative ones, including your graphics.

Then copy the top part of the file, starting at <html> and ending with the <td> tag you added. Paste that into sub html_page_top, between print qq| and |;.

Go back to your .html page. Copy from the </td> tag you added through to the end of the file -- </html>. Paste that into sub html_page_bottom, again between print qq| and |;.

That's what I do.


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