codetoad.com
  ASP Shopping CartForum & BBS
  - all for $20 from CodeToad Plus!
  
  Home || ASP | ASP.Net | C++/C# | DHTML | HTML | Java | Javascript | Perl | VB | XML || CodeToad Plus! || Forums || RAM 
Search Site:
Search Forums:
  combined 3 functions that do the same thing  kathym at 21:44 on Thursday, November 27, 2008
 

Hi

I have written 3 functions that perform the same task.
- Form_OLP001 / Form_OLP002 / Form_OLP003

How do I combine them and pass the FormName variable?

My JS Code sample for 1 Form:

function CheckProductForm_OLP001()
{
var iQuantity = document.Form_OLP001.quantity.value;

if (iQuantity >= 5)
{
alert (iQuantity);
window.location.href = "http://www.excelthrulearning.com/etl%5Fhome/toomuch.html";
return;
}
}

How I call it in the html code:

<input type="text " name="quantity" class="TableOutline" size="2" maxlength="3" onBlur="CheckProductForm_OLP001()">

Thank you.












CodeToad Experts

Can't find the answer?
Our Site experts are answering questions for free in the CodeToad forums
//








Recent Forum Threads
•  Re: searching Parse::RecDescent
•  Re: calling C/C++ function from perl
•  Re: TM symbol is not displayed correctly.
•  Re: execute a script in perl script
•  Re: Perl Critic trouble
•  Re: Perl Developers Guide
•  Re: cannot move file using file::copy module
•  Re: NEED HELP! Urgent
•  Error in C++ Project


Recent Articles
ASP GetTempName
Decode and Encode UTF-8
ASP GetFile
ASP FolderExists
ASP FileExists
ASP OpenTextFile
ASP FilesystemObject
ASP CreateFolder
ASP CreateTextFile
Javascript Get Selected Text


© Copyright codetoad.com 2001-2009