|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Hi, i am doing a page which will check the user's cookies and then make a html page depends on their selected option.
As i know, perl code will run when a button or a user click on the page. But now, i am trying the run perl file when user go to my main page withou any clicking. Can any one help me .....thankss |
|
#2
|
|||
|
|||
|
You have any problems with index.pl?
|
|
#3
|
||||
|
||||
|
Or
you can just redirect the user to the .pl page from homepage. ------------------ SR - shiju.dreamcenter.net "The fear of the LORD is the beginning of knowledge..." |
|
#4
|
|||
|
|||
|
Thanks for reply, I am sorry that i am new with perl and xml also.So, the index.pl file is something like index.html which will load automatic right?
Or, redirect mean link to other page, it the html code or perl.I know html can do it.... |
|
#5
|
|||
|
|||
|
You can also use SSI, check with your host to see if it is available. If so, then most likely you will need to rename your index page to index.shtml or home.shtml or whatever the default document is.
Where you want the Perl program to display in your page, insert the following: <BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">code:</font><HR><pre><!--#include virtual="/cgi-bin/script.pl"-->[/code] Where /cgi-bin/script.pl is the virtual path to your perl program. Virtual paths are relative to the base url, so if your program is located at http://mydomain.com/cgi-bin/myscripts/script.pl, then the virtual path will be /cgi-bin/myscripts/script.pl Hope this is of some use to you. Best of luck. ------------------ It was Aristotle who concluded that those who admit their stupidity are truly wise. - Gil Hildebrand Jr 4atcost.com Senior Web Developer |
|
#6
|
|||
|
|||
|
>>the index.pl file is something like index.html which will load automatic right?
Yes only if index.pl is included in your httpd.conf as: DirectoryIndex index.html index.htm index.pl Or If you are allowed to use .htaccess, you can simply upload an .htaccess to that directory with the following one line: DirectoryIndex index.pl In fact, it doesn't has to be named 'index.pl', it could even be anything.pl as long as you specify anything.pl in your .htaccess like above. |
|
#7
|
||||
|
||||
|
<< the index.pl file is something like index.html which will load automatic right? Or, redirect mean link to other page, it the html code or perl.I know html can do it.... >>> you can simple write a java script .it will redirect your users to .pl file.probably it may not work in some old browsers.so better you should set your index.pl as your default page. #####--- jave script eg: <html> <head> <SCRIPT LANGUAGE="JavaScript"> function redirect(){ window.location="index.pl"; } </SCRIPT> </head> <body onLoad="redirect();"> <a href="index.pl">Your browser is not supporting redirect.click here to go to home</a> </body> </html> ------------------ SR - shiju.dreamcenter.net "The fear of the LORD is the beginning of knowledge..." |
![]() |
| Viewing: Dev Shed Forums > Programming Languages > Perl Programming > Can perl run without user interact? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|