Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    Regular Coder
    Join Date
    Aug 2002
    Posts
    247
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Exclamation cgi scripts not working right with asp pages

    I don't know if this is the right forum for this but does anyone know if cgi scripts will work in asp pages?? I have been using cgi scripts for some time now and I am trying to use them in asp pages that I am creating and the results of the scripts will not show in the pages I want. Instead the results show on a blank page (which is the default if the script can't find the correct page to display the information). With these cgi scripts you must place 3 "+++" on the page where you want the results to display. But for some reason the results can't find the "+++".

    Here is an example.

    If you go to this link:
    www.enchantedmountains.info/asp/restaurant.asp

    and select a city from the drop-down list you will see the results appear in a separate blank page instead of below the search box, where I have the 3 "+++" (you can't see them - they are in a white font)

    If anyone has any answers for me, I would appreciate it.

    Gary
    Last edited by gcapp; 08-30-2002 at 04:24 PM.

  • #2
    New Coder
    Join Date
    Aug 2002
    Location
    Moscow, RU
    Posts
    23
    Thanks
    0
    Thanked 1 Time in 1 Post
    Well.. on how i see youre trying to show asp templates in cgi script - this is completely wrong - your cgi script compiling under perl and going to server socket to client and it's never will be processed by active server pages. You have to define your page template in your cgi script to make it visible.

  • #3
    Regular Coder
    Join Date
    Aug 2002
    Posts
    247
    Thanks
    0
    Thanked 0 Times in 0 Posts

    cgi script in asp

    Inci,
    I guess I'm not sure exactly what you mean.
    Attached is the cgi script I am trying to use. You will see in section B1, B2, B3 is where I have to set the path for the data, where the script resides, the page in which I want the data displayed. Now the path to the page in which I want the data displayed is correct (section B3), at least that is where the page sits on my server. If there is something that should be in any of these three sections differently please explain.
    In the script, the script is named restaurant2.cgi - I had to rename it here to restaurant2.txt for uploading purposes.
    Or if there is something else I should do - I would appreciate it if you could explain it to me.
    Any help you can give would be appreciated.

    Thank you.
    Gary
    Attached Files Attached Files

  • #4
    New Coder
    Join Date
    Aug 2002
    Location
    Moscow, RU
    Posts
    23
    Thanks
    0
    Thanked 1 Time in 1 Post
    Hello,

    As i see you want to be searched stuff to be displayed in your site template? But the damned thing won't work.. I have watched your attached file - but actually this wont solve the thing - you have to atach other file:

    /websites/www.enchantedmountains.org/asp/restaurant.asp

    I need to watch it., hopefully will help you then,

    bye bye

  • #5
    Regular Coder
    Join Date
    Aug 2002
    Posts
    247
    Thanks
    0
    Thanked 0 Times in 0 Posts

    cgi scripys and asp

    Inci,
    I have the correct file associated with the script. This file that is attached has a .txt extension because you can't attach a file with a .cgi extension in this forum. The file I have associated with the script is the restaurant.cgi script. Like I said, the problem is not with the script working (it does) it's with the display. It won;t display on the page I want. If you have an answer for that I would appreciate it.

    Gary

  • #6
    New Coder
    Join Date
    Aug 2002
    Location
    Moscow, RU
    Posts
    23
    Thanks
    0
    Thanked 1 Time in 1 Post
    Hello again..

    yup i suppose the whole problem is with your template file:
    /websites/www.enchantedmountains.org/asp/restaurant.asp

    perl by itself cannot understand asp embedded stuff - so you must define top and bottom headers (your normal page layout must be splitted in two parts - top and bottom - then you will have to copy these parts in this file (/websites/www.enchantedmountains.org/asp/restaurant.asp
    ) - and you will get what you need (generated results will be put between top and bottom templates) - and this is the only way to do it.

    all your page things like top and bottom HTML must be defined in this file without asp tags inside. perl cannot parse asp syntax by itself and asp parser will not be runed after the page is generated - thats for sure.

    ------------------------------------
    your generated results source - top of the page:
    ---------------------

    <%Session("GotFlash") = true%>

    <!--#include file="global.asp"-->

    <%

    PageHeader = "Enchanted Mountains Region - Restaurants<"

    %>

    <!-- #include file=inc_header.asp -->

    ---------------------------------------------------
    asp tags are NOT will be parsed by perl - so you must define real HTML syntax for TOP and BOTTOM parts
    ---------------------------------------------------

    bottom of the page:

    <!-- Hidden Counter

    added by Gary Cappelletti -->



    <!--#include file="Counter.asp"-->

    <%

    Counter_Increment(Counter_ThisPage)

    %>

    <counter name="Since Jan. 1, 2003" value="<%=Counter_Display(Counter_ThisPage)%>">
    -------------------------------------------------------------------------------
    must be removed too. - will not be parsed.

    hope this will help you. bye bye


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •