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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T01:05:29+00:00 2026-06-11T01:05:29+00:00

I’ve done a website in which the user needs to click on a button

  • 0

I’ve done a website in which the user needs to click on a button after he fills a textbox. When he presses the image changes (it is like a slidshow on command). My problem is that when you touch “enter” instead of clicking with mouse, it doesn’t make the fade effect.

The website is this, so that you can try: http://www.tuttoscorre.net/esame-storia-arte-moderna.php

How con I handle this?

The purpose of the website is to store in a javascript array the answer written in the textbox to show it at the end of the slideshow (10 slides).

Here is the code of the button and of the slideshow:

    <script type="text/javascript">
        //Dichiaro Array Globale
        var risposte = new Array();
        var count = 0;
        $('.risultati').css({opacity: 0.0});

        //Salvo risposta, svuoto text, proseguo con le slide
        function conferma(frm) {
            if (frm.nome.value == "") alert("Non hai scritto nulla!");
            else {
                risposte[count] = frm.nome.value;
                count = count + 1;
                frm.nome.value = "";
                prossima();
            }
        }

        //Nuova slide sempre verso dx
        function prossima(frm) {
            var $active = $('#slideshow img.active');

            if (!$active.next('img').length) {
                risultati();
            } else {
                var $next = $active.next(); 

                $next.css({opacity: 0.0})
                    .addClass('active')
                    .animate({opacity: 1.0}, 1000, function() {
                        $active.removeClass('active');
                    });
            }

        }

        //Tolgo slide e mostro risultati
        function risultati() {
            $('#slideshow').animate({opacity: 0.0}, 1000);
            $('#compila').animate({opacity: 0.0}, 1000);
            $('#risultati').animate({opacity: 1.0}, 1000, function() {
                $('#risultati').addClass('visibile');
            });

            $('#1').append(risposte[0] + "<br/>Risposa corretta: " + "<?php echo $soluzioni[0]; ?>");
            $('#2').append(risposte[1]+ "<br/>Risposa corretta: " + "<?php echo $soluzioni[1]; ?>");
            $('#3').append(risposte[2]+ "<br/>Risposa corretta: " + "<?php echo $soluzioni[2]; ?>");
            $('#4').append(risposte[3]+ "<br/>Risposa corretta: " + "<?php echo $soluzioni[3]; ?>");
            $('#5').append(risposte[4]+ "<br/>Risposa corretta: " + "<?php echo $soluzioni[4]; ?>");
            $('#6').append(risposte[5]+ "<br/>Risposa corretta: " + "<?php echo $soluzioni[5]; ?>");
            $('#7').append(risposte[6]+ "<br/>Risposa corretta: " + "<?php echo $soluzioni[6]; ?>");
            $('#8').append(risposte[7]+ "<br/>Risposa corretta: " + "<?php echo $soluzioni[7]; ?>");
            $('#9').append(risposte[8]+ "<br/>Risposa corretta: " + "<?php echo $soluzioni[8]; ?>");
            $('#10').append(risposte[9]+ "<br/>Risposa corretta: " + "<?php echo $soluzioni[9]; ?>");
        }

    </script>

And this is the form with the button:

        <form id="compila">
                <input id="enterTxt" class="okText" type="text" name="nome" />
                <input id="enterButt" class="okIcon" type="Button" value="ok" onClick="conferma(this.form)">
            </form>

Thanks a lot.

  • 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-11T01:05:30+00:00Added an answer on June 11, 2026 at 1:05 am

    You must use .preventDefault() on event in your function which send form.

    Documentation

    Or use just:

    $("#compila").submit(function() {
        conferma(this);
        return false;
    });
    

    My answer use JQuery.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

For some reason, after submitting a string like this Jack’s Spindle from a text
I used javascript for loading a picture on my website depending on which small
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I would like to run a str_replace or preg_replace which looks for certain words
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I would like to count the length of a string with PHP. The string
I am trying to understand how to use SyndicationItem to display feed which is
I've got a string that has curly quotes in it. I'd like to replace
I am trying to render a haml file in a javascript response like so:
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.