Solved

HTML Header & Footer Tags

Posted on 1998-03-11
9
1,762 Views
Last Modified: 2013-12-25
I'm trying to create a front end to a Currency Converter website.  They suggest I can customer the Front and back end of there Conversion CGI program.  By front end, I mean use my own page colors and design.  The problem is, I'm not very familiar with the Header & Footer tags they sugesstion I use in the Form Post.

<INPUT TYPE="hidden" NAME="Header" VALUE="HTML_Header_string">

<INPUT TYPE="hidden" NAME="Footer" VALUE="HTML_Footer_string">

Is this simliar to the Include tag, where the Footer tag represents an HTML document?  The Currency site's URL is http://www.xe.net/currency/customize.htm.

Thanks.
0
Comment
Question by:d4jaj1
  • 5
  • 4
9 Comments
 
LVL 5

Expert Comment

by:julio011597
ID: 1858006
If i understand it correctly, this has nothing to do with any common protocol.

I mean, i guess "they" are just telling they have a CGI which accepts a couple of hidden fields to specify some HTML code to be put, respectively, as the header and as the footer of their result page.

So, basically, it seems that, while writing your front end form, you should add those hidden fields putting some personal HTML as the VALUE of them.

You could contact "them" and ask confirmation about this, and, also important, ask what you are allowed to put inside those VALUE attributes.
0
 
LVL 5

Accepted Solution

by:
julio011597 earned 50 total points
ID: 1858007
Sorry, i must be spleeping... i've just seen i've given a url to look at.

Yes, it's how i guessed: just put need HTML into the VALUE attributes, being carefull to respect a few syntax requirements:

1. use square brackets instead of angle brackets, i.e. "[" and "]" instead of "<" and ">";
2. for double quotes, use the sequence \DQ and use \SQ for the single quote character.

So, say you want to show a banner on top of your customized page; the usual HTML code could be something like:

<IMG SRC="http://my.site/images/banner.jpg">

to put it into the VALUE attribute you should write:

<INPUT TYPE="hidden" NAME="Header"
  VALUE="[IMG SRC=\DQhttp://my.site/images/banner.jpg\DQ]">

I guess you now have it!
0
 
LVL 3

Author Comment

by:d4jaj1
ID: 1858008
Thanks for the update, but now I'm kinda confused.  I have a website, complete with common backgrounds, button colors, etc. to give my users a familiar look throught the site.  Idealy I would like to display the results of their script "within" my existing site layout.  You answer is certainly correct, in that it answers my question, but I'll lose teh feel of my site if I can only link to graphics.  Can I show my page background behind the results and/or several pictures?
0
Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

 
LVL 5

Expert Comment

by:julio011597
ID: 1858009
Lets try to think of it this way (dispite of my English :)

the resulting web page is made up of three parts:

1. the header stuff you provide, or, if you dont, a default header provided by xe.net;
2. the actual results (i guess a table or such);
3. the footer stuff you provide, or, if you don't...

So, basically,  you do have great control on the look of the result page.
I.e., in my sample i showed how to put an image as header, but you could put many lines of HTML code there, maybe including a BODY tag with your own background, and so on.

I suggest you go with some tries to know what you are really allowed to do.
0
 
LVL 3

Author Comment

by:d4jaj1
ID: 1858010
I follow what you are saying, but I'm not sure if I'm writing teh tags correctly, thus I'm not sure I'm the feature isn't supported or if I'm just typing it wrong.  I can add

    <INPUT TYPE="hidden" NAME="Footer" VALUE="I'm trying to create a front...">      OR  <INPUT TYPE="hidden" NAME="Header"
  VALUE="[IMG SRC=\DQhttp://my.site/images/banner.jpg\DQ]">

and an Image and Text appear at the top and bottom of the page.

I try;
    <INPUT TYPE="hidden" NAME="Header"
      VALUE="[<body bgcolor=\DQ#FF00FF\DQ> </body>]">
and
    <INPUT TYPE="hidden" NAME="Header"
      VALUE="[<body background=\DQborder.gif\DQ> </body>]">

to set the page color or background.  If I'm typing this correctly, can I assume I can't do it?  If I'm not typing it correctly, what am I missing?

Thanks for all of your help.


0
 
LVL 5

Expert Comment

by:julio011597
ID: 1858011
Hmm... i can see a few problems with it:

1. you have to use "[]" INSTEAD of "<>", i.e. write "[]" where you'd usually write "<>";

2. you would never write a document like this:
--//--
<HTML>
  <BODY bgcolor="#FF00FF">  </BODY>  <-- here is theHeader you are sending!!!
  ... other stuff here ...
  </BODY>
</HTML>
--//--
i.e., don't close the BODY tag: you are specifying a header!

3. you can put any HTML code you like as Header or Footer, except that i don't know if the BODY tag in particular is supported :(
To be sure, try this as Header and tell back what happens (posting the source of the result page would be of great help):

<INPUT TYPE="hidden" NAME="header"
  VALUE="[body bgcolor=\DQ#FF00FF\DQ]">

--

BTW, i'm glad to be of help, but this prolonged "support service" deserves some more points, doesn't it?
0
 
LVL 5

Expert Comment

by:julio011597
ID: 1858012
NAME="header"

should be:

NAME="Header"
0
 
LVL 3

Author Comment

by:d4jaj1
ID: 1858013
Adjusted points to 50
0
 
LVL 3

Author Comment

by:d4jaj1
ID: 1858014
I fianlly figured out the syntax.  I was able to add a page background and additional graphics.  No problem with teh points, either.  Thanks again.
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
Developer portfolios can be a bit of an enigma—how do you present yourself to employers without burying them in lines of code?  A modern portfolio is more than just work samples, it’s also a statement of how you work.
This tutorial walks through the best practices in adding a local business to Google Maps including how to properly search for duplicates, marker placement, and inputing business details. Login to your Google Account, then search for "Google Mapmaker…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

785 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question