Does the order number ever include non numeric characters? If not, then
why would you want it to be alpha?

It looks like you just have issues with the number of spaces, which you
could check in your called program before using the variable. The called
program should except the string w/o the spaces... then just concat the
number of needed spaces to the beginning of the order number.

Then you don't need to worry about all the " " stuff on the front end
side....I would def handle this on the server side since that is where the
problem comes in. But I would really use a numeric order number if you
don't need alphas....


Thanks
Bryce Martin
Programmer/Analyst I
570-546-4777



"Darryl Freinkel" <dfreinkel@xxxxxxxxxxxxxxxxx>
Sent by: web400-bounces@xxxxxxxxxxxx
06/26/2011 01:02 PM
Please respond to
Web Enabling the AS400 / iSeries <web400@xxxxxxxxxxxx>


To
<web400@xxxxxxxxxxxx>
cc

Subject
[WEB400] How do I preserve leading blanks in fields - Using CGIDEV2






@Bryce

Here is my HTML. The order number is the field with the problem. As you
will
see, I use it as a link to a called program which fails. As a work around,
I
have right justified the field in the called program. Order number is
alpha.

Thanks

------------------------------------------

/$Header
Content-type: text/html

<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
<html>
<head>
<title>Pickable Customer Orders</title>
<meta http-equiv="Pragma" content="no-cache">
<script language="JavaScript" type="text/javascript"
src="/vdi_df/scripts/btn_next.js"></script>
<link rel="StyleSheet" href="/vdi_df/css/vd01.css" media="screen"
type="text/css">
</head>

<! ---- Heading Lines --------------------------------------------->
<body>
<table width="100%" border="0" cellpadding="0" cellspacing="5">
<tbody >
<tr>
<td width="500"><h1><b><center>Pickable Customer
Orders</center></b></h1> </td>
<td>
<! ---- start form here --------------------------------------------->
<table width="100%" border="1" cellpadding="0" cellspacing="5">
<form method="post"
name="Form1"
id="Form1"

action=/vdi_df/picklist01.pgm?process=find&rows2show=/%rows2show%/&perc=/%pe
rc%/ >
<tbody >
<tr width="500">
<td class="text">Number of rows to show :&nbsp;
<input id="rows2show" type="text" class="text" size="5"
maxlength="5" name="rows2show" value="/%rows2show%/" />
<br>
</td>
</tr>
<tr>
<td id="perc" Class="text">Select % complete&nbsp
/%radio_cmd%/
</td>
</tr>
<tr>
<td class="text">
<input id="btn_find" type="submit" value="Find"/>
<input id="btn_next" type="submit" value="Next"
onClick="func_btn_next()"/>
&nbsp
/%message%/
</td>
</tr>
</tbody>
</table>
<! ---- End of form here --------------------------------------------->
<input id="first_cust_order" type="hidden"
name="first_cust_order"
value="/%first_cust_order%/" />
<input id="last_cust_order" type="hidden" name="last_cust_order"
value="/%last_cust_order%/" />
<input id="first_shipto" type="hidden" name="first_shipto"
value="/%first_shipto%/" />
<input id="last_shipto" type="hidden" name="last_shipto"
value="/%last_shipto%/" />
<input id="process" type="hidden" name="process"
value="/%process%/" />
</form>
</td>
</tr>
</tbody>
</table>

<! ---- Main table Heading --------------------------------------------->

<table width="100%" border="1" cellpadding="0" cellspacing="0">
<tbody >
<tr class="menuback">
<td width="50 px" class="text2">Ship To</td>
<td width="110 px" class="text2">Customer Name</td>
<td width="60 px" class="text2">Order Number</td>
<td width="60 px" class="text2c">Due Date</td>
<td width="40 px" class="text2">Open Lines</td>
<td width="40 px" class="text2r">Percent Complete</td>
<td width="40 px" class="text2">Last Status</td>
<td width="60 px" class="text2c">Status Date</td>
<td width="70 px" class="text2c">Status Time</td>
<td width="40 px" class="text2c">Pick Method</td>
</tr>

<! ---- Detail Lines --------------------------------------------->

/$body
<tr class="/%line_color%/">
<td class="text">/%chstcn%/</td>
<td class="text">/%cmsnam%/</td>
<td class="textright"><a
href="/vdi_df/custordr01.pgm?customer_order=/%chono%/" target="_blank"
/a>/%chono%/</td>
<td class="textcenter">/%due_date%/</td>
<td class="textcenter">/%open_lines%/</td>
<td class="textright">/%perc_complete%/</td>
<td class="textcenter">/%last_status%/</td>
<td class="textcenter">/%status_date%/</td>
<td class="textcenter">/%status_time%/</td>
<td class="textcenter">/%pick_method%/</td>
</tr>

/$Footer

</tbody>
</table>

<br>

</body>
</html>




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.