Sign In/My Account | View Cart  
advertisement

Article:
 Very Dynamic Web Interfaces
Subject: Why does the method take input and response?
Date: 2005-05-17 11:58:36
From: tieTYT

I still don't understand why this function:
function checkName(input, response)
needed to take an input and a response.


Why couldn't it be broken up into 2 functions?


Previous Message Previous Message   Next Message Next Message


Titles Only Titles Only Newest First
  • Why does the method take input and response?
    2005-05-17 12:20:44 drewmclellan

    You're right. It could be two functions. Making it one was simply a design choice. If you were to have lots of different actions on a page resulting in an xmlhttprequest call, it can be a lot tidier just to have a single function to handle each action.


    If using two functions works better for you, there's no reason not to do it that way.


Sponsored By: