Difficulty with the position of the bar code

I have a web page that is designed to display a variable data bar code.  The barcode is created successfully, however, I am unable to get to its correct position (inside a box of coupon) on the page.  The javascript code used to render the barcode image a position axis x and Y, but they do not work.  The URL with query string is http://ereply.us/c39/l.asp?id=mm008.  After hitting the "Submit" button, you can see the output place the bar code.  Here's the code.  Any help would be greatly appreciated.

<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<!-- #include file="database_connection.asp" -->
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="CSS/Level1_Arial.css" rel="stylesheet" type="text/css">
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
//-->
</script>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<style type="text/css">
<!--
body {
font: 100% Verdana, Arial, Helvetica, sans-serif;
background: #666666;
margin: 0; /* it's good practice to zero the margin and padding of the body element to account for differing browser defaults */
padding: 0;
text-align: center; /* this centers the container in IE 5* browsers. The text is then set to the left aligned default in the #container selector */
color: #000000;
background-color: #FFFFFF;
margin-left: 0px;
margin-right: 0px;
margin-top: 0px;
background-image: url(http://ereply.us/c39/bg2.gif);
background-repeat: no-repeat;
}

/* Tips for Elastic layouts
1. Since the elastic layouts overall sizing is based on the user's default fonts size, they are more unpredictable. Used correctly, they are also more accessible for those that need larger fonts size since the line length remains proportionate.
2. Sizing of divs in this layout are based on the 100% font size in the body element. If you decrease the text size overall by using a font-size: 80% on the body element or the #container, remember that the entire layout will downsize proportionately. You may want to increase the widths of the various divs to compensate for this.
3. If font sizing is changed in differing amounts on each div instead of on the overall design (ie: #sidebar1 is given a 70% font size and #mainContent is given an 85% font size), this will proportionately change each of the divs overall size. You may want to adjust based on your final font sizing.
*/
.oneColElsCtrHdr #container {
width: 46em;  /* this width will create a container that will fit in an 800px browser window if text is left at browser default font sizes */
background: #FFFFFF;
margin: 0 auto; /* the auto margins (in conjunction with a width) center the page */
border: 1px solid #000000;
text-align: center; /* this overrides the text-align: center on the body element. */
}
.oneColElsCtrHdr #header {
background: #DDDDDD;
padding: 0 10px 0 20px;  /* this padding matches the left alignment of the elements in the divs that appear beneath it. If an image is used in the #header instead of text, you may want to remove the padding. */
}
.oneColElsCtrHdr #header h1 {
margin: 0; /* zeroing the margin of the last element in the #header div will avoid margin collapse - an unexplainable space between divs. If the div has a border around it, this is not necessary as that also avoids the margin collapse */
padding: 10px 0; /* using padding instead of margin will allow you to keep the element away from the edges of the div */
}
.oneColElsCtrHdr #mainContent {
padding: 0px; /* remember that padding is the space inside the div box and margin is the space outside the div box */
background: #FFFFFF;
}
.oneColElsCtrHdr #footer {
padding: 0 10px; /* this padding matches the left alignment of the elements in the divs that appear above it. */
background:#DDDDDD;
}
.oneColElsCtrHdr #footer p {
margin: 0; /* zeroing the margins of the first element in the footer will avoid the possibility of margin collapse - a space between divs */
padding: 10px 0; /* padding on this element will create space, just as the the margin would have, without the margin collapse issue */
}
.style1 {
font-size: xx-large;
font-weight: bold;
}
body,td,th {
color: #000000;
background-position: top;
text-align: left;
}
.style2 {
font-size: medium;
background-position: center center;
}
a:link {
color: #FFFF00;
}
-->
</style></head>

<body>
<div>
  <form>
  <p>
    <%response.write(session("fname"))%>
  </p>
</form> 
</div>
<form action="aspform.asp" method="post">
  <input name="fname" type="hidden" value='<%=session("fname")%>' />
  <input name="lname" type="hidden" value='<%=session("lname")%>' />
  <input name="address" type="hidden" value='<%=session("email")%>' />
  <input name="id" type="hidden" value='<%=session("id")%>' />
  <input name="barcode" type="hidden" value='<%=session("barcode")%>' />
  <input name="coupon" type="hidden" value='<%=session("coupon")%>' />
  <input name="password" type="hidden" value='<%=session("password")%>' />
  <input name="url" type="hidden" value='<%=session("url")%>' />
</p>

  <p class="style2"> </p>
  <p>   </p>
  <p>   </p>
  <p>
    <input name="Submit" type="submit" class="oneColElsCtrHdr" id="Submit" value="Submit" />
  </p>
</form>

</p>
<div align="center">
  <p class="oneColElsCtrHdr"> </p>
  <p class="oneColElsCtrHdr"> </p>
  <p class="oneColElsCtrHdr"> </p>
  <p class="oneColElsCtrHdr"> </p>
  <p class="oneColElsCtrHdr"> </p>
  <p class="oneColElsCtrHdr"> </p>
  <p class="oneColElsCtrHdr">
    <script language="JavaScript" src="code39.js"></script>
    <script language="JavaScript">
 
      document.open();

document.write
Code39("200","340",80,12,"<% response.write(session("barcode"))%>",2);
document.close();
    </script>
  </p>
</div>
</body>
</html>

 

On line 23 of code39.js (the JavaScript file), change this:

If ((theX!="") &&(theY!="")) pp = "position: absolute;" left: "+ definition x +"; "top:" + they + ";" " ;

To do this:

If ((theX!="") &&(theY!="")) pp = "position: relative;" left: "+ definition x +"; "top:" + they + ";" " ;

In addition, validate your code and fix reported errors:

http://validator.w3.org/check?verbose=1&URI=http%3A%2f%2Fereply.us%2Fc39%2Findex.asp

Nancy O.

ALT-Web Design & Publishing

Web | Graphics | Print | Media specialists

http://ALT-Web.com/

Tags: Dreamweaver

Similar Questions

Maybe you are looking for