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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Auto Fill Info on HTML TEMPLATE

Status
Not open for further replies.

panamajack

Technical User
Dec 8, 2000
5
US
Hello to all. I need the HTML CODE below filled in certain places with this info.

I want to add the info on one place and show up on many places in the html code. Can anyone please help me on this one. Thanks.

Here are the sample variables
<$name=&quot;Got More Beer&quot;>
<$graph=gotmorebeer>


Here Is The Code
<html><head>
<title>&quot;$name&quot;</title>
<meta name=&quot;description&quot; content=&quot;$name&quot;>
<meta name=&quot;keywords&quot; content=&quot;$name&quot;>
</head><body bgcolor=White text=Black>
<!--#exec cgi=&quot;/cgi-script/stats/ax.cgi&quot; -->
<table width=&quot;100%&quot; border=0 cellspacing=0 cellpadding=0><tr><td width=&quot;100%&quot; height=15 align=left class=nav nowrap bgcolor=&quot;#003468&quot;><FONT FACE=&quot;Verdana,Geneva,Arial,Helvetica,sans-serif&quot; SIZE=2 color=white size=1><B>$name</b></font></td></tr></table>

<table width=&quot;100%&quot; border=0 cellspacing=0 cellpadding=0><tr><td width=&quot;100%&quot; height=15 align=left class=nav nowrap bgcolor=&quot;white&quot;><FONT FACE=&quot;Verdana,Geneva,Arial,Helvetica,sans-serif&quot; SIZE=2 color=white size=1><B>$name</b></font></td></tr></table>
<!--#include virtual=&quot;/cgi-script/random/top.cgi&quot; -->
<!--#include virtual=&quot;/cgi-script/random/bigad.cgi&quot; -->
<!--#include virtual=&quot;/cgi-script/random/top2.cgi&quot; -->
<center><table BGCOLOR=red BORDER=2 WIDTH=&quot;100%&quot; HEIGHT=&quot;100%&quot; >
<tr>
<td align=center valign=middle width=&quot;100% height=500&quot; bgcolor=white><center> <p>
<img width=400 height=400 src=&quot;/cgi-script/cardnew/images/$graph.jpg&quot; alt=&quot;Good Night And Sweet Dreams&quot;><p></center>
<form name=&quot;myform&quot; ACTION=&quot;/cgi-script/cardnew/card.cgi&quot; METHOD=&quot;POST&quot;>
<input type=&quot;hidden&quot; name=&quot;action_code&quot; value=&quot;NEW&quot;>
<input type=&quot;hidden&quot; name=&quot;recip_name&quot; value=&quot;Webmaster at Panamas.net&quot;>
<input type=&quot;hidden&quot; name=&quot;recip_email&quot; value=&quot;netmaster@panamas.net&quot;>
<input type=&quot;hidden&quot; name=&quot;recip_multi&quot; value=&quot;ON&quot;>
<input type=&quot;hidden&quot; name=&quot;template&quot; value=&quot;template.html&quot;>
<input type=&quot;hidden&quot; name=&quot;pic_select&quot; value=&quot;images/$graph.jpg&quot;><p>
 
var name=&quot;Got More Beer&quot;;

document.write('<meta name=&quot;description&quot; content=&quot;'+name+'&quot;>');

Sincerely,

Tom Anderson
CEO, Order amid Chaos, Inc.
 
Thanks. I haave no knowledge of Java. So could you please provide more info. Thanks.
 
This is not Java, it is JavaScript. Completely different except for the ridiculous similarity in their names.

Simply stated, I declared a variable, then I wrote a string to the HTML document which included the variable in it.

If you want to be able to apply external sources of HTML or variable content, then you'll have to use CGI. Try the CGI-bin or Perl forums.
Sincerely,

Tom Anderson
CEO, Order amid Chaos, Inc.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top