34 users online (1 members and 33 guests)  


  Results 1 to 8 of 8
  1. #1
    vizskywalker's Avatar
    New User

    Status
    Offline
    Join Date
    Feb 2004
    Posts
    5

    Question reloading a cgi script

    how can i reload a cgi script or jump to another page after printing a "Content-type: text/html" header? thx

  2. #2
    QuietDean's Avatar
    Administrator

    Status
    Offline
    Join Date
    Oct 2000
    Location
    Bournemouth, UK
    Posts
    2,662
    Hi,

    I am no Perl expert, but have used headers a lot.

    have you tried writing a header of "Location: http://www.wherever.com" ?
    If one of our members helps you, please click the icon to add to their reputation!
    No support via email or private message - use the forums!
    Before you ask, have you Searched?

  3. #3
    vizskywalker's Avatar
    New User

    Status
    Offline
    Join Date
    Feb 2004
    Posts
    5
    supposedly there is a rule that that only works if it is before eh Content-type header. But I can try it and see. Nope, it doesn't work, but thx.
    Last edited by vizskywalker; 02-13-2004 at 03:47 PM.

  4. #4
    QuietDean's Avatar
    Administrator

    Status
    Offline
    Join Date
    Oct 2000
    Location
    Bournemouth, UK
    Posts
    2,662
    In that case, output some javascript to reload the page
    If one of our members helps you, please click the icon to add to their reputation!
    No support via email or private message - use the forums!
    Before you ask, have you Searched?

  5. #5
    vizskywalker's Avatar
    New User

    Status
    Offline
    Join Date
    Feb 2004
    Posts
    5
    that would be something like "document.reload" right?

  6. #6
    QuietDean's Avatar
    Administrator

    Status
    Offline
    Join Date
    Oct 2000
    Location
    Bournemouth, UK
    Posts
    2,662
    location.href='whatever.html' would probably be better. If you use a JS refresh it will resubmit any form data and possibly create an infinite loop.
    If one of our members helps you, please click the icon to add to their reputation!
    No support via email or private message - use the forums!
    Before you ask, have you Searched?

  7. #7
    vizskywalker's Avatar
    New User

    Status
    Offline
    Join Date
    Feb 2004
    Posts
    5
    is that an html tag?

  8. #8
    QuietDean's Avatar
    Administrator

    Status
    Offline
    Join Date
    Oct 2000
    Location
    Bournemouth, UK
    Posts
    2,662
    Its javascript

    Code:
    <script language="JavaScript">
    location.href='whatever.html';
    </script>
    If one of our members helps you, please click the icon to add to their reputation!
    No support via email or private message - use the forums!
    Before you ask, have you Searched?



Tags for this Thread