Asp

Discussion in 'Software' started by mr_flea, Dec 11, 2003.

  1. mr_flea

    mr_flea First Sergeant

    Does asp get interpreted on the server? (i'm pretty sure it does, but just to make sure) If it does, which gets processed first, SSI, or ASP?

    I'm asking this because I have a website with 4-5 identical pages, with the difference between each page being about 3 variables. So, I made pretty much a template of the pages, made the actual pages something like

    <%filename="canyon_glider.swf" width="550" height="400"%>
    <!-- #include virtual="/gametemplate.txt" -->

    that. The included file has asp tags that set the variable to be where it needs to be.
     
  2. Kodo

    Kodo SNATCHSQUATCH

    ASP is interpreted at runtime.. SSI gets interpreted first so you can't do dynamic includes.
     
  3. mr_flea

    mr_flea First Sergeant

    what are dynamic includes? are they pretty much frames, but in tables?
     
  4. Kodo

    Kodo SNATCHSQUATCH

    lot of people to do something like

    if blah=blah then
    'include this file
    else
    include this file
    end if

    that CAN'T work becaue SSI will execute the includes BEFORE the ASP does and hence both includes will show up regardless of the "if then else" statement.


    so if you have variables that you need carried down to the next page from the include file, you should be ok. but remember it goes in order of position of include. The include will execute at the location it resides in the script.
     
  5. mr_flea

    mr_flea First Sergeant

    wait, so I can carry down variables from another page?

    see, right now my page system looks like this

    games page (links to the indented pages)
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;canyonglider.htm
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;etc, etc, etc

    the pages linked to by the games page, the code looks like the code I posted above. It is designed to add the variables in when included and the asp is interpreted by the server.

    So, how could I get the variables to the gametemplate page and skip the indented pages?
     
  6. Kodo

    Kodo SNATCHSQUATCH

    got something I can look at? site and code cuz you lost me..
     
  7. mr_flea

    mr_flea First Sergeant

    current games index page (still under construction)

    <!--Insert Page Start Include Here-->
    <!--#include virtual="/page_start.txt"-->
    <body bgcolor="#212140" link="silver" vlink="silver">
    <table width="100%" border="2" cellspacing="3" align="center" bgcolor="#000000" bordercolor="#800000">
    <tr>
    <!--Insert Navigation Include Here-->
    <!--#include virtual="/Navigation.txt" -->
    <td>
    <center>
    <font size="+2" face="arial" color="silver">Games!!!</font><br><br><br>
    </center>
    <table width="100%" bgcolor="#000000">
    <tr>
    <td width="25%">
    <center>
    <img src="paintsmallicon.gif" border="0" alt="">
    </center>
    </td>
    <td width="25%">
    <center>
    <img src="paintsmallicon.gif" border="0" alt="">
    </center>
    </td>
    <td width="25%">
    <center>
    <img src="paintsmallicon.gif" border="0" alt="">
    </center>
    </td>
    <td width="25%">
    <center>
    <img src="paintsmallicon.gif" border="0" alt="">
    </center>
    </td>
    </table>
    </table>
    </body>
    </html>


    When that page is done, it will link to pages containing something like this (this page is fully finished):

    <%filename="canyonglider.swf" width="550" height="400"%>
    <!-- #include virtual="/gametemplate.txt" -->


    That page will include this page (still unfinished, but all you need to see is there):

    <html>
    <head>
    <title>Games</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <meta name="description" content="Site featuring a message board, fireworks, and links to other sites. Suggestions welcome.">
    <meta name="keywords" content="Message Board, Elite, IllusionFXnet, Alex, fireworks">
    <meta name="author" content="alexinia@iowatelecom.net">
    <meta name="generator" content="AceHTML 5 Freeware">
    <script language="JavaScript1.2">
    <!-- begin
    function disableselect(e){
    return false;
    }
    function reEnable(){
    return true;
    }
    document.onselectstart=new Function ("return false");
    if (window.sidebar){
    document.onmousedown=disableselect;
    document.onclick=reEnable;
    }
    // end -->
    </script>
    </head>
    <body bgcolor="#000000" link="silver" vlink="silver">
    <table width="100%" align="center" valign="center" bgcolor="#000000">
    <tr><td align="center">

    </td></tr>
    <tr><td align="center">
    <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="<%=width %>" height="<%=height %>">
    <param name="movie" value="<%=filename %>">
    <param name="quality" value="high">
    <embed src="<%=filename %>" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="<%=width %>" height="<%=height %>"></embed>
    </object>
    </td></tr>
    </table>
    </body>
    </html>






    site is currently not up. will probably be up in about 5 days.
     
  8. Kodo

    Kodo SNATCHSQUATCH

    so what vars do you want to carry down?
     
  9. mr_flea

    mr_flea First Sergeant

    filename, width, height. And they need to be selected by 1 type of input, such as clicking a link.

    I'm researching ASP right now to see if I can figure it out.
     
    Last edited: Dec 12, 2003
  10. Kodo

    Kodo SNATCHSQUATCH

    I apologize flea.. you totally lost me on what your intended function is. I need to see something in action..

    yes winXP is NT based.
     
  11. mr_flea

    mr_flea First Sergeant

    this is as best as I can explain it for now.

    btw, the researching on asp I was doing confused me too much. I might try to tackle it some other time.
     
    Last edited: Dec 12, 2003
  12. Kodo

    Kodo SNATCHSQUATCH

    if you're going to pass them to another page like this..
    click linke.. open new page.. then you'll want to pass the size params in a querystring.
     
  13. mr_flea

    mr_flea First Sergeant

    what's a querystring?
     
  14. Kodo

    Kodo SNATCHSQUATCH

  15. mr_flea

    mr_flea First Sergeant

    so, would this work? (url = www.somewhere.com/gametemplate.asp?filename=something.swf&height=something(number value)&width=something(number value)

    and then this code ont eh gametemplate.asp file

    <%@ LANGUAGE="VBSCRIPT" %>
    <%
    Dim SearchText
    SearchText = CStr(Request("search"))
    Response.Write(SearchText)
    %>
    <html>
    <head>
    <title>Games</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <meta name="description" content="Site featuring a message board, fireworks, and links to other sites. Suggestions welcome.">
    <meta name="keywords" content="Message Board, Elite, IllusionFXnet, Alex, fireworks">
    <meta name="author" content="alexinia@iowatelecom.net">
    <meta name="generator" content="AceHTML 5 Freeware">
    <script language="JavaScript1.2">
    <!-- begin
    function disableselect(e){
    return false;
    }
    function reEnable(){
    return true;
    }
    document.onselectstart=new Function ("return false");
    if (window.sidebar){
    document.onmousedown=disableselect;
    document.onclick=reEnable;
    }
    // end -->
    </script>
    </head>
    <body bgcolor="#000000" link="silver" vlink="silver">
    <table width="100%" align="center" valign="center" bgcolor="#000000">
    <tr><td align="center">

    </td></tr>
    <tr><td align="center">
    <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="<%=width %>" height="<%=height %>">
    <param name="movie" value="<%=filename %>">
    <param name="quality" value="high">
    <embed src="<%=filename %>" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="<%=width %>" height="<%=height %>"></embed>
    </object>
    </td></tr>
    </table>
    </body>
    </html>





    would I have to change the current <%=(variable) %> tags to use that, and if I do, is there another way where I wouldn't have to?
     
  16. mr_flea

    mr_flea First Sergeant

    wait, I think I found the answer I was looking for... I'll need you to check it in a minute.
     
  17. mr_flea

    mr_flea First Sergeant

    wait, I misunderstood the page. Back to the question: is there a way I can do the querystrings to work like they had been defined at the top of the page? Hopefully without using VBS?
     
  18. Kodo

    Kodo SNATCHSQUATCH

  19. mr_flea

    mr_flea First Sergeant

    Yes, It was what I was looking for. thanks kodo, and sorry for bothering you with programming so much lately. Normally, I would bother my uncle, who is a programmer, but his idiot ISP put up spam filters that block pretty much everything and he still hasn't whitelisted me on the servers.
     
  20. Kodo

    Kodo SNATCHSQUATCH

    you can bother me anytime, flea.. it's not a problem. If I can help you (and follow you;)) then I will do my best to provide an answer.
     
  21. mr_flea

    mr_flea First Sergeant

    I can't get it to work. it could be the ISS or the programming. I have narrowed the problem down to either the ASP processing or the code. Here's the code.

    <% filename=request.querystring("file") width=request.querystring("w") height=request.querystring("h") %>
    <html>
    <head>
    <title>Games</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <meta name="description" content="Site featuring a message board, fireworks, and links to other sites. Suggestions welcome.">
    <meta name="keywords" content="Message Board, Elite, IllusionFXnet, Alex, fireworks">
    <meta name="author" content="alexinia@iowatelecom.net">
    <meta name="generator" content="AceHTML 5 Freeware">
    <script language="JavaScript1.2">
    <!-- begin
    function disableselect(e){
    return false;
    }
    function reEnable(){
    return true;
    }
    document.onselectstart=new Function ("return false");
    if (window.sidebar){
    document.onmousedown=disableselect;
    document.onclick=reEnable;
    }
    // end -->
    </script>
    </head>
    <body bgcolor="#FFFFFF" link="silver" vlink="silver">
    <table width="100%" align="center" valign="center" bgcolor="#000000">
    <tr><td align="center">
    </td></tr>
    <tr>
    <td align="center">
    <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="<%=width %>" height="<%=height %>">
    <param name="movie" value="<%=filename %>">
    <param name="quality" value="high">
    <embed src="<%=filename %>" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="<%=width %>" height="<%=height %>"></embed>
    </object>
    </td></tr>
    </table>
    </body>
    </html>
     
  22. Kodo

    Kodo SNATCHSQUATCH

    <%
    filename=request.querystring("file")
    width=request.querystring("w")
    height=request.querystring("h")
    %>

    separate lines for each...
    are you getting any errors..

    also, I should have suggested that you NOT use those variable names.. they are reserved words.
    I would use something like

    F_Filename
    F_width
    F_height
     
  23. Ginanatl

    Ginanatl Specialist

    LMAO!!
    Sorry, guys... Don't mean to intrude, just learning from you "programmers." This is one of the most hilarious things, Kodo! (Below:)

    [Edit:] Ok, let's see if this comes out better. It's the install box that came up when I clicked the URL you posted.
     

    Attached Files:

    Last edited: Dec 12, 2003
  24. Kodo

    Kodo SNATCHSQUATCH

    hard to read.. what is it?
     
  25. mr_flea

    mr_flea First Sergeant

    It still doesn't do anything even with those mods.

    I just get a 5 px high table with a white dot in the middle.
     
  26. Kodo

    Kodo SNATCHSQUATCH

    do a response.write varname on the page you're requesting the querystring from.. do it outside of the flash object code and see if the variable is being passed.. check the querystring too, to make sure that the querystring has the values in it..
     
  27. mr_flea

    mr_flea First Sergeant

    The querystring contains all of the values.

    It does absolutely nothing when I do that, like before. Everything should be written properly, so now i'm thinking that it's the IIS
     
  28. mr_flea

    mr_flea First Sergeant

    while i'm waiting, I might as well attempt to bug my uncle again...

    maybe I should try that address I have of his that I thought was dead...
     
  29. mr_flea

    mr_flea First Sergeant

    i'll choose to spam his work address instead of his home address... just because his home one won't work... he he he :D

    :D :D :D
     
  30. Kodo

    Kodo SNATCHSQUATCH

    querystring is case sensitive too. so make sure if your querystring is "H" that you request.querystring("H") and not ("h")
     
  31. mr_flea

    mr_flea First Sergeant

    the cases are all correct.
     
  32. mr_flea

    mr_flea First Sergeant

    Ok, I found the problem. I did a simple line of ASP and it didn't even show up. The line was <%="hello world" %> It should have printed hello world on the screen, but did nothing. Now we know it is a problem with in the ASP processing of my machine. I don't know why it won't work. I installed IIS. I have no clue why it won't work. Any ideas?
     
  33. Kodo

    Kodo SNATCHSQUATCH

    is the extension of that file .asp?
     
  34. mr_flea

    mr_flea First Sergeant

    no, it's .htm, but i'll try .asp.
     
  35. mr_flea

    mr_flea First Sergeant

    it still fails when saved as .asp.
     
  36. Kodo

    Kodo SNATCHSQUATCH

    uninstall and reinstall IIS
     
  37. mr_flea

    mr_flea First Sergeant

    Roger that, sir!
     
  38. mr_flea

    mr_flea First Sergeant

    had no effect.
     
  39. Kodo

    Kodo SNATCHSQUATCH

    even doing a simple hello world has no effect?
     
  40. mr_flea

    mr_flea First Sergeant

    nope, nothin.
     
  41. mr_flea

    mr_flea First Sergeant

    man, what I need is a server with working asp... hey kodo, where'd you host that poll again?... :D
     
  42. Kodo

    Kodo SNATCHSQUATCH

    the poll was on my own rig..
     
  43. mr_flea

    mr_flea First Sergeant

    And you got the asp to work... now i'm jealous...
     
  44. mr_flea

    mr_flea First Sergeant

    stupid me... I forgot that I needed to change the folder for the ASP processing. It works now. Thanks kodo!
     
  45. Kodo

    Kodo SNATCHSQUATCH

    glad you figured it out. had me stumpified..
     
  46. spaz

    spaz Specialist

    querystring is what vbscript calls the variables that are being passed within the URL (as opposed to form variables).

    You can <%=variable name%> as well as response.write to see if your variables are being passed.

    Check to be sure that you have a site running in IIS and that the folder you're loading in your browser is under the root of a running site...

    Sorry if too obvious.. just remembering back when I had similar problems..

    (Crap too late... doh again.... glad you got it figured out)
     

MajorGeeks.Com Menu

Downloads All In One Tweaks \ Android \ Anti-Malware \ Anti-Virus \ Appearance \ Backup \ Browsers \ CD\DVD\Blu-Ray \ Covert Ops \ Drive Utilities \ Drivers \ Graphics \ Internet Tools \ Multimedia \ Networking \ Office Tools \ PC Games \ System Tools \ Mac/Apple/Ipad Downloads

Other News: Top Downloads \ News (Tech) \ Off Base (Other Websites News) \ Way Off Base (Offbeat Stories and Pics)

Social: Facebook \ YouTube \ Twitter \ Tumblr \ Pintrest \ RSS Feeds