logo
down
shadow

i have three places for users to log in, on the same page, how can i get all three buttons to work and three forms to pr


i have three places for users to log in, on the same page, how can i get all three buttons to work and three forms to pr

By : NinjaCatz
Date : November 17 2020, 11:55 AM
like below fixes the issue In the login button's onclick="login()" attribute, you can input a function parameter like this:
onclick="login(1)" where 1 can be a unique number for each form, ie. $div1 has onclick="login(1)", $div2 has onclick="login(2)" etc...
code :
var el = _("emaill" + formNum).value;
var pl = _("passwordl" + formNum).value;
...
<form id="loginform1" onsubmit="return false;">
    <input type="text" id="email1" placeholder="  enter email address" onfocus="emptyElement('statusl1')" maxlength="88">
    <input type="password" id="passwordl1" placeholder="  enter password" onfocus="emptyElement('statusl1')" maxlength="100">
    <button id="loginbtn1" onclick="login(1)">log in</button>
    <p id="statusl1"><br><br></p>
    <a href="/forgot_pass.php">forgot your password?</a>
</form>
<form id="loginform2" onsubmit="return false;">
    <input type="text" id="email2" placeholder="  enter email address" onfocus="emptyElement('statusl2')" maxlength="88">
    <input type="password" id="passwordl2" placeholder="  enter password" onfocus="emptyElement('statusl2')" maxlength="100">
    <button id="loginbtn2" onclick="login(2)">log in</button>
    <p id="statusl2"><br><br></p>
    <a href="/forgot_pass.php">forgot your password?</a>
</form>
<form id="loginform3" onsubmit="return false;">
    <input type="text" id="email3" placeholder="  enter email address" onfocus="emptyElement('statusl3')" maxlength="88">
    <input type="password" id="passwordl3" placeholder="  enter password" onfocus="emptyElement('statusl3')" maxlength="100">
    <button id="loginbtn3" onclick="login(3)">log in</button>
    <p id="statusl3"><br><br></p>
    <a href="/forgot_pass.php">forgot your password?</a>
</form>
function login(formNum){
    var el = _("emaill" + fornNum).value;
    var pl = _("passwordl" + fornNum).value;
    if(el == "" || pl == ""){
        _("statusl" + fornNum).innerHTML = "<br>please complete the form";
    } else {
        _("loginbtn" + fornNum).style.display = "none";
        _("statusl" + fornNum).innerHTML = 'please wait...';
        var ajax = ajaxObj("POST", "login.php");
        ajax.onreadystatechange = function() {
            if(ajaxReturn(ajax) == true) {
                if(ajax.responseText == "login_failed"){
                    _("statusl" + fornNum).innerHTML = "login was unsuccessful, please try again.";
                    _("loginbtn" + fornNum).style.display = "block";
                } else {
                    location.reload();
                }
            }
        }
        ajax.send("el="+el+"&pl="+pl);
    }
}


Share : facebook icon twitter icon
Using multiple forms, submit buttons on an ASP.NET web forms page

Using multiple forms, submit buttons on an ASP.NET web forms page


By : spiritabsolute
Date : March 29 2020, 07:55 AM
This might help you You may use Validation Groups to cause only required text boxes validation on specific button click. And then in event handler to concrete button you may execute specific logic.
four forms, Four buttons, four links, one page. Is there a better way?

four forms, Four buttons, four links, one page. Is there a better way?


By : JackOfAll
Date : March 29 2020, 07:55 AM
I wish this helpful for you Thank you. Turns out You would want something very similar to answers above. But for some reason I wasn't understanding. here is my html code:
code :
<body>
<p>Deliveries<p>
<a href="KFC_Menu.html">KFC</a>  #This part -> >KFC</a> gives you the text that appears on the button. The <a href="KFC_Menu.html"> will take you to the KFC_Menu page.

