Posted Form contents Problem

I had this problem with 4.5.1 SP 5 and WebLogic told me it would be
fixed in 5.1 SP 1 (I believe the issue number was 10214). I've just
tried my simple test case again with 5.1 SP 3 on NT and it still fails.
The problem is when text is posted from an HTML form to a servlet in
WebLogic, WebLogic assumes the posted data is ALWAYS encoded in
ISO-8859_1. So if your form posts Shift-JIS, WLS still incorrectly
converts the text to unicode using the ISO8859 code page. The only
work arround I can find is to take the bad JAVA unicode strings, get the
bytes with the ISO8859 code page, and then create a new string using
those bytes and the Shift-JIS code page. This is what the
fixStringEncoding() method is doing below. This is unacceptable.
How does the WebLogic server understand how to convert between IANA
encodings and JAVA encodings when receiving a response? A browser will
encode the form contents with the same encoding as the HTML page with
the form is in. How does WLS know when it recieves the response to use
SJIS (Java encoding) to convert Shift-JIS (IANA) encoded text to
unicode? My test JSP page is included below. It's form that accepts
Japanese text and posts it back to itself for display. If I don't "fix"
the JAVA strings, the Japanese text comes out as garbage. BTW, I have
verified that I'm using SP 3 correctly. Thanks.
Kirk Everett
<%@ page contentType="text/html; charset=Shift-JIS"%>
<html>
<head>
<title></title>
<meta http-equiv="content-type" content="text/html; charset=Shift-JIS">
<meta http-equiv="expires" content="0">
<meta http-equiv="pragma" content="no-cache">
</head>
<body>
<form name="Dummy" action="dummySJIS.jsp" method="post">
<table>
<tr>
<td align="right">DummyString:</td>
<td><input type="text" name="dummy" size="30"
maxlength="50"></td>
</tr>
</table>
<input type="submit" value="submit">
</form>
<BR>
DummyString with fixing= <%=
fixStringEncoding(request.getParameter("dummy")) %>
<BR>
DummyString without fixing = <%= request.getParameter("dummy") %>
<BR>
Embedded (Shitf-JIS) Japanese --> ?X?V‚É?¬Œ÷‚µ‚Ü‚µ‚½?B
</body>
</html>
<%!
public String fixStringEncoding(String sourceString)
String targetEncoding = "SJIS";
String convertedString = null;
if(sourceString != null)
// get the array of bytes for the unicode string using the
// 8859_1 code page
try
byte[] stringBytes = sourceString.getBytes("ISO8859_1");
// now create a new string based of the array but do it
// with the correct code page UTF8
convertedString = new String(stringBytes, targetEncoding);
catch(UnsupportedEncodingException uee)
convertedString = "";
return convertedString;
%>

The jsp directive does nothing to help the INPUT data handling. On the other hand, this is a html spec problem, not a weblogic one. RFC2070 has some recommendation on how to do i18n with HTML/HTTP, but neither Netscape nor IE supports it.
--Ye
Joseph Weinstein <[email protected]> wrote:
Hi,
The ideal approach is to employ the JSP directive for encoding.
This is documented in the JSP spec. Also, if all your JSPs
require the same encoding, there is an argument to our JSP
servlet, to tell it what default charset encoding to use.
Joe
Kirk Everett wrote:
I had this problem with 4.5.1 SP 5 and WebLogic told me it would be
fixed in 5.1 SP 1 (I believe the issue number was 10214). I've just
tried my simple test case again with 5.1 SP 3 on NT and it still fails.
The problem is when text is posted from an HTML form to a servlet in
WebLogic, WebLogic assumes the posted data is ALWAYS encoded in
ISO-8859_1. So if your form posts Shift-JIS, WLS still incorrectly
converts the text to unicode using the ISO8859 code page. The only
work arround I can find is to take the bad JAVA unicode strings, get the
bytes with the ISO8859 code page, and then create a new string using
those bytes and the Shift-JIS code page. This is what the
fixStringEncoding() method is doing below. This is unacceptable.
How does the WebLogic server understand how to convert between IANA
encodings and JAVA encodings when receiving a response? A browser will
encode the form contents with the same encoding as the HTML page with
the form is in. How does WLS know when it recieves the response to use
SJIS (Java encoding) to convert Shift-JIS (IANA) encoded text to
unicode? My test JSP page is included below. It's form that accepts
Japanese text and posts it back to itself for display. If I don't "fix"
the JAVA strings, the Japanese text comes out as garbage. BTW, I have
verified that I'm using SP 3 correctly. Thanks.
Kirk Everett
<%@ page contentType="text/html; charset=Shift-JIS"%>
<html>
<head>
<title></title>
<meta http-equiv="content-type" content="text/html; charset=Shift-JIS">
<meta http-equiv="expires" content="0">
<meta http-equiv="pragma" content="no-cache">
</head>
<body>
<form name="Dummy" action="dummySJIS.jsp" method="post">
<table>
<tr>
<td align="right">DummyString:</td>
<td><input type="text" name="dummy" size="30"
maxlength="50"></td>
</tr>
</table>
<input type="submit" value="submit">
</form>
<BR>
DummyString with fixing= <%=
fixStringEncoding(request.getParameter("dummy")) %>
<BR>
DummyString without fixing = <%= request.getParameter("dummy") %>
<BR>
Embedded (Shitf-JIS) Japanese --> ?X?V&#8218;É?¬&#338;÷&#8218;µ&#8218;Ü&#8218;µ&#8218;½?B
</body>
</html>
<%!
public String fixStringEncoding(String sourceString)
String targetEncoding = "SJIS";
String convertedString = null;
if(sourceString != null)
// get the array of bytes for the unicode string using the
// 8859_1 code page
try
byte[] stringBytes = sourceString.getBytes("ISO8859_1");
// now create a new string based of the array but do it
// with the correct code page UTF8
convertedString = new String(stringBytes, targetEncoding);
catch(UnsupportedEncodingException uee)
convertedString = "";
return convertedString;
%>--
PS: Folks: BEA WebLogic is in S.F. with both entry and advanced positions for
people who want to work with Java and E-Commerce infrastructure products. Send
resumes to [email protected]
The Weblogic Application Server from BEA
JavaWorld Editor's Choice Award: Best Web Application Server
Java Developer's Journal Editor's Choice Award: Best Web Application Server
Crossroads A-List Award: Rapid Application Development Tools for Java
Intelligent Enterprise RealWare: Best Application Using a Component Architecture
http://www.bea.com/press/awards_weblogic.html

