User Profile

Collapse

Profile Sidebar

Collapse
afaheem
afaheem
Last Activity: Oct 27 '08, 08:43 PM
Joined: Sep 10 '08
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • afaheem
    started a topic Start Time and End Time Validation

    Start Time and End Time Validation

    I have select boxes for starttime and endtime in hours, minutes and AM/PM.
    I need to validate the time so that end time should be greater than start time.
    The AM and PM should also be validated.

    Any help appreciated !

    below is my code
    Code:
    <HTML>
     <HEAD>
     <script>
    function checkTime(){
    		    var startTimeValue = document.getElementById("startTime");
    ...
    See more | Go to post

  • The solution works partially....it fails when I try to delete the selected items in the div . The items gets removed but when I try to add them back from the selectbox they dont get added 'cos I am maintaining a list of already selected items in the array.
    Please suggestions needed...
    See more | Go to post

    Leave a comment:


  • I need to keep the options ..it should be a copy of what I am selecting ....removing the selected items is not what I want
    See more | Go to post

    Leave a comment:


  • I need to check if the selected item is already available in the div and then not allow the user to add it again...any suggestions on how to proceed ?
    See more | Go to post

    Leave a comment:


  • afaheem
    started a topic Dont allow duplicate values in a dynamic div

    Dont allow duplicate values in a dynamic div

    I am selecting multiple items from a selectbox and on click of a button adding them dynamically to a <div>.
    I am adding it as children to the div ...something like checkbox + <selecteditem >.

    Next time when the user selects an option which he already added in the div, he should not be allowed to do so.
    how can i achieve this? a string match or how ? please send the code

    below is my code......
    See more | Go to post
    Last edited by acoder; Sep 17 '08, 10:59 PM. Reason: Added [code] tags

  • afaheem
    replied to Deleting dynamic checkbox
    I could get the newline thing working by using "\t" but still stuck with the addFromAddressB ook()....need suggestions !
    See more | Go to post

    Leave a comment:


  • afaheem
    replied to Deleting dynamic checkbox
    a)
    I made some modifications to the code and tested the below code...seems to be working fine.
    Code:
    for( var i = participants.length-1; i > -1; i-- )   
    			if( participants[ i ] .checked )
    			{
    								if( participants[i].nextSibling.nodeType == 3 )
    					participants[i].parentNode.removeChild( participants[i].nextSibling );
    				participants[ i ].parentNode.removeChild( participants[ i ] );
    ...
    See more | Go to post

    Leave a comment:


  • afaheem
    replied to Deleting dynamic checkbox
    [HTML]<div>
    <input type="checkbox" > This is text
    </div>
    [/HTML]
    The contents in the div are as above which I am creating dynamically.
    With your suggestion I am able to delete the checkboxes properly.
    In the removeParticpan ts() I also need to remove the textnode.

    I tried the below thing but not able to remove it in the loop.

    [CODE=javascript]function...
    See more | Go to post
    Last edited by acoder; Sep 12 '08, 11:45 AM. Reason: Added [code] tags

    Leave a comment:


  • afaheem
    replied to Deleting dynamic checkbox
    problem with looping
    ----------------------------------

    Thanks for the reply...I tried the code, it works, though it doesnt solve my problem. Let me explain...for example I am adding 6 checkboxes, all the 6 checkboxes are checked, now I uncheck 2 of them...say the last two.
    I have , now, first 4 checkboxes checked and the last two unchecked.

    When I try to remove them, only the 1st 2 checked checkboxes...
    See more | Go to post

    Leave a comment:


  • afaheem
    started a topic Deleting dynamic checkbox

    Deleting dynamic checkbox

    I am trying to create checkbox dynamically and am appending it into a div.
    The problem comes when I try to delete selected checkbox. There seem to be some problem which I am not able to figure out. The loop doesnt go properly...any suggestions on what's going wrong ? It's urgent !!

    Here's my code:

    [HTML]<html>
    <head>
    <base/>
    <link rel="stylesheet "...
    See more | Go to post
    Last edited by gits; Sep 10 '08, 09:22 PM. Reason: added code tags
No activity results to display
Show More
Working...