43 users online (0 members and 43 guests)  


  Results 1 to 2 of 2

Related

  1. adsense javascript in php "print"    Forum: Google Adsense
    Replies: 4
  2. Replies: 1
  3. background-image "url" not working    Forum: CSS Forum
    Replies: 1
  4. MSIE/Firefox white space "gap"    Forum: CSS Forum
    Replies: 1
  5. MSIE/Firefox white space "gap"    Forum: HTML Forum
    Replies: 1
  1. #1
    CGI_Newbie's Avatar
    New User

    Status
    Offline
    Join Date
    Oct 2007
    Posts
    4

    print "Location... in firefox not working

    With the newest updata to firefox, some of my CGI scripts to redirect users to another html page is no longer working. At the end of the script, i have the following:

    print "Location: http://myURL\n\n";

    It worked in firefox until recently, and it still works in IE.

    any suggestions?

  2. #2
    xmassey's Avatar
    Senior Member

    Status
    Offline
    Join Date
    Apr 2007
    Posts
    100

    Re: print "Location... in firefox not working

    Hey,
    I have never used that method of page re-directing, so not sure why it doesn't work in Firefox...
    Here are a couple of alternative methods...
    1) Use HTML::Template module
    Code:
    use HTML::Template;
    my ($template);
    $template = HTML::Template->new(filename => "myURL.htm");
    print "Content-Type: text/html\n\n", $template->output;
    2) Print HTML, and use standard HTML or javascript re-direct methods.
    i.e. using html meta refresh
    Code:
     
    print "Content-type: text/html\n\n";
    print <<"HTML code";
    <HTML><HEAD>
    <TITLE>Page Re-Direct</TITLE>
    <meta http-equiv="Refresh" content="1; url=myURL.htm">
    </HEAD><BODY>
    <p>Text here etc.
    </BODY></HTML>
    HTML code
    Chris
    Last edited by xmassey; 11-03-2007 at 11:11 AM.



Tags for this Thread