[ back to toc ]

Can you help me ?

Date: 2002/04/29 16:57

Q:
HI... Im from Chile in South America , and i need help for the script
below.
The script need the java sentences, form the open pop up window.
Thank you for your help.
#!/usr/bin/perl
use CGI
print "Content-type: text/html\n\n";

print "<HTML><HEAD><TITLE>tepagocgi></TITLE>\n</HEAD>";
print "<BODY>\n";
print "<SCRIPT LANGUAGE=\"JavaScript1.2\">";
<!function tepago()
{
w1=window.open
("","tepago","height=400,width=450,left=60,top=100,scrollbars=no,status=no
,menubar=no,location=no,resizable=no")
w1.focus();
return true;
}
</script>

print "<FORM Method="POST"
ACTION="https://www.tepago.com/cl/servicios/Pago_Comercio.jsp"
onsubmit="tepago()" target="tepago">";
print "<INPUT TYPE=HIDDEN NAME="id3"
VALUE="7sIPPklqz00DKxtnYnssbihVGcsmlldyHNhx125wCkKbmXxx8knMeKz3X/TqdOH">";
print "<INPUT TYPE=HIDDEN NAME="dominio" VALUE="www.mascoteria.cl">";
print "<INPUT TYPE=HIDDEN NAME="idcompra" VALUE="">";
print "<INPUT TYPE=HIDDEN NAME="no_ok"
VALUE="http://www.mascoteria.cl/cgi-bin/shop/cart.pl?failure">";
print "<INPUT TYPE=HIDDEN NAME="monto" VALUE="">";
print "<INPUT TYPE=HIDDEN NAME="comercio" VALUE="*NAME-DELETED* *NAME-DELETED* Garay">";
print "<INPUT TYPE=HIDDEN NAME="id1" VALUE="5332">";
print "<INPUT TYPE=HIDDEN NAME="ok"
VALUE="http://www.mascoteria.cl/cgi-bin/shop/cart.pl?123abcd">";
print "<INPUT TYPE=HIDDEN NAME="email" VALUE="">";
print "</FORM>"
print "</BODY></HTML>"

A:
Why don't you print all the code in a single multi-line string. Like:

print <<END;
Content-type: text/html

<HTML><HEAD><TITLE>tepagocgi></TITLE>\n</HEAD>
<BODY>
<SCRIPT LANGUAGE="JavaScript1.2">
<!function tepago()
{
w1=window.open
("","tepago","height=400,width=450,left=60,top=100,scrollbars=no,status=no
,menubar=no,location=no,resizable=no")
w1.focus();
return true;
}
</script>

<FORM Method="POST"
ACTION="https://www.tepago.com/cl/servicios/Pago_Comercio.jsp"
onsubmit="tepago()" target="tepago">
<INPUT TYPE=HIDDEN NAME="id3"
VALUE="7sIPPklqz00DKxtnYnssbihVGcsmlldyHNhx125wCkKbmXxx8knMeKz3X/TqdOH">
<INPUT TYPE=HIDDEN NAME="dominio" VALUE="www.mascoteria.cl">
<INPUT TYPE=HIDDEN NAME="idcompra" VALUE="">
<INPUT TYPE=HIDDEN NAME="no_ok"
VALUE="http://www.mascoteria.cl/cgi-bin/shop/cart.pl?failure">
<INPUT TYPE=HIDDEN NAME="monto" VALUE="">
<INPUT TYPE=HIDDEN NAME="comercio" VALUE="*NAME-DELETED* *NAME-DELETED* Garay">
<INPUT TYPE=HIDDEN NAME="id1" VALUE="5332">
<INPUT TYPE=HIDDEN NAME="ok"
VALUE="http://www.mascoteria.cl/cgi-bin/shop/cart.pl?123abcd">
<INPUT TYPE=HIDDEN NAME="email" VALUE="">
</FORM>
</BODY></HTML>
END

In addition to that there are some syntax errors in the code segment you
provided (missing ; from end of statements).

Regards,
Peter

[ back to toc ]