Similar Messages

  • Problem posting HTML content in WebForms

    I apologize in advance if this is posted in the wrong location; I cannot find a form for Webforms or ASP.NET in the listings.  (I also apologize if this is a duplicate question; I had trouble submitting it the first time.)
    I'm updating an existing WebForms application for a relative who will undoubtedly find lots of little details for me to fix over the next few weeks.  In order to reduce the number of service calls, I'm implementing a "site config" feature that
    will enable him to modify some of the site elements himself, such as toggling the display of certain labels or repositioning the hit count.  The configuration isn't being stored in a database, but rather in an XML document in the site root.  Each
    time the form is used to update the XML, a backup is saved, and the site can revert to a previous version if the current config becomes hosed.  In short, I'm not particularly concerned about malicious code going into the XML, although I do have some validation
    in place to make sure he doesn't screw things up.
    I'd like the config to be able to hold some HTML, so that he can apply custom formatting to the elements he configures, and I have of course applied Server.HtmlEncode to those fields.  But I can't get the form to post HTML content.  The article here
    (http://msdn.microsoft.com/en-us/library/a2a4yykt(v=vs.100).aspx) advises me to turn off the request validation using the @ Page attribute ValidateRequest="false."  However, this has no effect.  Upon form submission, the code behind is
    completely ignored, and the exception  "A potentially dangerous Request.Form value was detected from the client" is logged.
    Is there a way to override this behavior?  I'm using Framework version 4.0 (with Visual Studio 2010).

    If I remember correctly, you *should* be able to use whatever value you want for "key" in the RegisterOnSubmitStatement.  Have you tried something like this just for a test?
    this.ClientScript.RegisterOnSubmitStatement(
    this.GetType(),
    "I_Can_Put_Whatever_I_Want_Here",
    "alert('Microsoft is Awesome!');"
    But I *think* you are having a different issue.  It *sounds* like to me that maybe your EncodeAll ECMA/JavaScript function may not be getting registered properly or in a timely manner.  Have you used IE Developer Tools (F12) to poke around
    and view the available ECMA/JavaScript Files and definitions?
    There are different ways to register ECMA/JavaScript in *.NET.  One primitive way is to simply put something like this in the "head" tag of your MasterPage or ASPX file:
    <script type="text/javascript" src="./myJSFile.js">
    </script>
    Others ways are to use the
    ScriptManager or
    RegisterClientScriptInclude .  You can see a few easy examples of how to register ECMA/JavaScript in Mr. Akhtar's post here:
    https://stackoverflow.com/questions/1666797/how-to-include-javascript-file-in-asp-net-page
    One really *strange* behavior that seems to get a lot of people when registering JavaScript manually via the "script" tag as mentioned above is that you often have to use a *full* </script> end tag for scripts to register properly. 
    I have *no* idea why some browsers require this, but it is something web developers need to be aware of.  For example my
    "<script type='text/javascript' src='./myJSFile.js'></script>"
    example above should work if you have the right path but strangely
    "<script type='text/javascript' src='./myJSFile.js' />" does *not* necessarily work on all browsers even if you do use the correct path to the desired ECMA/JavaScript File.
    Best,
    Shawn

  • How can i send an auto reply with form content to sender?

    Hai!
    I'm new to website building, but i already came a long way
    i made a form and i like to send a auto reply with the form content (if that isnt too difficult) to the person who filled it in.
    The form i made is in PHP (coding i copied partly from someone from the internet .)
    You can see the from at: http://vinddit.nl/vindditnu%20php%20version.php
    My PHP coding so far
    <?php
    // Set email variables
    $email_to = '[email protected]';
    $email_subject = 'Aanvraag - VINDDIT NU!';
    // Set required fields
    $required_fields = array('Voornaam','email','Achternaam','Plaats');
    // set error messages
    $error_messages = array(
              'Voornaam' => 'Vul hier uw voornaam in a.u.b.',
              'email' => 'Vul hier een geldig email adres in a.u.b.',
              'Achternaam' => 'Vul hier uw achternaam in a.u.b.',
              'Plaats' => 'Vul hier uw woonplaats in a.u.b.'
    // Set form status
    $form_complete = FALSE;
    // configure validation array
    $validation = array();
    // check form submittal
    if(!empty($_POST)) {
              // Sanitise POST array
              foreach($_POST as $key => $value) $_POST[$key] = remove_email_injection(trim($value));
              // Loop into required fields and make sure they match our needs
              foreach($required_fields as $field) {
                        // the field has been submitted?
                        if(!array_key_exists($field, $_POST)) array_push($validation, $field);
                        // check there is information in the field?
                        if($_POST[$field] == '') array_push($validation, $field);
                        // validate the email address supplied
                        if($field == 'email') if(!validate_email_address($_POST[$field])) array_push($validation, $field);
              // basic validation result
              if(count($validation) == 0) {
                        // Prepare our content string
                        $email_content = 'New Website Comment: ' . "\n\n";
                        // simple email content
                        foreach($_POST as $key => $value) {
                                  if($key != 'submit') $email_content .= $key . ': ' . $value . "\n";
                        // if validation passed ok then send the email
                        mail($email_to, $email_subject, $email_content);
                        // Update form switch
                        $form_complete = TRUE;
    function validate_email_address($email = FALSE) {
              return (preg_match('/^[^@\s]+@([-a-z0-9]+\.)+[a-z]{2,}$/i', $email))? TRUE : FALSE;
    function remove_email_injection($field = FALSE) {
       return (str_ireplace(array("\r", "\n", "%0a", "%0d", "Content-Type:", "bcc:","to:","cc:"), '', $field));
    ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    <head>
              <title>Aanvraag formulier</title>
              <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
              <link href="style.css" rel="stylesheet" type="text/css" />
        <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/mootools/1.3.0/mootools-yui-compressed.js"></script>
        <script type="text/javascript" src="validation/validation.js"></script>
              <script type="text/javascript">
    var nameError = '<?php echo $error_messages['fullname']; ?>';
                        var emailError = '<?php echo $error_messages['email']; ?>';
                        var commentError = '<?php echo $error_messages['comment']; ?>';
    function MM_preloadImages() { //v3.0
      var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
        var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
        if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
        </script>
    <style type="text/css">
    </style>
    </head>
    <body onload="MM_preloadImages('icons/x.png')">
    <p> </p>
    <p>
      <?php if($form_complete === FALSE): ?>
    </p>
        <form action="vindditnu php version.php" method="post" enctype="application/x-www-form-urlencoded" name="Form"  id="commentsform">
        <h1><img src="icons/vinddit3.gif" width="220" height="80" alt="logo" /></h1>
        <h1>Wat zoekt u?:</h1>
                     <table width="690" border="0">
            <tr>
              <td>In welke categorie zoekt u?*</td>
              <td colspan="3"><select name="Ophalen_verzenden" id="Ophalen_verzenden">
                <option selected="selected">Meubels </option>
                <option>Witgoed </option>
                <option>Woon accesoires </option>
                <option>Kleding </option>
                <option>Schoenen </option>
                <option>Mode accesoires </option>
                <option>Speelgoed </option>
                <option>Boeken, tijdschriften, papierwaren </option>
                <option>Overig </option>
              </select></td>
            </tr>
            <tr>
              <td>Kleur:* </td>
              <td colspan="3"><select name="kleuren" id="kleuren">
                <option>Blauw</option>
                <option>Rood</option>
                <option>WIt</option>
                <option>Zwart</option>
                <option>Beige</option>
                <option>Bruin</option>
                <option>Geel</option>
                <option>Oranje</option>
                <option>Rood</option>
                <option>Metallic (Bijv. Zilver/Goud/Brons/Koper</option>
                <option>Meerkleurig</option>
                <option selected="selected">Overig/ N.v.t</option>
              </select></td>
            </tr>
            <tr>
              <td>Merk: </td>
              <td colspan="3"><input name="Merk" type="text" id="Merk5" value="<?php echo isset($_POST['Merk'])? $_POST['Merk'] : ''; ?>" />
                <?php if(in_array('Merk', $validation)): ?>
                <span class="error"><?php echo $error_messages['Merk']; ?></span>
                <?php endif; ?></td>
            </tr>
            <tr>
              <td>Type/Model:</td>
              <td colspan="3"><input type="text" name="type" id="type" value="<?php echo isset($_POST['type'])? $_POST['type'] : ''; ?>" />
                <?php if(in_array('type', $validation)): ?>
                <span class="error"><?php echo $error_messages['type']; ?></span>
                <?php endif; ?></td>
            </tr>
            <tr>
              <td>Materiaal: </td>
              <td colspan="3"><input name="Materiaal" type="text" id="Materiaal" value="<?php echo isset($_POST['Materiaal'])? $_POST['Materiaal'] : ''; ?>" />
                <?php if(in_array('Materiaal', $validation)): ?>
                <span class="error"><?php echo $error_messages['Materiaal']; ?></span>
                <?php endif; ?></td>
            </tr>
            <tr>
              <td>Maat: </td>
              <td colspan="3"><input type="text" name="Maat" id="Maat" value="<?php echo isset($_POST['Maat'])? $_POST['Maat'] : ''; ?>" />
                <?php if(in_array('Maat', $validation)): ?>
                <span class="error"><?php echo $error_messages['Maat']; ?></span>
                <?php endif; ?></td>
            </tr>
            <tr>
              <td>Conditie*:</td>
              <td colspan="3"><select name="conditie" id="conditie" >
                <option>Zo goed als nieuw</option>
                <option>Nieuw</option>
                <option>Bebruikt</option>
                <option selected="selected">Geen voorkeur </option>
              </select></td>
            </tr>
            <tr>
              <td>Ophalen/Verzenden:*</td>
              <td colspan="3"><select name="ophalen" id="ophalen">
                <option>Ophalen</option>
                <option>Verzenden</option>
                <option>N.v.t</option>
                <option>Geen voorkeur </option>
              </select></td>
            </tr>
            <tr>
              <td>Prijs Min:</td>
              <td><input name="prijsmin" type="text" id="prijsmin" size="10" value="<?php echo isset($_POST['prijsmin'])? $_POST['prijsmin'] : ''; ?>" />
                <?php if(in_array('prijsmin', $validation)): ?>
                <span class="error"><?php echo $error_messages['prijsmin']; ?></span>
                <?php endif; ?></td>
              <td>Prijs Max:</td>
              <td><input name="Prijs" type="text" id="Prijs" size="10" value="<?php echo isset($_POST['Prijs'])? $_POST['Prijs'] : ''; ?>" />
                <?php if(in_array('Prijs', $validation)): ?>
                <span class="error"><?php echo $error_messages['Prijs']; ?></span>
                <?php endif; ?></td>
            </tr>
          </table>
          <h1>Opmerkingen:</h1>
          <table width="690" border="0">
            <tr>
              <td height="25">Opmerkingen:</td>
              <td rowspan="2"><textarea name="Opmerkingen" cols="67" rows="10" id="Opmerkingen"><?php echo isset($_POST['Opmerkingen'])? $_POST['Opmerkingen'] : ''; ?></textarea>
                <?php if(in_array('Opmerkingen', $validation)): ?>
                <span class="error"><?php echo $error_messages['Opmerkingen']; ?></span>
                <?php endif; ?></td>
            </tr>
            <tr>
              <td height="78"> </td>
            </tr>
          </table>
          <h1>Uw Gegevens:</h1>
          <table width="690" border="0">
            <tr>
              <td>Voornaam/Voorletters*:</td>
              <td><input type="text" name="Voornaam" id="Voornaam" class='invul' value="<?php echo isset($_POST['Voornaam'])? $_POST['Voornaam'] : ''; ?>" />
                <?php if(in_array('Voornaam', $validation)): ?>
                <span class="error"><?php echo $error_messages['Voornaam']; ?></span>
                <?php endif; ?></td>
              <td>Achternaam:* </td>
              <td><input type="text" name="Achternaam" id="Achternaam" class='invul' value="<?php echo isset($_POST['Achternaam'])? $_POST['Achternaam'] : ''; ?>" />
                <?php if(in_array('Achternaam', $validation)): ?>
                <span class="error"><?php echo $error_messages['Achternaam']; ?></span>
                <?php endif; ?></td>
            </tr>
            <tr>
              <td>Straatnaam:</td>
              <td><input type="text" name="Straat" id="Straat" class='invul' value="<?php echo isset($_POST['Straat'])? $_POST['Straat'] : ''; ?>" />
                <?php if(in_array('Straat', $validation)): ?>
                <span class="error"><?php echo $error_messages['Straat']; ?></span>
                <?php endif; ?></td>
              <td>Huisnummer:</td>
              <td><input name="Huisnummer" type="text" id="Huisnummer" class='invul' size="10" value="<?php echo isset($_POST['Huisnummer'])? $_POST['Huisnummer'] : ''; ?>" />
                <?php if(in_array('Huisnummer', $validation)): ?>
                <span class="error"><?php echo $error_messages['Huisnummer']; ?></span>
                <?php endif; ?></td>
            </tr>
            <tr>
              <td>Postcode:</td>
              <td><input type="text" name="Postcode" id="Postcode" class='invul' value="<?php echo isset($_POST['Postcode'])? $_POST['Postcode'] : ''; ?>" />
                <?php if(in_array('Postcode', $validation)): ?>
                <span class="error"><?php echo $error_messages['Postcode']; ?></span>
                <?php endif; ?></td>
              <td>Plaats:* </td>
              <td><input type="text" name="Plaats" id="Plaats" class='invul' value="<?php echo isset($_POST['Plaats'])? $_POST['Plaats'] : ''; ?>" />
                <?php if(in_array('Plaats', $validation)): ?>
                <span class="error"><?php echo $error_messages['Plaats']; ?></span>
                <?php endif; ?></td>
            </tr>
            <tr>
              <td>Email Adres:*</td>
              <td colspan="3"><input type="text" name="email" id="email" class='invul' value="<?php echo isset($_POST['email'])? $_POST['email'] : ''; ?>" />
                <?php if(in_array('email', $validation)): ?>
                <span class="error"><?php echo $error_messages['email']; ?></span>
                <?php endif; ?></td>
            </tr>
            <tr>
              <td>Telefoonnummer:</td>
              <td colspan="3"><input name="Telefoon" type="text" id="Telefoon" class='invul' value="<?php echo isset($_POST['Telefoon'])? $_POST['Telefoon'] : ''; ?>" />
                <?php if(in_array('Telefoon', $validation)): ?>
                <span class="error"><?php echo $error_messages['Telefoon']; ?></span>
                <?php endif; ?></td>
            </tr>
          </table>
          <p>
            <label for="Straat"></label>
            <label for="Huisnummer"><br />
            </label>
            <input type="submit" name="Submit" id="Submit" value="Verstuur" />
                   <input type="reset" name="Reset" id="Reset" value="Wissen" />
          </p>
        </form>
        <?php else: ?>
        <div class="bedankt">
          <p>Bedankt voor uw aanvraag!</p>
          <p>Wij zullen uw aanvraag zo spoedig mogelijk behandelen. Meestal duurt dit 2 a 3 werkdagen.</p>
          <p><img src="icons/vinddit3.gif" width="220" height="80" alt="logo" /></p>
    </div>
        <p>
          <script type='text/javascript'>
    setTimeout("ourRedirect()", 5000)
    function ourRedirect() {
          </script>
          <?php endif; ?>
    </body>
    </html>
    and .JS
    window.addEvent('domready', function() {
              // Get the form
              var form = $('comments_form');
              //  if the form is found...
              if (form) {
                        // obtain error fields
                        var name = $('fullname');
                        var email = $('email');
                        var comment = $('comment');
                        // Set the default status
                        var isValid = true;
                        // input error function for the error messages
                        var addError = function (field, msg) {
                                  field.addClass('error'); // Add error class to field
                                  var error = field.getParent().getElement('span') || new Element('span', {'class': 'error'}); // add error message if not already placed
                                  error.set('text', msg); // error text msg
                                  error.inject(field, 'after'); // Insert error message after field
      // detach error function used to delete any error messages and remove the error class
                        var removeError = function (field) {
                                  field.removeClass('error'); // Remove error class from form fields
                                  var error = field.getParent().getElement('span'); // find any existing error messages
      // destroy if error message
                                  if (error) {
                                            error.destroy();
    //  insert submit form event
                        form.addEvent('submit', function (e) {
                                  // Test name length
                                  if (name.get('value').length === 0) {
                                            isValid = false;
                                            addError(name, nameError);
                                  } else {
                                            isValid = true;
                                            removeError(name);
    // check email length
                                  if (email.get('value').length === 0) {
                                            isValid = false;
                                            addError(email, emailError);
                                  // check email validity
                                  } else if (!email.get('value').test(/^([a-zA-Z0-9\+_\-]+)(\.[a-zA-Z0-9\+_\-]+)*@([a-zA-Z0-9\-]+\.)+ [a-zA-Z]{2,6}$/)) {
                                            isValid = false;
                                            addError(email, emailError);
                                  } else {
                                            isValid = true;
                                            removeError(email);
                    // check comment length
                                  if (comment.get('value').length === 0) {
                                            isValid = false;
                                            addError(comment, commentError);
                                  } else {
                                            isValid = true;
                                            removeError(comment);
                                  // If form invalid then stop event happening
                                  if (!isValid) {
                                            e.stop();

    lisavs12686 wrote:
    Whould it also be possible to send the sender the submited data (looking like the filled in form or so)?
    not really nessecary but whould be a nice  jextra
    You can but you would need to send it as an html email which is much more complicated.
    What you would do is build a page/table construction like below. You would need to use the php variables to echo out the information in the <td></td> cells (example below).
    $reply = $_POST['email'];
    $from = '[email protected]';
    $replysubject = "Auto-Reply: Website Name";
    $headers  = 'MIME-Version: 1.0' . "\r\n";
    $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
    $headers .= "From: $from\r\nReply-to: $reply";
    $replymessage = '
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>Comments from Website</title>
    </head>
    <body>
    <table>
    <tr>
    <td bgcolor="#ffffff" style="font-family: verdana, arial, helvetica, sans-serif; font-size: 13px; padding: 10px 15px;">Name: </strong>'.$name.'
    </td>
    </tr>
    </table>
    </body>
    </html>';
    mail($reply, $replysubject, $replymessage, $headers);

  • IE11 can't post form data to specific frame or window dialog opened via window.open()

    Hello,
    Form POST targeting to specific frame or dialog popped up via window.open() no longer works in IE11.
    It worked fine in IE10 and all previous versions of IE.
    Please see screenshot attached with simple test that reproduces this problem.
    Direct Link to screenshot:
    http://173.231.98.44/cgi/TestFolder/IE_11_widow_frame_targeting_BUG.jpg
    Direct link to simple test page demonstrating this problem:
    http://173.231.98.44/cgi/TestFolder/page2.asp
    Note: IE11 doesn't report any errors, doesn't complain about anything, even when debugged via F12 developer tools. The only thing it complained initially was missing doc type declaration on top of page, but even after adding doc type definition, problem still
    persists, makes no difference.
    I tested this on fresh install of Windows 2012R2 while testing our web application with the new IE11.
    I believe doing this on Windows 8.1 with IE11 will result in same bug/problem.
    Our web application uses a technique whereby it launches a popup window via call to window.open(), passing blank URL and specifying a name for the new window. It then does a from post targeting the name of new dialog.
    In IE11 this functionality has been broken and no longer works.
    Problem is that IE11, instead of posting form to the newly created dialog, it launches a new instance of IE and then loads the requested form in this new instance of IE, while the dialog launched via window.open() remains on screen and is empty. If user repeats
    launching same form post request (via button click for example), IE 11 keeps creating new empty dialogs and new IE instance for every form post executed. This totally breaks our application because we use many so called "wizards" that encapsulate
    specific functionality in separate web page launched in a popup window.
    Another related problem is that if a dialog is launched with window.open(), the java script code in the dialog can not target the parent frame that opened the dialog anymore. In our application, when a dialog is closed, it typically needs to trigger a refresh
    of a specific frame within the parent window (again targeted by name) to reflect saved/updated info that user entered in the popup dialog. The result is that we can't refresh the parent frame after the pop up dialog closes. Instead, IE11 launches
    a new instance of IE (not just a tab, but a whole new instance) and loads the parent frame in it.
    The problem seems to be caused by broken frame name targeting mechanism in IE11.
    Note that we force IE to compatibility mode 5, but even without specifying any compatibility, the problem remains.
    Typical java script to reproduce this is:
    <input type="button" onClick="Popup(this.form);" name="btn2" value="Popup Dialog">
    function Popup(f){
        window.open("","MyNewDialogName","width=200,height=150");
        f.action = "page3.asp";
        f.target = "MyNewDialogName";
        f.submit();
    Expected: IE11 should correctly post form to and load targeted page in the newly popped up dialog, without opening new IE instance and new tab. Repeatedly posting form to existing popup window should reuse that window, not keep on launching more popup windows
    and then more IE instances.
    Steps to reproduce the problem (include URL if applicable):
    URL with sample page: http://173.231.98.44/cgi/TestFolder/page2.asp
    1) Create page1.htm: <html><body>display "I'm in a popup window now ..."</body></html>
    2) Create page2.htm with a button and onclick() event calling function to open dialog, and do form POST targeting new dialog calling page1.htm, like below.
    <input type="button" onClick="Popup(this.form);" name="btn2" value="Popup Dialog"> function Popup(f){
        window.open("","MyNewDialogName","width=200,height=150");
        f.action = "page1.asp";
        f.target = "MyNewDialogName";
        f.submit();
    3) Open IE11, navigate to page2.htm, click the "Popup Dialog" dialog button. IE 11 will popup the new dialog, but then it will also launch new instance of IE11 and display the page1.htm in it, instead of in the popup dialog.
    Has anyone else encountered this problem?
    Any insight or help is appreciated.
    Regards
    Peter

    the default action of <input type="button" is submit. Note also that the default type of <button> elements is 'submit' also.
    add a return false to the onclick inline event handler (which constructs the form submit attribues) to cancel the default form.submit behavior.
    form elements have a target value with which you can specify the name window into which you want the form to open in.
    <form action="process.aspx" target="popup">
    you can use the window.open method with a query uri to achieve the same outcome.
    window.open('process.aspx?s=search+term&amp;foo=bar','popup',{features})
    the outcomes of all scripted windows are affected by
    your IE Popup blocker and tabbed browsing settings
    which in turn is affected by your IE Security zone settings (for popup blocking handling)
    and the settings of any third-party popup blocker you may have installed and enabled... it may not necessarily be visible on your browser toolbar.
    The first step in troubleshooting web browser issues is to test in no-addons mode.
    Use the Developer Tool to find out what documentMode the test page is opening in on your system. On Modal/Modeless popup windows use the f12 key to display the Developer tool positioned on the contentWindow.
    Use File>Properties to find out what IE Security zone it maps to... there is a security setting to prevent navigation into zones of lower integrity.
    Rob^_^

  • How to print a PDF form content when i have the content

    Hi SAPGURUS,
    I have an urgent requirement.
    I have the content of a PDF form in raw format and it is saved in some repositry .Now How can i create a spool request and print the form.
    I can use the function module FP_JOB_OPEN and then gat the dynamic function module name and then close it by FP_JOB_CLOSE .
    But as i already have the PDF form content i need not create it again by calling the dynamic function module.And i can't do so because both applications are altogether separate from each other that is creation of the PDF form and printing it.
    Could you help me in guiding the way to solve this problem.
    Thanks in advance
    Sanjeev

    Hi Sanjeev,
    I have currently the same issue, please have you solved it?
    Thank you
    Tomas

  • I want to disable some of the check boxes on gl post form

    I am looking for form personalization that will disable the option to post some of the journal in GL Post form.
    The problem is that I managed to catch the new record event, this is operated only if the user chooses the line.
    But the user is standing on line 3 and checking line 1 2 and 4 .

    By searching for your answer in the forum.
    Rob

  • How to display mutiple form contents on the same page

    I have multiple forms for a same page,when i press submit in one form it has to go to next form,where both form contents should display on the same page.Can anyone post example code for this?
    Thnx in advance.

    I have multiple forms for a same page,when i press
    submit in one form it has to go to next form,where
    both form contents should display on the same
    page.Can anyone post example code for this?that's not how it works. when you press submit, the form data is submitted to the server. you can then forward the user to a page with another form, but what you're talking about doesn't make sense

  • Mod_plsql: /pls/apex/f HTTP-400 Missing '=' in query string or post form

    This is the message when I click the logout button. It destroys the session though. It should redirect to login page after clicking logout button.
    We are on Apex 4.1
    Bad Request
    Your browser sent a request that this server could not understand.
    mod_plsql: /pls/apex/f HTTP-400 Missing '=' in query string or post form
    Oracle-Application-Server-10g/10.1.2.2.0 Oracle-HTTP-Server Server at xxxx.xxxxx.edu Port 443
    Edited by: 965704 on Oct 30, 2012 11:42 AM

    It has been fixed but the new problem is: After signout, if I move back to previous page and click some link using <- sign then I suppose to get the login page, but i am getting
         ORA-44004: invalid qualified SQL name error message.
    The source for my login page is
    wwv_flow_custom_auth_std.login(
    P_UNAME => :P101_USERNAME,
    P_PASSWORD => :P101_PASSWORD,
    P_SESSION_ID => v('APP_SESSION'),
    P_FLOW_PAGE => :APP_ID||':1'
    );

  • Tab canvas + post-forms-commit + form_trigger_failure

    Hi all,
    There is a tab canvas with eight tab pages in my forms.
    In the post-forms-commit form-level trigger there are controls based on some conditions before executing the processes. When the conditions in the controls are not met then a stop alert is shown and form_trigger_failure is raised. All of these actions , that is the alert and form_trigger_failure , are contained inside a procedure named affiche_erreur.
    The problem is that after pressing the alert button then forms goes to the first tab page. And the focus is on a non-navigable button ! Very strange !
    I trapped the form_trigger_failure exception in post-forms-commit , but untill now I do not find any way how to put the focus in a specific item.
    So how to put the focus into a specific item or a specific tab page ?
    Thank you very much indeed

    Mark , the when-tab-page-changed trigger does not fire after I pressed the alert button although the focus goes always to the non-navigable button in the first tab-page. I wrote a pause statement at the beginning of the when-tab-page-changed trigger but there was no pause alert at runtime.
    Finally I created a timer in the exception of the post-forms-commit trigger which catches the form_trigger_failure exception , and in the when-timer-expired trigger I wrote go_item.

  • Cocoon/FOP + form-name problem

    Experts,
    I have configured Tomcat/Cocoon to work with APEX instead of BI Publisher, as per Carl Backstrom's tutorial. Tomcat and Cocoon both work as expected. I am able to configure APEX with the correct URL, port, and Print Server Script, standard support, and so on.
    I am able to use FOP to process static XML files with no problems.
    If I understand how APEX works with Cocoon, it generates a Form POST to send an XML document to Cocoon for processing. Cocoon receives the posted form. Cocoon extracts the XML data based on the name of the posted form, and then transforms it into the specified format (PDF, RTF, HTML, etc.). In Carl's tutorial, Cocoon is configured in sitemap.xmap to expect form-name="xml".
    Question: When APEX executes the Form POST, what form name does it give the posted form? Is this configurable?
    Whenever I try running an APEX report through Cocoon/FOP, I get
    org.apache.cocoon.ProcessingException: Unknown request object encountered named xml : null.
    I have tried renaming form-name to wwv_flow, wwvFlowForm, XML, Xml, asdf,<null>, etc. Whatever I rename the form shows up as null.
    Examples:
    1. org.apache.cocoon.ProcessingException: Unknown request object encountered named wwv_flow : null.
    2. org.apache.cocoon.ProcessingException: Unknown request object encountered named wwvFlowForm : null.
    3. org.apache.cocoon.ProcessingException: Unknown request object encountered named asdf : null.
    4. org.apache.cocoon.ProcessingException: Unknown request object encountered named xml : null.
    Dan

    Hi Carl
    I use Tomcat and Cocoon as you described. For some reports PDF print is OK. One problem which i found was that, in my case, the language of the application produce also an error. I changed from German to English and everything was OK.
    "Application > Shared Components > Edit Globalization Attributes > Globalization" - Aplication primary language GERMAN. Once that i changed to english US my reports worked again OK.
    I have also an application where for one page PDF produced is OK but for another page in the same application i receive the same error:
    org.apache.cocoon.ProcessingException: Unknown request object encountered named xml : null.
    Maybe Region configuration is different?
    Best regards
    Adrian

  • Post form parameters to a new URL

    Hello,
    I want to create a jsf page which has a form that posts data to a payment system, example URL: https://<<<mypayserver>>>/newpayment .
    However, jsf uses postbacks to post form's data to itself and use the navigation model to navigate through pages.
    So my question is:
    Should I use ExternalContext#redirect() for redirecting the request to the payment URL? Will the form's data be transferred in the request?
    Or should I use vanilla html to do that? I don't want to use the html solution, because I have to do some checks before I send the data, but if there is no other way, I wll do the checks some other way.
    Thanks in advance,
    Tony
    Edited by: deathstar100 on Apr 2, 2008 12:37 AM
    Edited by: deathstar100 on Apr 2, 2008 12:38 AM

    I don't think that you can delete this form_fields because they are system specific.
    http://help.sap.com/saphelp_nw04/helpdata/en/ce/3dd23a09313b37e10000000a11405a/content.htm
    Probably you should explicitly select the formfields you want to write into the URL with the SET/GET_FORM_FIELD(S) methods.
    You can construct your own URLs with your own params. Check the Interface methods from IF_HTTP_UTILITY, IF_HTTP_ENTITY (IF_HTTP_REQUEST/RESPONSE) ...
    Regards
    Volker
    Message was edited by:
            Volker Ritzau

  • Ways to protect posting forms?

    There have been spammer scripts posting bad content into one
    of my forms..
    is there a way to protect this?

    CAPTCHA =
    http://en.wikipedia.org/wiki/Captcha
    "bregent" <[email protected]> wrote in
    message
    news:e8ue85$7v4$[email protected]..
    > >I have made forms that disable submission from
    certain IP's.
    > >You could capture the IPs of all submitters, and
    store the violaters in a
    > table and prevent those IPs from submitting the form.
    >
    > Most spammers don't use static IP's, so that doesn't
    really accomplish
    > much
    > except to possibly block valid users.
    >
    > A better suggestion is to start by validating all fields
    on the server
    > side.
    > Many spam scripts aren't clever enough to fill out all
    fields correctly.
    > If
    > that still doesn't work, you may have to employ some
    sort of captcha. You
    > also
    > need to protect against form injection. What scripting
    language are you
    > using?
    >

  • FRM-40735: POST-FORMS-COMMIT ON TRANSFERING @ 11.5.2

    제품 : FIN_FA
    작성날짜 : 2006-05-30
    FRM-40735: POST-FORMS-COMMIT ON TRANSFERING @ 11.5.2
    =====================================================
    PURPOSE
    11.5.2 또는 11.5.3같은 Old Version의 Asset에서는
    Transfer를 Multiple하게 동시에 수행하게 될때는 FRM-40735에러가 나타납니다.
    Problem Description
    Workaround
    Transfer를 Line별로 한 라인씩 Transfer를 끝내고
    다시 나은 자산에 대해서 Transfer를 하시면 됩니다.
    Solution Description
    최신 버전으로 Upgrade하지 않고는 다른 Solution이 없습니다.
    라인별로 하나씩 Transfer를 하셔야 하십니다.
    Reference Documents
    SR5061389.992

    Please refer
         Inter Org Transfer Transactions Error with Cost_Trx ORA-01403 no data found [ID 1186016.1]
    that addresses the issue. THanks

  • Close a window in a post form trigger in a form with calls to new forms

    All,
    I am trying to close the browser using examples from metalink and this forum. I am placing the code in a post-form trigger as directed by the example. The problem I am having is that this is a menu type screen that includes buttons that take the users to a new form. So, when any of the buttons pressed on the menu screeen, including the Exit button, The Post-Form trigger fires and tries to close the window. I also noticed I should place the trigger in the last closing form and have done that.
    I then tried putting the code to close the window in the Exit when button pressed trigger, and that doesn't seem to be working either.
    Any help would be greatly appreciated.
    Joe

    I wonder why the feature isn't built-in to the OS, even as an option.  It's convenient to be able to minimize a window in place, so you don't have to keep going to the dock to reopen it...  

  • How can I use the POST form in defining a SAMLCredentialMapperV2

    Hi,
    I am trying to configure the SAMLCredentialMapperV2 in our WebLogic Portal 10.3.2. There is a parameter called "POST form -
    The POST form used with this SAML Relying Party". Can anyone give me a hint of how I can use this form parameter, where I have to deploy this form
    and where can I find documentation about those parameters.
    Any help would be appreciated.
    Best Regards
    Edmund

    As far as i remember his parameter was optional
    http://www.oracle.com/technology/pub/articles/dev2arch/2006/12/sso-with-saml.html is probably a better article, dont know if has any updates since this was written for 9.2

Maybe you are looking for