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

  • SEARCH
  • Home
  • 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 8857885
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T14:41:53+00:00 2026-06-14T14:41:53+00:00

I’m developing a feedback app for a tablet with phonegap-android. On the main page

  • 0

I’m developing a feedback app for a tablet with phonegap-android.
On the main page I have a registration form and on the secondary page I have a star rating with six questions where the user must rate each question. I want to store the results in MySQL. My question is how could I connect the data from the pages because I want to know exactly what each person vote to make a report.

First page looks aprox. like this:

<!DOCTYPE html> 
<html> 
    <head> 
        <title>Contact with Validation</title> 
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> 
        <script type="text/javascript" src="js/jquery.js"></script> 
        <script type="text/javascript" src="js/jquery.validate.js"></script> 
         <script type="text/javascript" src="js/jquery.form.js"></script> 

        <script type="text/javascript">
            $('document').ready(function(){

            $('#form').validate({
                    rules:{
                        "name":{
                            required:true,
                            maxlength:40
                        },

                        "email":{
                            required:true,
                            email:true,
                            maxlength:100
                        },

                        "message":{
                            required:true
                        }},

                    messages:{
                        "name":{
                            required:"This field is required"
                        },

                        "email":{
                            required:"This field is required",
                            email:"Please enter a valid email address"
                        },

                        "message":{
                            required:"This field is required"
                        }},

                    submitHandler: function(form){
                      $(form).ajaxSubmit({
        target: '#preview', 
        success: function() { 
        $('#formbox').slideUp('fast'); 
        } 
    }); 

                    }

            })

        });
        </script> 


        <style type="text/css">
        ul
            {
                list-style:none;
                width:100%;
                margin: 0;
                padding: 0;
            }
            ul li
            {   
                padding-top:5px;
                padding-bottom:5px;
                margin-bottom:10px;
                clear:left;
                position: relative;

            }
            ul li label
            {
                width:20%;
                display: block;
                margin-right:2%;
                text-align:left;
                line-height:22px;
            }
            ul li span.error
            {
                font: 11px arial;
                color:red;
                margin-left:8px;
                line-height:22px;
            }
            ul li span.passerror
            {
                display: block;
                font: 11px arial;
                color:red;
                margin-left:8px;
                line-height:22px;
            }
            ul li .shortfield{
                width: 45px;
            }

         </style> 
    </head> 
    <body> 
    <a href="http://9lessons.info">http://9lessons.info</a>
       <div id="preview"></div>
        <div id="formbox"> 
            <form name="form" id="form" action="submit.php" method="post">
                <ul id="ngothastyle3">
                    <li>
                        <label>Name</label>
                        <input type="text" name="name" class="" maxlength="40" />
                    </li>

                    <li>
                        <label>Email</label>
                        <input type="text" name="email" class="" maxlength="100" />
                    </li>
                    <li>
                        <label>Message</label>
                        <textarea name="message" rows="5" cols="45" class=""></textarea>
                    </li>
                    <li>
                        <label>&nbsp;</label>
                        <input type="submit" value="Submit">
                    </li>
                </ul>

            </form>            </div> 






    </body> 

</html> 

And this is the second one with the star rating:

</head>
<body>
<div id="tab-Testing">

<script>
$(function(){
 $('#tab-Testing form').submit(function(){
  $('.test',this).html('');
  $('input',this).each(function(){
   if(this.checked) $('.test',this.form).append(''+this.name+': '+this.value+'<br/>');
        });
  return false;
 });
});
</script>

<div class="Clear">&nbsp;</div>
<form id="form1">
<strong style='font-size:150%'>Test 1</strong> - A blank form
<table width="100%" cellspacing="10"> <tr>
  <td valign="top" width="">
   <table width="100%">
    <tr>
     <td valign="top" width="50%">
