×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

android adobe reader button action with javascript not working

android adobe reader button action with javascript not working

android adobe reader button action with javascript not working

(OP)
Hi

I created a pdf mathematic scool book for children
this book has the option to submit every page as a form to the teacher
on every page on the bottom the student has a button when he clicks it
i run a javascript code that sends the field on the page to the teachers email as a fdf file

all is working grate on pc

on android when i click the submit button nothig happens.

this is the code


CODE --> javascript

/ send to teacher
var currentDate = new Date()
var day = currentDate.getDate()
var month = currentDate.getMonth() + 1
var year = currentDate.getFullYear()
var todayDate = day + "/" + month + "/" + year; 
 
var lineBrake = "%0D%0A";
 
var teacherEmail = getField("email_teacher").value;
var teacherName = getField("name_teacher").value;
 
var studentEmail = getField("email_student").value;
var studentName = getField("name_student").value;
 
if(teacherEmail==""){
    app.alert("enter teachers email");
}
else if(teacherName==""){
    app.alert("enter teachers name");
}
else if(studentEmail==""){
    app.alert("enter student email");
}
else if(studentName==""){
    app.alert("enter students name");
}
else{
               
                var emailSubject = "work page from:" + studentName;
               
                var emailBody = "attached work page from:" + studentName + lineBrake + todayDate;
 
                 
    var aSubmitFields = new Array(
        "lesson1-page8-1a",
        "lesson1-page8-1b",
        "lesson1-page8-1c",
        "lesson1-page8-1d",
        "lesson1-page8-1e",
        "lesson1-page8-1f",
        "lesson1-page8-2b1",
        "lesson1-page8-2b2",
        "lesson1-page8-2b3",
        "lesson1-page8-2c1",
        "lesson1-page8-2c2",
        "lesson1-page8-2c3",
        "email_teacher",
        "name_teacher",
        "email_student",
        "name_student"       
    );
 
 
    this.submitForm({
      cURL: "mailto:"+teacherEmail+"?subject=" + emailSubject + "&body=" + emailBody,
      aFields: aSubmitFields,
      cSubmitAs: "FDF" // the default, not needed here
    });
} 

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close