Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

-Web site designers FAQ

HTML: How To...

How to create an HTML banner with a form with a dropdown menu by tekagami
Posted: 16 Feb 03

If you want to create an HTML banner with a form with a dropdown menu just do the following:

1- Using your html editor create a a table with its graphics (absolute urls) and the form with the dropdown.  Make the table with the dimensions of the the banner you want.

2- the html code for the table with the form must be all in one line and there must be NO "quotation" marks.  The reason is the you are going to parse the banner as a Javascript.

3- Then create a text file and add your line of code to it.  However oyu must add at the beggining of the line the following code:  document.write("

and at the end: ")

It will look like this:  

document.write("<table width=465 border=4 cellspacing=0 cellpadding=0 height=60 bordercolor=#FF0000 bgcolor=#0000FF><tr><td><table width=465 border=0 cellspacing=0 cellpadding=0><tr> <td><font color=#FFFFFF><b><font face=Arial, Helvetica, sans-serif>buy my products</font></b></font></td></tr><tr><td><form name=form1 method=post action=http://www.your-url.com/cgi-bin/whatever.cgi><select name=select><option value=option1 selected>option1</option><option value=option2>option2</option><option value=option3>option3</option></select><input type=submit name=Submit value=Submit></form></td></tr></table></td></tr></table> ")

4-  save the file as banner.js  (the important part is the .js extension)

5-  Then wherever you want to to add the banner in the page just add:

<script    src="http://url.of.your.com/ad.js" type="text/javascript" language="Javascript">

NOTE- This technique is also very useful when you want to add HTML code to a page, like using SSI but instead of the server parsing the code you have the client parsing it and downloading it to the cache so it only is served once by the server

Back to -Web site designers FAQ Index
Back to -Web site designers Forum

My Archive

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close