Opinion ... Urgent

Results 1 to 3 of 3

Thread: Opinion ... Urgent

  1. #1
    davidku@rocketmail.com Guest

    Default Opinion ... Urgent

    Hi Gurus,<BR><BR>I need your valuable opinion on this.<BR><BR>I have a HTML page where user need to key in some information. By pressing the submit button in the HTML page, I will call an ASP page where I will display all the related information.<BR><BR>In that page, I will have some fields for them to do data entry. Now, I need to validate those entries and then pass it to another ASP page so that I can update it to my database using stored procedures.<BR><BR>In the first ASP page, <BR>1) How to code it in such a way that if the validation failed, they can&#039t submit to other page ?<BR><BR>2) The javascript function that I developed will generate a string and pass it over to another page. Can a javascript variable be pass over ?<BR><BR>All the validation function that I have coded is in Javascript.<BR><BR>Please advise me. Thanks !

  2. #2
    Join Date
    Dec 1969

    Default RE: Opinion ... Urgent

    im not a guru but..<BR>for the first page you could try using :<BR><BR>&#060;script language="JavaScript"&#062;<BR><BR>function checkForm()<BR>{<BR>if (document.RequestForm.Request_Reason.value.length &#060; 1 )<BR> {<BR> alert("Please enter your reason");<BR> document.RequestForm.Request_Reason.focus();<BR> return false;<BR> }<BR>return true;<BR>}<BR>&#060;/script&#062; <BR><BR>&#060;form name="Form" action="formaction.asp" method="get" onsubmit="return checkForm();"&#062;<BR><BR>this will only allow the action page to be run when the validation is true.<BR>As for passing javascript vars over i dont know exactly but i dont think you can pass them, why dont you put it in an asp var and pass it over that way, or even a session var ?<BR><BR>hope that helps

  3. #3
    davidku@rocketmail.com Guest

    Default RE: Opinion ... Urgent

    Hi ... that really helps.<BR><BR>Thanks very much !

Posting Permissions

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