Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6814701
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T20:43:11+00:00 2026-05-26T20:43:11+00:00

I’m having trouble submitting some hidden form data via post from the following function:

  • 0

I’m having trouble submitting some hidden form data via post from the following function:

function displayCertificate()
{
    window.open("../mailer.php","certificate","width=500,height=400,status=1")
} 
var sHTML = "";
sHTML += '<FORM id="quizResults" method="POST" action="/articulate/mailer.php" enctype="text/plain" target="certificate" onSubmit="displayCertificate()">';
sHTML += '<INPUT TYPE="hidden" NAME="name" VALUE=\'' + g_arrResults[0].strStudentResponse + '\'>';
sHTML += '<INPUT TYPE="hidden" NAME="email" VALUE=\'' + g_arrResults[1].strStudentResponse + '\'>';
sHTML += '<br><input type="submit"><br>';
sHTML += '</FORM>';
alert(g_arrResults[0].strStudentResponse);
document.getElementById("divEmail").innerHTML = sHTML;
document.getElementById("quizResults").submit();

What I need is for a new window to open up with the information I sent to it via POST. The window pops up fine, and firebug shows that the POST was successful but the data doesn’t seem to be sent to my new window.

Here is my mailer.php:

<?php
print("name: ".htmlspecialchars($_POST['name']));
print("email: ".htmlspecialchars($_POST['email']));
?>

Very simple yet it is outputting: name: email:

Can anyone see why this would be happening? My solution has to be plain javascript (so no libraries please).

Thanks.

edit in response to alessioalex:

Output of console.log(g_arrResults) is an array like so:

[QuestionResult { nQuestionNum=1, strQuestion=" ", more...}, QuestionResult { nQuestionNum=2, strQuestion=" ", more...}, QuestionResult { nQuestionNum=3, strQuestion="A, B or C?", more...}, QuestionResult { nQuestionNum=4, strQuestion="A, B or C?", more...}, QuestionResult { nQuestionNum=5, strQuestion="A, B or C?", more...}, QuestionResult { nQuestionNum=6, strQuestion="A, B or C?", more...}, QuestionResult { nQuestionNum=7, strQuestion="A, B or C?", more...}, QuestionResult { nQuestionNum=8, strQuestion="A, B or C?", more...}, QuestionResult { nQuestionNum=9, strQuestion="A, B or C?", more...}, QuestionResult { nQuestionNum=10, strQuestion="A, B or C?", more...}, QuestionResult { nQuestionNum=11, strQuestion="A, B or C?", more...}, QuestionResult { nQuestionNum=12, strQuestion="A, B or C?", more...}]

Here is an example of the first object in the array:

bFound
    false

dtmFinished
    Date {Thu Nov 17 2011 12:54:29 GMT+0000 (GMT Standard Time)}

nPoints
    "0"

nQuestionNum
    1

strCorrectResponse
    "&nbsp;"

strInteractionId
    "I4e28818f-4014-418c-a6e4-863679014098"

strLatency
    "1862"

strObjectiveId
    "I4e28818f-4014-418c-a6e4-863679014098"

strQuestion
    " "

strResult
    "neutral"

strStudentResponse
    "Peter Rabbit"

strType
    "fillin"
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T20:43:12+00:00Added an answer on May 26, 2026 at 8:43 pm

    Remove the window.open code and try adding target=”_blank” to your form:

    <FORM target="_blank" id="quizResults" method="POST" ...>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
For some reason, after submitting a string like this Jack’s Spindle from a text
I have a text area in my form which accepts all possible characters from
I want to construct a data frame in an Rcpp function, but when I
I'm having trouble keeping the paragraph square between the quote marks. In firefox the
I have some data like this: 1 2 3 4 5 9 2 6
I have just tried to save a simple *.rtf file with some websites and
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
I am currently running into a problem where an element is coming back from
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.