Forum Moderators: coopster & phranque

Message Too Old, No Replies

echo PERL results into dreamweaver page

how to exchange data

         

krypt

11:14 pm on Jun 13, 2003 (gmt 0)



hello,
i just started builidng small webpages but i'm used to work with perl for years under linux...
i want to develop a small e-shop with /fireworks/dreamweaver/perl-cgi/java-script.
my question is:

if i have builded my page with fireworks/dreamweaver, how can i drop the data i gain from a cgi-mysql script on the frame or layer i want it to apear in.

i only know how to build the pages from cgi itself (with echo) but not how to handle the data to apear within a existing webpage in the object i want it to or to prozess it with a java-script or so.

hope you can understand my question as my english isnt the best.

jatar_k

5:42 pm on Jun 14, 2003 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Welcome to WebmasterWorld krypt,

I changed the title to show you are lookin for perl help, some folk should be along soon. ;)

amoore

7:14 pm on Jun 14, 2003 (gmt 0)

10+ Year Member



You can do this in any of a large number of ways. Some people make a template in dreamweaver or something like that, split it into a "header" and "footer", and then make their CGI scripts print them before and after doing the "real work". For instance, a sub to print out the header may look something like:

sub header {
open HEAD, "header.html";
while (<HEAD>) {
print;
}
close HEAD;
}

a similar one can be made for the "footer" and then call one at the beginning and one at the end of each script.

There are also frameworks that help you with this kind of stuff. For instance, there is template toolkit (http://template-toolkit.org/) which is a CGI (or mod_perl module) that you can use to make your pages into templates with perl stuff in the middle. It's a pretty good way to build a bunch of dynamic pages.

There are tons of methods for this problem, and everyone seems to have their favorite. I hope this points you into a good direction.

krypt

11:23 am on Jun 15, 2003 (gmt 0)



yep thank u very much the fact that it is possible to solve this problem is a good point to start searching for some good tutorials :) ...but im not longer sure if i realy want to use cgi anymore, as it is much more easier coding with php using the dreamweaver ...hmm but ill take this nice sunday to try using perl_ lets see how to use those templates :)
thanks again and wish u all a nice sunday!
gerrit

krypt

12:08 pm on Jun 15, 2003 (gmt 0)



hm i cant find any tutorial covering the use of templates and perl-cgi in dreamweaver ..only for php _ anyone knows a sample page or a good tutorial?

TheWhippinpost

2:14 pm on Jun 15, 2003 (gmt 0)

10+ Year Member



As far as I know DW doesn't support Perl, you're best bet, IMO, is to do as amoore suggested. You could build your header/footer etc... in DW and then have them as subs in your perl app.

Not what you're looking for but it's a quicker way to build the frontend, leaving more time for coding perl.

...or, use PHP as you suggested. There is support for that within DW, see the macromedia site for information.