I am using QtmhWrStout API(in AS/400 SERVER) using RPGLE language to write the HTML code for my display page to the browser(client-side). My HTML code is embedded in my RPG-CGI program (.pgm), I have kept a java-script function in that HTML code that is to be executed in clients' browser. But when that page is displayed in browser...,page source contains some symbols like ä 开发者_Python百科for { and ü for } .For this reason the events can not call the java-script function.Java-script error is shown.
HTML Page-source generated by my rpgle progrm in clients' browser:
<html> <head>
<title>ERP!!Enter Product Details</title>
<SCRIPT language="javascript">
function crt(spnid,elmnm,val)
ä
var cat=document.getElementById(spnid);
cat.innerHTML="";
if(val=="new")
ä
var elm=document.createElement("input");
elm.setAttribute("type","text");
elm.setAttribute("name",elmnm);
cat.appendChild(elm);
ü
ü
</SCRIPT>
</head>
<body bgcolor="lightblue">
<form action="sss" method="post">
<table align="center" border="1" cellpadding="1" cellspacing="1" style="width: 80%">
<tbody><tr><td><table align="center" border="0"><caption>
<strong>Insert Product Details</strong></caption><tbody><tr>
<td style="text-align: right">Product Category</td>
I tried to use the hex code but still not happenning...... http://imgur.com/QNMPL.png
As I am a new learner of this RPGLE(AS/400)...Pease help me out to use java-script in PGM generated html file.
Thanks in advance.
What CCSID is your job running under? 37?
Have you tried setting the doctype on the content you are delivering?
Try using the contenttype meta variable?
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii"/>
or
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
精彩评论