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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T05:03:04+00:00 2026-05-14T05:03:04+00:00

I am trying to call my function named isUrgencyTypeValid from my javascript code but

  • 0

I am trying to call my function named isUrgencyTypeValid from my javascript code but it is not working. Please check what is the problem in my code.
Alert should get displayed which is not being displayed

My javascript function is not being called.

HTML Code

       <td colspan="2" align="center"><input id="btnSubmit" type="submit" value="submit" runat="server"/></td></tr>

jQuery Call function

        $("#btnSubmit").bind("click",function(){
        alert(); // this is running
        isUrgencyTypeValid();

        });

javascript implemented function

function isUrgencyTypeValid()
    {
        alert("asd");
        var i=0;
        for(i=0;i<$("radio[name='urgencyType']").length;i++)
            {
            if($("radio[name='urgencyType']")[i].checked)
                {
                alert($("radio[name='urgencyType']")[i].value);                 
                return true;
            }           
        return false;
    }   

More description about my form is here

<form runat="server" name="myPage">
    <table style="width: 100%;" cellpadding="5" cellspacing="5">
        <caption>
            Computer Support / Service Request
        </caption>
        <tr><td>First Name</td>
            <td><input id="txtFirstName" type="text" value="First Name" runat="server"/><span class="error"></span></td></tr>

        <tr>
            <td>Last Name</td>
            <td><input id="txtLastName" type="text" value="Last Name" runat="server"/><span class="error"></span></td></tr>

        <tr>
            <td>Email Address</td>
            <td><input id="txtEmailAddress" type="text" value="Email Address" runat="server"/><span class="error"></span></td></tr>    

        <tr>
            <td>Phone No</td>
            <td><input id="txtPhoneNo" type="text" value="Phone No" runat="server" /><span class="error"></span></td></tr>

        <tr>
            <td>Do you have text messaging</td>
            <td>
                <span>Yes</span><input id="rdoYes" value="Yes" type="radio" runat="server"/>
                <span>No</span><input id="rdoNo" value="No" type="radio" runat="server"/><span class="error"></span>
            </td></tr>

        <tr>
            <td>Description of request*: </td>
            <td><textarea id="txtDescription" cols="50" rows="10" runat="server"></textarea><span class="error"></span><span id="lengthCount"></span></td></tr>

        <tr>
            <td>Urgency of this support request:</td>
            <td>
                <input id="rdoAnyTime" name="urgencyType" value="Anytime" type="radio" runat="server"/><span>Anytime</span><br />
                <input id="rdoCplDays" name="urgencyType" value="In the next couple of days" type="radio" runat="server"/><span>In the next couple of days</span><br />
                <input id="rdoToday" name="urgencyType" value="Today" type="radio" runat="server"/><span>Today</span><br />
                <input id="rdoUrgent" name="urgencyType" value="This is extremely urgent...I cannot wait!" type="radio" runat="server"/><span>This is extremely urgent...I cannot wait!</span><br />
                <input id="rdoTalkSometime" name="urgencyType" value="Please contact me and we'll talk about it" type="radio" runat="server"/><span>Please contact me and we'll talk about it</span><br /><span class="error"></span>
            </td></tr>

        <tr>
            <td colspan="2" align="center">Captcha To Be implemented.</td></tr>

        <tr>
            <td></td>
            <td><input id="chkRequestCopy" type="checkbox" runat="server"/>Please send me a copy of this service request</td></tr>

        <tr>
            <td colspan="2" align="center"><input id="btnSubmit" type="submit" value="submit" runat="server"/></td></tr>

    </table>    
</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-05-14T05:03:05+00:00Added an answer on May 14, 2026 at 5:03 am

    I copied your code and ran into the same issue. Then I looked at it closer and noticed you are missing a closing bracket in your isUrgencyTypeValid() function. The closing bracket for your for loop is missing. Firefox Error Console will also show this.

    Once I added the bracket the alert worked fine.

    function isUrgencyTypeValid()
    {
        alert("asd");
        var i=0;
        for(i=0;i<$("radio[name='urgencyType']").length;i++)
            {
            if($("radio[name='urgencyType']")[i].checked)
            {
                alert($("radio[name='urgencyType']")[i].value);                 
                return true;
            }  
        } //this was missing
        return false;
    }   
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 384k
  • Answers 384k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Yes, it is possible. Step 1: Compile the Code Use… May 14, 2026 at 11:11 pm
  • Editorial Team
    Editorial Team added an answer Depends on the grand schema of things (hoping y'all got… May 14, 2026 at 11:11 pm
  • Editorial Team
    Editorial Team added an answer Continuing with my original comment, I would recommend to have… May 14, 2026 at 11:11 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.