View Full Version : Create DHTML

07-18-2002, 03:42 AM
I want to create a DHTML that states "welcome (USERNAME)" everytime the user logs in (I know this is done by cookies). And to set the select date fields to today's date. I tried using javascript for the dates and it locked up my machine. So I'm wondering can this be done in perl (CGI) and how??


07-18-2002, 07:58 AM
I'm not exactly sure what you mean by "select date fields" but all of it can be done. By DHTML, do you mean that you have an HTML file and you want snippets of Perl/CGI in it or are you going with a fully out Perl script. If it's a full Perl script, it'll be simple. But if it's a snipet in an HTML file, it'll be a little bit trickier just because you'll be using SSI (Server Side Includes) and unless you have your own server where you can activate them, you probably won't be able to use them.

07-22-2002, 04:45 AM
The select date field will be a form select field box. I don't understand how you can have Perl snippets withing HTML. What I was planning on doing was a HTML templete and use a CGI script to plug in the values needed for the user. For instance "welcome (Username)!". As for the date, I want it to be preselected to todays date. As I mentioned before I used javascript to do that and my computer froze.


07-23-2002, 02:19 AM
Well if those two things are all that you want to do, then you could use a Perl snippet for each. First off all, if your comptuer is freezing due to your JavaScript, then it means that your JavaScript is probably bad. Post it and i'll check it out. Secondly, you can do the Perl snippet one of two ways. If you have access to edit your server configuration, then you can use SSI (or if your service provider allows it). If you can't do that, then you can use Perl to display JavaScript.

I can show you how to do both, just tell me what you need.

07-23-2002, 02:05 PM
ActiveState has released PerlScript which works like a real time javascript interface (so to speak) so you CAN do the stuff you wanted to.