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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T22:38:17+00:00 2026-05-26T22:38:17+00:00

I have the following input button: <input type=button value=Log On onclick=TryLogon(@Model) style= height:25px; width:75px/>

  • 0

I have the following input button:

<input type="button" value="Log On" onclick="TryLogon(@Model)" style=" height:25px; width:75px"/>

And I want to pass the Model as a JSON param to the TryLogon function:

function TryLogon(model) {

    $.getJSON("/CertificateWebSite/Account/LogOnHelper", model, OnLogonResult);

}

How is it done correctly?

  • 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-05-26T22:38:17+00:00Added an answer on May 26, 2026 at 10:38 pm

    @Model won’t be bound to anything that didn’t exist on the initial page load.

    Try changing how you’re doing your log on click and what is being passed:

    <input type="button" value="Log On" id="logOnButton" />
    
    <script type="text/javascript">
        $(function(){
            $("#logOnButton").click(function(){
                var data = { username: $("#username").val(), password: $("#password").val() };
                $.getJSON("/CertificateWebSite/Account/LogOnHelper", data, OnLogonResult);
            });
        });
    </script>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following page: <div style=display: inline> <input type=button id=txt value=Add TextBox style=
So I have the following html: <div id=divForComponents> <input type=button value=+ onclick=addFilter('divForComponents')/> </div> And
I have the following html button <td><form id=form2 name=form2 method=post onclick=../cgi-bin/py/GuestBookEntry.py> <input type=submit name=gBookSrib
I have the following HTMl: <input id=brandID name=brandID type=hidden value= /> <select id=selectList class=textfield70pc
i have the following code : <input type=text value=<?php echo $_GET['msg']; ?>> This input
I have the following HTML <form id=create_form name=create_form action= method=post> <input name=type id=type value=individuel
I have the following form: <form action= method=get> <input name=form1 type=radio onclick=document.forms[0].testbox.value='0.00'; /> <input
I have some jQuery setting the value on an input[type=text] like so: if(theVal==EPC/Floorplan){ $('#s3').val(£100.00).attr(disabled,disabled);
I am currently styling an <input type='button'/> element with the following CSS: background: transparent
I have the following input: <node TEXT=txt> <node TEXT=txt> <node TEXT=txt/> <node TEXT=txt/> </node>

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.