Results 1 to 7 of 7

Thread: form

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Sep 2004
    Posts
    71

    form

    Hi Danial,

    I have a problem. Do you remember that time you help me to create the web page pageDan2.asp? Do you remember the part which move data. How do you do the javascript like the one you did on the addIP, removeIP and getIP.

    Thanks
    Irwin
    Attached Files Attached Files

  2. #2
    Big D Danial's Avatar
    Join Date
    Jul 2000
    Location
    ASP.Net Forum
    Posts
    2,877

    Re: form

    Quote Originally Posted by lchi
    Hi Danial,

    I have a problem. Do you remember that time you help me to create the web page pageDan2.asp? Do you remember the part which move data. How do you do the javascript like the one you did on the addIP, removeIP and getIP.

    Thanks
    Irwin
    Yes i remember, but what JavaScript do you need, i cant remember the JavaScript for AddIP,RemoveIP etc. Can you refresh my memory, or explain, i will see what i can do.

    Danial
    [VBF RSS Feed]

    There is a great war coming. Are you sure you are on the right side? Atleast I have chosen a side.

    If I have been helpful, Please Rate my Post. Thanks.

    This post was powered by :

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Sep 2004
    Posts
    71

    Re: form

    Hi Danial,

    Code:
    function Submit(action)
    {
    	//alert(action=="AddIP")
    
    	if (action=="GetIP")
    	{
    		if (document.formTable.selTable.selectedIndex==0)
    		{
    			alert("Please select a Table Name");
    			document.formTable.selTable.focus();
    			return;
    		}
    
    	}
    }
    This is the javascript you did for the GetIP button. But now I want one javascript on the moveData part. I did something like this, but it did not seem to work. I set the form to check it onSubmit.
    Code:
    function Check(action)
    {
    
    	if ((document.moveData.VB.value=="") && (document.moveData.BAT.value==""))
    	{
    		alert("Please select a VB Script & Batch file");
    		return;
    	}
    	
    	if (document.moveData.VB.value=="")
    	}
    		alert("Please select a VB Script");
    		return;
    	{
    	
    	if (document.moveData.BAT.value=="")
    	}
    		alert("Please select a Batch file");
    		return;
    	{
    	
    	if (action=="")
    	}
    		alert("Please select a Table Name");
    		return;
    	}
    }
    </script>
    What is this part for document.formTable.selTable.focus();??? Can you explain what the focus is for???

    Thanks
    Irwin
    Last edited by lchi; Jan 25th, 2005 at 09:04 PM.

  4. #4
    Big D Danial's Avatar
    Join Date
    Jul 2000
    Location
    ASP.Net Forum
    Posts
    2,877

    Re: form

    Yep I remember now.

    Ok now tell me what exactly do you want to Validate?
    [VBF RSS Feed]

    There is a great war coming. Are you sure you are on the right side? Atleast I have chosen a side.

    If I have been helpful, Please Rate my Post. Thanks.

    This post was powered by :

  5. #5

    Thread Starter
    Lively Member
    Join Date
    Sep 2004
    Posts
    71

    Re: form

    Hi Danial,

    I want to validate everything in the form moveData. I did some code as shown in the last post are they right or wrong. Or maybe you have another solution.

    Thanks
    Irwin

  6. #6
    Big D Danial's Avatar
    Join Date
    Jul 2000
    Location
    ASP.Net Forum
    Posts
    2,877

    Re: form

    Quote Originally Posted by lchi
    Hi Danial,

    I want to validate everything in the form moveData. I did some code as shown in the last post are they right or wrong. Or maybe you have another solution.

    Thanks
    Irwin
    I didnt see that you poster some code in your prev post.

    Now paste the javascript code in the <head> section along with the other Javascript code.

    Code:
    function Check()
    {
    
    
    	if (document.moveData.VB.value=="")
    	{
    		alert("Please select a VB Script");
    		return false;
    	}
    
    	if (document.moveData.BAT.value=="")
    	{
    		alert("Please select a Batch file");
    		return false;
    	}
    
    
    }
    Change the first line of our form to this :
    Code:
    <form action="page3.asp" method="post" name="moveData" id="moveData" onsubmit="return Check()">
    Happy Coding
    [VBF RSS Feed]

    There is a great war coming. Are you sure you are on the right side? Atleast I have chosen a side.

    If I have been helpful, Please Rate my Post. Thanks.

    This post was powered by :

  7. #7

    Thread Starter
    Lively Member
    Join Date
    Sep 2004
    Posts
    71

    Re: form

    Thanks I work to some extend. But the error is still showing.

    Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)
    [Microsoft][ODBC Microsoft Access Driver] Syntax error in FROM clause.
    /mysite/page3.asp, line 56

    How do you prevent this from happening?

    The error is there because there is no table name to send to on the next page.

    Thanks
    Irwin

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width