is there any reason i shouldn't have a site en

Results 1 to 8 of 8

Thread: is there any reason i shouldn't have a site en

  1. #1
    Join Date
    Dec 1969
    Posts
    760

    Default is there any reason i shouldn't have a site en

    i want to use a site-wide banner rotation script. i&#039d like to use some of the ideas offered by some of the great tutorials on this site. since i want to use an asp-rotator, i&#039m under the impression that every page on my site will have to be an asp page. but, i&#039ve never seen an all-asp site. is there a good reason for this?<BR><BR>is there any reason i shouldn&#039t have a site entirely made up of asp pages?<BR><BR>thanks in advance,<BR><BR>andrew

  2. #2
    Join Date
    Dec 1969
    Posts
    2,849

    Default RE: is there any reason i shouldn't have a sit

    Hello Andrew! You can indeed serve dynamic images from a static Web page. In fact, after reading your question I took the time to writing an entire article dedicated to the subject! :-)<BR><BR>Check out:<BR><BR>Serving Dynamic Images from Static Web Pages<BR>http://www.4guysfromrolla.com/webtech/052400-1.shtml<BR><BR>Happy Programming!

  3. #3
    Join Date
    Dec 1969
    Posts
    760

    Default RE: is there any reason i shouldn't have a sit

    Scott is god.<BR><BR>i really appreciate your help. however (isn&#039t there always a however?), i&#039m having a bit of trouble. i read your article, and instituted your suggestions, but for some reason, the string is not being redirected to the html page. the &#060;img src&#062; tag remains with the original format when i view the source of the page (ie. &#060;IMG SRC="/scripts/ShowPictureOfTheDay.asp"&#062; ), and the image is not loading. any ideas?<BR><BR>also, as if i&#039m not demanding enough, could you tell me if there&#039s a way to return a different kind of string. for example if i wanted to pull up a URL could i specify &#060;a href="/scripts/ShowPictureOfTheDay.asp"&#062;, or would that just end up as a link to that page?<BR><BR>again, i appreciate your help.<BR><BR>andrew

  4. #4
    Join Date
    Dec 1969
    Posts
    2,849

    Default RE: is there any reason i shouldn't have a sit

    What is displaying in the HTML page where the IMG tag is? A broken image icon? What browser are you using?<BR><BR>What type of image are you trying to show? (gif or jpg?) Try adding this line at the top of /scripts/ShowPictureOfTheDay.asp:&#039<BR><BR>Response.Cont entType = "image/gif" (or image/jpg if it is a jpg you are trying to display...)<BR><BR>Let me know the answers to these questions and if the above suggestions works... thanks!


  5. #5
    Join Date
    Dec 1969
    Posts
    760

    Default RE: is there any reason i shouldn't have a sit

    hi Scott,<BR><BR>a broken image tag was displaying on the html page. i inserted the response.contact tag as you suggested, and it didn&#039t seem to make a difference. i&#039m using internet explorer.<BR><BR>on a whim, i moved the asp page into the same directory as the html page(it was previously in a "script" subdirectory), and now it works. strange.... any ideas?<BR><BR>i really want to use this to help me rotate banners. i&#039ve written a little asp page that does what i want. is there any way i can call that asp page from a static page and have the asp page redirect a string containing a link, banner, and alt tag? or do i have to convert the static page to an asp page, and call a sub?<BR><BR>the image caller is very cool, but i need more than just image info to be redirected. i was thinking about it last night though, and i couldn&#039t think of how to do it.<BR><BR>thanks again,<BR><BR>andrew<BR><BR><BR><BR>

  6. #6
    Join Date
    Dec 1969
    Posts
    2,849

    Default RE: is there any reason i shouldn't have a sit

    Was the /script directory a virtual directory, or did it have different permission settings than the directory that ended up working?<BR><BR>Calling an ASP page from a static page is not possible, at least I am not aware of how to do it... one might look into the #exec command (a server-side directive) to see if an ASP page can be called that way, but I doubt it.<BR><BR>The reason the way I showed worked is because the browser, when it sees an SRC in an IMG tag, fetches that document. The ASP page then does its processing, returning an image to the client. As far as the client&#039s concerned, it was a standard image, not an ASP page, in the SRC parameter.

  7. #7
    Join Date
    Dec 1969
    Posts
    760

    Default RE: is there any reason i shouldn't have a sit

    as far as i can tell, the permissions were set the same as the root directory (where it eventually worked).<BR><BR>as you suggested, i&#039m going to check into the #exec command, but have pretty much resigned myself to converting over the remaining static pages to asp to run the function i&#039ve built.<BR><BR>it&#039s a pity there&#039s no similar src-type tag that could be used to pull in non-image info. oh well.<BR><BR>i appreciate your help.<BR><BR>andrew

  8. #8
    Join Date
    Dec 1969
    Posts
    760

    Default src="?"

    Interesting stuff,<BR><BR>There are a couple of tags that support the src attribute, notably script, which would allow you to use the same method to generate js on the fly, iframe and layer.<BR><BR>-Andrew

Posting Permissions

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