<div class="Clear">

    Intrebarea 1:bla bla bla

   <input class="star required" type="radio" name="test-1-rating-1" value="1"/>
    <input class="star" type="radio" name="test-1-rating-1" value="2"/>
    <input class="star" type="radio" name="test-1-rating-1" value="3"/>
    <input class="star" type="radio" name="test-1-rating-1" value="4"/>
    <input class="star" type="radio" name="test-1-rating-1" value="5"/>
   </div>
   <br/>
   <div class="Clear">

    Intrebarea 2:bla bla bla

    <input class="star required" type="radio" name="test-1-rating-2" value="1"/>
    <input class="star" type="radio" name="test-1-rating-2" value="2"/>
    <input class="star" type="radio" name="test-1-rating-2" value="3"/>
    <input class="star" type="radio" name="test-1-rating-2" value="4"/>
    <input class="star" type="radio" name="test-1-rating-2" value="5"/>
   </div>
   <br/>
   <div class="Clear">

        Intrebarea 3:bla bla bla

    <input class="star required" type="radio" name="test-1-rating-3" value="1"/>
    <input class="star" type="radio" name="test-1-rating-3" value="2"/>
    <input class="star" type="radio" name="test-1-rating-3" value="3"/>
    <input class="star" type="radio" name="test-1-rating-3" value="4"/>
    <input class="star" type="radio" name="test-1-rating-3" value="5"/>
   </div>
 <br>
   <div class="Clear">

        Intrebarea 4:bla bla bla

    <input class="star required" type="radio" name="test-1-rating-4" value="1" title="Worst"/>
    <input class="star" type="radio" name="test-1-rating-4" value="2" title="Bad"/>
    <input class="star" type="radio" name="test-1-rating-4" value="3" title="OK"/>
    <input class="star" type="radio" name="test-1-rating-4" value="4" title="Good"/>
    <input class="star" type="radio" name="test-1-rating-4" value="5" title="Best"/>
   </div>
   <br/>
   <div class="Clear">

        Intrebarea 5:bla bla bla

    <input class="star required" type="radio" name="test-1-rating-5" value="1"/>
    <input class="star" type="radio" name="test-1-rating-5" value="2"/>
    <input class="star" type="radio" name="test-1-rating-5" value="3"/>
    <input class="star" type="radio" name="test-1-rating-5" value="4"/>
    <input class="star" type="radio" name="test-1-rating-5" value="5"/>
   </div>
   <br/>
   <div class="Clear">

        Intrebarea 6:bla bla bla

    <input class="star required" type="radio" name="test-1-rating-6" value="1" />
    <input class="star" type="radio" name="test-1-rating-6" value="2" />
    <input class="star" type="radio" name="test-1-rating-6" value="3" />
    <input class="star" type="radio" name="test-1-rating-6" value="4" />
    <input class="star" type="radio" name="test-1-rating-6" value="5" />
   </div>
     </td>
    </tr>
   </table>
  </td>
  <td valign="top" width="5">&nbsp;</td>  <td valign="top" width="50">
   <input type="submit" value="Submit scores!" />  </td>
  <td valign="top" width="5">&nbsp;</td>  <td valign="top" width="160">
   <u>Test results</u>:<br/><br/>
   <div class="test Smaller">
    <span style="color:#FF0000">Results will be displayed here</span>
   </div>
  </td>
 </tr>
</table>
</form>