<br>
<a href="Create_Order.html">Create Your Own Order</a>
a {
text-decoration: none;
font-size: 24px;
font-family: sans-serif, arial;
font-weight: bold;
background-color: blue;
color: #ffffff;
padding: 8px;
border: 2px solid grey;
border-radius: 10px;
How can I remove the 'Next' and 'Previous' buttons from multiple forms for iPhone users?

How can I remove the 'Next' and 'Previous' buttons from multiple forms for iPhone users?


By : pau 28
Date : March 29 2020, 07:55 AM
I hope this helps . For example, if I have the following code: , You can accomplish this with negative tab indexes on each input.
code :
<form id="one">
    <input type="text" tabindex="-1">
</form>

<form id="two">
    <input type="text" tabindex="-2">
</form>
<form id="a">
    <input type="text">
    <input type="text">
</form>

<form id="b">
    <input type="text">
    <input type="text">
</form>

<form id="c">
    <input type="text">
    <input type="text">
</form>
// jQuery
var $allInputs = $("input"),
    numInputs = $allInputs.length;

// Update the tab indexes when an input is focused.
$("form").on("focus", "input", function() {
    var $activeForm = $(this).closest("form"),
        $activeFormInputs = $activeForm.find("input");

    // Make the inputs on all inactive forms negative.
    $.each($allInputs, function(i) {
        var $parentForm = $(this).closest("form");

        if ($parentForm != $activeForm) {
            $(this).attr("tabindex", -(numInputs - i));
            $(this).val(-(numInputs - i));
        }
    });

    // This form is active; use positive tab indexes.
    $.each($activeFormInputs, function(i) {
        $(this).attr("tabindex", ++i);
        $(this).val(i)
    });   
});

// Focus the first input.
$("#a").find("input").first().focus();
I have two forms in a page. How to set the jQuery script not to affect both forms buttons?

I have two forms in a page. How to set the jQuery script not to affect both forms buttons?


By : chair
Date : March 29 2020, 07:55 AM
will help you You have to use selectors like others say. Here's the modification to your jsfiddle: http://jsfiddle.net/baW53/1/
Basically, if its the initial call, we change the properties of all the buttons, i.e, buttons with class submit else we find the button which is a sibling of the dropdown and use its id.
code :
if (e) {
        var btn = "#" + jq(this).siblings('button').attr('id');
} else {
        var btn = ".submit";
}
Django Beginner Forms, not able to make two forms work on one template page

Django Beginner Forms, not able to make two forms work on one template page


By : user7063708
Date : March 29 2020, 07:55 AM
hope this fix your issue You have two separate views, and they only return a specific form. In your template you repeat the code, therefore you get it twice. A return supports any number of forms. In your view you could do like:
code :
form1 = AmatForm()
form2 = AmatForm2()

args = {
'form2' = form1
'form2' = form2
}
return render(request, self.template_name, args)
{{ form1.as_p }}
{{ form2.as_p }}
Related Posts Related Posts :
  • How to debug Vue application with google chrome
  • html 5 web app cache download complete javascript alert?
  • Ember.js setupController fired only once
  • How to validate a currency input
  • How to convert my Array of data to key & value pair
  • Statistics circles in CSS
  • So I wanted to make a trig solver in javascript?
  • Showing HighCharts series name on x-axis and in legend
  • In Rails, how can we pass parameters in script?
  • Build Fails: `npm rebuild node-sass --force`
  • Angular Datepicker change dateformat
  • Trying to extract data from between two sets of characters
  • Configuring Jest in WebStorm
  • Uncaught Error: Syntax error, unrecognized expression: tr.ec_portfolio_title,
  • JQuery fading in fading out continuously
  • Unexpected end of input (Line 1) and Undefined Function?
  • How to animate the width of a div slowly with jquery
  • JavaScript + RegEx Complications- Searching Strings Not Containing SubString
  • SignalR - Unable to get property 'client' of undefined or null reference
  • full calendar not displaying when loaded (with backbone)
  • Angular: Update service and share data between controllers
  • ReplaceAll Google script
  • Search for matching LI items in separate UL
  • Access arguments of an... argument
  • Customizing Google custom search jsapi (query strings)
  • React | Can´t load Images > Module not found
  • Dynamically creating buttons in DOJO
  • 404 Not Found in AJAX post call
  • How do I find out, using javascript, what software opened and running my application?
  • Javascript to check the status of wireless connection
  • StarDict support for JavaScript and a Firefox OS App
  • Phonegap event Resume
  • call javascript function on ENTER key press?
  • When is the best time to remove no-js classes from the html tag
  • Recommended email sending languages
  • setInterval not working properly with chrome
  • Does IE create new scope for each script tag?
  • Uncaught SyntaxError: Unexpected token < Underscore and parse issues
  • How to pass captured URL to Email Body in HTML
  • How to structure default nested resources?
  • Store all the keys of a JSON object in a variable
  • Need an efficient way to group the Array of object in javascript
  • a sensible approach to highcharts x-axis labels
  • IDE autocompletion for javascript AMD loading style
  • Bootstrap menu disappears after first click setting the ul style to none
  • split ajax json response errors in each field
  • how to add javascript in head in cmsms
  • REGEX: Finding the correct occurrence order of some given special characters in a string
  • How do you preserve a JavaScript date's time zone from browser to server, and back?
  • Return binary result from phantomjs webserver
  • must be listed in the web_accessible_resources manifest key in order to be loaded by pages outside the extension.
  • Replacing a substring of an element's text with another string
  • How do I filter marks greater than or equal to 90 in this array?
  • Modify the text of my radio input button?
  • Clicking on status bar does not scroll to top of app (Trigger.io)
  • Mocha JS: How to highlight specific assertion failure?
  • $.getJSON jquery parsing to HTML
  • Find items of a certain class (a) that are also in other classes (b,c,d)
  • Setting different images for D3 force-directed layout nodes
  • Integrating Dropzone.js with angular
  • shadow
    Privacy Policy - Terms - Contact Us © ourworld-yourmove.org