Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Inserting ASP into HTML pages

Status
Not open for further replies.

lahddah

Programmer
Jan 2, 2003
109
US
Hi. I have an existing HTML page that I would like to keep as HTML. However, I would like to add asp code to a portion of it. This is regarding a reservation process. The reservation portion is in ASP, but I want to be able to link to the HTML page and have an image show only if any reservation info was entered(like, if they have entered their address, etc.). So, I would like some sort of coding in the html page that says 'if * is blank then show this image'

But I need it to remain HTML for search engine purposes.

Make sense? Is it possible?

Thank you in advance!


~ lahddah
 
Not sure...but it probably has to be an ASP file....

ComputerCop911
ASP/HTML Programmer, Knowledgeable Computer Network/Hardware/Software Geek ;-)
 
try something like


Code:
<script type="text/javascript">
if (whatever == 'blank'){
document.write("<!-- #INCLUDE file="/details.asp" -->")
}
</script>
 
Thanks for the responses. Regarding the possible javascript solution...won't I need to pass some sort of value from the page that is coming to the html page that contains this javascript? I'm not sure what the 'whatever' would be.

Thanks, again.


~ lahddah
 
.asp .php .cfm .htm etc makes no difference to Search engines. The server outputs html to the browser/crawler.
A javascript solution is worse, SE crawlers don't "do" javascript, so the include would not occur for spiders and the code would not execute for browsers, as javascript is client-side and asp is processed server-side.

The page will have to have an .asp extension to run ASP code unless you have enough access over the server to allow it to parse .htm files as asp and this adds a processing overhead to the server.



Chris.

Indifference will be the downfall of mankind, but who cares?
 
In this case I want a link from the html page back to the asp portion only when there are active (populated) session variables. Meaning, the user has begun the reservation process and added address info to the asp reservation portion of the site, but then wants to go back through the site and maybe add some more trips. While they're back in the site (HTML) I would like something that says 'click here to complete the reservation process' or something along those lines.





~ lahddah
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top