Click here to Skip to main content
15,887,746 members
Home / Discussions / JavaScript
   

JavaScript

 
QuestionRequire Book/Link Which Covers following topics Pin
Member 1184123815-Jul-15 22:55
Member 1184123815-Jul-15 22:55 
AnswerRe: Require Book/Link Which Covers following topics Pin
Anil Vaghasiya17-Jul-15 4:10
professionalAnil Vaghasiya17-Jul-15 4:10 
AnswerRe: Require Book/Link Which Covers following topics Pin
Member 1176120322-Jul-15 3:02
Member 1176120322-Jul-15 3:02 
QuestionElement flickers on scroll Pin
Member 1183819814-Jul-15 21:11
Member 1183819814-Jul-15 21:11 
AnswerRe: Element flickers on scroll Pin
jkirkerx15-Jul-15 8:47
professionaljkirkerx15-Jul-15 8:47 
GeneralRe: Element flickers on scroll Pin
Member 1183819815-Jul-15 23:57
Member 1183819815-Jul-15 23:57 
GeneralRe: Element flickers on scroll Pin
jkirkerx16-Jul-15 8:45
professionaljkirkerx16-Jul-15 8:45 
QuestionLoop through textboxes in table and perform validation clientside Pin
colliek14-Jul-15 10:13
colliek14-Jul-15 10:13 
Hi,

I have about
XML
12 rows and each row contains 2 textboxes eg txtRateFrom txtRateTo.

Obviously, each textbox has a different name but it will always contain txtXXXFrom and txtXXXTo.

<table class="style1">
        <tr>

            <td>
                <asp:TextBox ID="txtRateFrom" runat="server"    </asp:TextBox>

            </td>
            <td>
               <asp:TextBox ID="txtRateTo" runat="server"></asp:TextBox></td>
        </tr>
        <tr>
            <td>
                <asp:TextBox ID="txtYieldFrom" runat="server"></asp:TextBox>

            </td>
            <td>
               <asp:TextBox ID="txtYieldTo" runat="server"></asp:TextBox></td>
        </tr>
        <tr>
            <td>
                 <asp:TextBox ID="txtCalFrom" runat="server"></asp:TextBox></td>
            <td>
                  <asp:TextBox ID="txtCalTo" runat="server"></asp:TextBox></td>
        </tr>

The fields aren't required and user doesn't have to fill in any textbox or he can fill in just one textbox. If he fills in To he doesn't have to fill in From.

The range he can enter in the textboxes are from 0-100. So I assume that if he only enters a To number the From value is 0.

If he enters From number only I assume the to is 100.

I need to do a few validations.

    Make sure only integers are entered as soon as user types text in the textboxes.
    Check that it's in the correct range. User can't enter for example 101.
    And make sure that the To field is bigger than the From field.

I need to show the user messages regarding the relevant error inside a validationsummary and also show * next to the td where the error occurs. If the error occurs for example in the txtratefrom textbox then next to Rate td i need to show Rate *.

What is the most efficient way of doing this?

Thanks

AnswerRe: Loop through textboxes in table and perform validation clientside Pin
Anil Vaghasiya14-Jul-15 19:34
professionalAnil Vaghasiya14-Jul-15 19:34 
GeneralRe: Loop through textboxes in table and perform validation clientside Pin
colliek14-Jul-15 20:03
colliek14-Jul-15 20:03 
Questionfunctions Pin
Member 1183686414-Jul-15 5:52
Member 1183686414-Jul-15 5:52 
AnswerRe: functions Pin
Shmuel Zang14-Jul-15 18:46
Shmuel Zang14-Jul-15 18:46 
AnswerRe: functions Pin
Member 1184785019-Jul-15 12:31
Member 1184785019-Jul-15 12:31 
QuestionFile Upload doesn’t work on Mobiles Pin
Praveen Raghuvanshi13-Jul-15 6:57
professionalPraveen Raghuvanshi13-Jul-15 6:57 
QuestionBlob went away in IE 11? Pin
dbrenth10-Jul-15 10:06
dbrenth10-Jul-15 10:06 
Questionbrowser version detection window 7 machine and IE version 11 Pin
Member 118062861-Jul-15 5:39
Member 118062861-Jul-15 5:39 
AnswerRe: browser version detection window 7 machine and IE version 11 Pin
Richard Deeming1-Jul-15 7:52
mveRichard Deeming1-Jul-15 7:52 
Questionin MVC Edit page, how to check for null values? Pin
Member 1173386829-Jun-15 11:28
Member 1173386829-Jun-15 11:28 
AnswerRe: in MVC Edit page, how to check for null values? Pin
Richard Deeming30-Jun-15 1:22
mveRichard Deeming30-Jun-15 1:22 
GeneralRe: in MVC Edit page, how to check for null values? Pin
Member 1173386830-Jun-15 17:01
Member 1173386830-Jun-15 17:01 
GeneralRe: in MVC Edit page, how to check for null values? Pin
Afzaal Ahmad Zeeshan30-Jun-15 22:10
professionalAfzaal Ahmad Zeeshan30-Jun-15 22:10 
GeneralRe: in MVC Edit page, how to check for null values? Pin
Member 117338681-Jul-15 13:46
Member 117338681-Jul-15 13:46 
GeneralRe: in MVC Edit page, how to check for null values? Pin
Afzaal Ahmad Zeeshan1-Jul-15 14:50
professionalAfzaal Ahmad Zeeshan1-Jul-15 14:50 
GeneralRe: in MVC Edit page, how to check for null values? Pin
Richard Deeming1-Jul-15 1:17
mveRichard Deeming1-Jul-15 1:17 
GeneralRe: in MVC Edit page, how to check for null values? Pin
Member 117338681-Jul-15 13:56
Member 117338681-Jul-15 13:56 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.