</body>
</html>
  • 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-06-14T14:41:54+00:00Added an answer on June 14, 2026 at 2:41 pm

    You use jquery-mobile to have both the pages into one. based on the html5 tags, jqm can identify the pages.

    On the success of the ajax call, $.mobile.changePage would be called which will display the page 2 (which is actually a div within the same page). You might want to check the jquery-mobile documentation for more details and function.

    But here is the code at least to get you started.

    <!-- language-all: lang-html -->
    
    <html> 
        <head> 
            <title>Contact with Validation</title>
            <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> 
            <link rel="stylesheet" href="http://code.jquery.com/mobile/1.2.0/jquery.mobile-1.2.0.min.css" />
            <script src="http://code.jquery.com/jquery-1.8.2.min.js"></script>
            <script src="http://code.jquery.com/mobile/1.2.0/jquery.mobile-1.2.0.min.js"></script>
            <script type="text/javascript" src="js/jquery.validate.js"></script> 
            <script type="text/javascript" src="js/jquery.form.js"></script> 
    
            <script type="text/javascript">
            $('document').ready(function () {
    
                $('#form').validate({
                    rules: {
                        "name": {
                            required: true,
                            maxlength: 40
                        },
                        "email": {
                            required: true,
                            email: true,
                            maxlength: 100
                        },
                        "message": {
                            required: true
                        }},
                    messages: {
                        "name": {
                            required: "This field is required"
                        },
                        "email": {
                            required: "This field is required",
                            email: "Please enter a valid email address"
                        },
                        "message": {
                            required: "This field is required"
                        }},
                    submitHandler: function (form) {
                        $("#form1").ajaxSubmit({
                            target: '#preview',
                            success: function () {
                                $('#formbox').slideUp('fast');
                                $.mobile.changePage("#two");
                            }
                        });
    
                    }
    
                })
    
            });
    
            $(function () {
                $('#tab-Testing form2').submit(function () {
                    $('.test', this).html('');
                    $('input', this).each(function () {
                        if (this.checked)
                            $('.test', this.form).append('' + this.name + ': ' + this.value + '<br/>');
                    });
                    return false;
                });
            });
            </script> 
    
            <style type="text/css">
                ul
                {
                    list-style:none;
                    width:100%;
                    margin: 0;
                    padding: 0;
                }
                ul li
                {   
                    padding-top:5px;
                    padding-bottom:5px;
                    margin-bottom:10px;
                    clear:left;
                    position: relative;
    
                }
                ul li label
                {
                    width:20%;
                    display: block;
                    margin-right:2%;
                    text-align:left;
                    line-height:22px;
                }
                ul li span.error
                {
                    font: 11px arial;
                    color:red;
                    margin-left:8px;
                    line-height:22px;
                }
                ul li span.passerror
                {
                    display: block;
                    font: 11px arial;
                    color:red;
                    margin-left:8px;
                    line-height:22px;
                }
                ul li .shortfield{
                    width: 45px;
                }
            </style> 
        </head> 
        <body> 
            <div data-role="page" id="one">
                <div data-role="content" >  
                    <a href="http://9lessons.info">http://9lessons.info</a>
                    <div id="preview"></div>
                    <div id="formbox"> 
                        <form name="form" id="form1" action="submit.php" method="post">
                            <ul id="ngothastyle3">
                                <li>
                                    <label>Name</label>
                                    <input type="text" name="name" class="" maxlength="40" />
                                </li>
                                <li>
                                    <label>Email</label>
                                    <input type="text" name="email" class="" maxlength="100" />
                                </li>
                                <li>
                                    <label>Message</label>
                                    <textarea name="message" rows="5" cols="45" class=""></textarea>
                                </li>
                                <li>
                                    <label>&nbsp;</label>
                                    <input type="submit" value="Submit">
                                </li>
                            </ul>
                        </form>           
                    </div> 
                </div>
            </div>
            <div data-role="page" id="two" data-theme="a">
                <div data-role="content" data-theme="a">    
                    <div id="tab-Testing">
                        <div class="Clear">&nbsp;</div>
                        <form id="form2">
                            <strong style='font-size:150%'>Test 1</strong> - A blank form
                            <table width="100%" cellspacing="10"> <tr>
                                    <td valign="top" width="">
                                        <table width="100%">
                                            <tr>
                                                <td valign="top" width="50%">
                                                    <div class="Clear">
                                                        Intrebarea 1:bla bla bla
                                                        <input class="star required" type="radio" name="test-1-rating-1" value="1"/>
                                                        <input class="star" type="radio" name="test-1-rating-1" value="2"/>
                                                        <input class="star" type="radio" name="test-1-rating-1" value="3"/>
                                                        <input class="star" type="radio" name="test-1-rating-1" value="4"/>
                                                        <input class="star" type="radio" name="test-1-rating-1" value="5"/>
                                                    </div>
                                                    <br/>
                                                    <div class="Clear">
                                                        Intrebarea 2:bla bla bla
                                                        <input class="star required" type="radio" name="test-1-rating-2" value="1"/>
                                                        <input class="star" type="radio" name="test-1-rating-2" value="2"/>
                                                        <input class="star" type="radio" name="test-1-rating-2" value="3"/>
                                                        <input class="star" type="radio" name="test-1-rating-2" value="4"/>
                                                        <input class="star" type="radio" name="test-1-rating-2" value="5"/>
                                                    </div>
                                                    <br/>
                                                    <div class="Clear">
                                                        Intrebarea 3:bla bla bla
                                                        <input class="star required" type="radio" name="test-1-rating-3" value="1"/>
                                                        <input class="star" type="radio" name="test-1-rating-3" value="2"/>
                                                        <input class="star" type="radio" name="test-1-rating-3" value="3"/>
                                                        <input class="star" type="radio" name="test-1-rating-3" value="4"/>
                                                        <input class="star" type="radio" name="test-1-rating-3" value="5"/>
                                                    </div>
                                                    <br>
                                                    <div class="Clear">
                                                        Intrebarea 4:bla bla bla
                                                        <input class="star required" type="radio" name="test-1-rating-4" value="1" title="Worst"/>
                                                        <input class="star" type="radio" name="test-1-rating-4" value="2" title="Bad"/>
                                                        <input class="star" type="radio" name="test-1-rating-4" value="3" title="OK"/>
                                                        <input class="star" type="radio" name="test-1-rating-4" value="4" title="Good"/>
                                                        <input class="star" type="radio" name="test-1-rating-4" value="5" title="Best"/>
                                                    </div>
                                                    <br/>
                                                    <div class="Clear">
                                                        Intrebarea 5:bla bla bla
                                                        <input class="star required" type="radio" name="test-1-rating-5" value="1"/>
                                                        <input class="star" type="radio" name="test-1-rating-5" value="2"/>
                                                        <input class="star" type="radio" name="test-1-rating-5" value="3"/>
                                                        <input class="star" type="radio" name="test-1-rating-5" value="4"/>
                                                        <input class="star" type="radio" name="test-1-rating-5" value="5"/>
                                                    </div>
                                                    <br/>
                                                    <div class="Clear">
                                                        Intrebarea 6:bla bla bla
                                                        <input class="star required" type="radio" name="test-1-rating-6" value="1" />
                                                        <input class="star" type="radio" name="test-1-rating-6" value="2" />
                                                        <input class="star" type="radio" name="test-1-rating-6" value="3" />
                                                        <input class="star" type="radio" name="test-1-rating-6" value="4" />
                                                        <input class="star" type="radio" name="test-1-rating-6" value="5" />
                                                    </div>
                                                </td>
                                            </tr>
                                        </table>
                                    </td>
                                    <td valign="top" width="5">&nbsp;</td>  <td valign="top" width="50">
                                        <input type="submit" value="Submit scores!" />  </td>
                                    <td valign="top" width="5">&nbsp;</td>  <td valign="top" width="160">
                                <u>Test results</u>:<br/><br/>
                                <div class="test Smaller">
                                    <span style="color:#FF0000">Results will be displayed here</span>
                                </div>
                                </td>
                                </tr>
                            </table>
                    </div>
                </div>
        </body>
    </html>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I have a text area in my form which accepts all possible characters from
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and
I'm trying to convert HTML to plain text. I get many &\#8217; &\#8220; etc.
I have been unable to fix a problem with Java Unicode and encoding. The
this is what i have right now Drawing an RSS feed into the php,
I have a small JavaScript validation script that validates inputs based on Regex. I

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.