#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2000
    Posts
    65
    Rep Power
    15
    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. #2
  3. No Profile Picture
    freebsd
    Guest
    Devshed Newbie (0 - 499 posts)
    You have any problems with index.pl?
  4. #3
  5. .Net Developer
    Devshed Novice (500 - 999 posts)

    Join Date
    Feb 2000
    Location
    London
    Posts
    987
    Rep Power
    15
    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..."
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2000
    Posts
    65
    Rep Power
    15
    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....
  8. #5
  9. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2000
    Posts
    23
    Rep Power
    0
    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
  10. #6
  11. No Profile Picture
    freebsd
    Guest
    Devshed Newbie (0 - 499 posts)
    >>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.
  12. #7
  13. .Net Developer
    Devshed Novice (500 - 999 posts)

    Join Date
    Feb 2000
    Location
    London
    Posts
    987
    Rep Power
    15

    <<
    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..."

IMN logo majestic logo threadwatch logo seochat tools logo