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 8574251
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T19:25:57+00:00 2026-06-11T19:25:57+00:00

I have to show redirect the page with increment by one using javascript function.

  • 0

I have to show redirect the page with increment by one using javascript function. But When I try this I got NaN Error . Can anyone please help me to fix the Problem.I Have attached My Source Below. like this quiz.php?qusId=NaN.

    <script type="text/javascript">
        function handler(var1,quizId) {
            alert(var1);
            var id = parseInt(quizId);
            window.location = "quiz.php?qusId="+parseInt(quid(id));
        }
        function quid(quzId){
            if(quzId == 1){
                return 1;
            }else{
                return quzId++;
            }
        }
    </script>
</head>
<body>
    <?php 
        $qusId=$_GET['qusId'];
        ?>
        <form action="test.php" method="POST">
            <?php
                $result = select("SELECT * FROM questions WHERE question_id='$qusId'");
                //$row = mysql_fetch_array($result);
                $i=$_GET['qusId'];
                while($row = mysql_fetch_array($result))
                {
                    ?>
                        <table width="581" height="299" border="1">
                            <tr>
                                <td>Union Assurance Questionnaire</td>
                            </tr>
                            <tr>
                                <td>
                                    <?php 
                                        echo $i.'.' .$row['questions']; 
                                        $i++;
                                    ?>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <?php 
                                        $qId=$row['question_id'];
                                        $result1=select("SELECT * FROM answers WHERE questionId='$qId' ORDER BY RAND()");
                                        while($row1=mysql_fetch_array($result1)){
                                            ?>
                                                <input type="radio" name="answers" value="<?php echo $row1['answers'];?>"  onclick="handler('<?php echo $row1["feedback"]; ?>,<?php echo $qusId;?>')" /><?php echo $row1['answers']; ?><br/>
                                            <?php 
                                        } 
                                    ?>
                                    &nbsp;
                                </td>
                            </tr>
                            <tr>
                                <td>&nbsp;</td>
                            </tr>
                        </table>
                    <?php
                }
            ?>
        </form>
  • 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-11T19:25:58+00:00Added an answer on June 11, 2026 at 7:25 pm

    In your click handler, you’ve got

    handler('<?php echo $row1["feedback"]; ?>,<?php echo $qusId;?>')
    

    You’ve put the single quotes in the wrong place – it’s being passed into your ‘handler’ function as a single parameter. Try instead:

    handler('<?php echo $row1["feedback"]; ?>',<?php echo $qusId;?>)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have to show slideshow of images. But at one moment I know only
I have to show one row per one bill in my program, but one
I have a simple question, below My JS function is to redirect the page
I want to show dialog message to confirm the redirect, but I have my
I have Divs show and hide (with an animation) using the following script (I
I have a model, Product, and on the show view for this model, I
In a functions.php I use a redirect to show a profile page when a
I have searched related questions to this, but most of them are related to
I have a Pages model with field 'customURL'. I can do page#show at '/:customurl'.
I am trying to redirect a page using HTTP 410 status using php header

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.