Problem with function s

Results 1 to 2 of 2

Thread: Problem with function s

  1. #1
    Join Date
    Dec 1969

    Default Problem with function s

    Hi,<BR><BR>I want to process a function based on the location. <BR>The call for the function is as follows<BR><BR>&#060;% IF (country = "us") THEN %&#062;<BR>&#060;!--#include virtual="/include/nav_us.asp"--&#062;<BR>&#060;% ELSE %&#062;<BR>&#060;!--#include virtual="/include/nav_other.asp"--&#062;<BR>&#060;% END IF %&#062;<BR><BR><BR><BR>Both the include files contains the same information except the url reference. <BR><BR>nav_us.asp contains the following function along with some display code<BR><BR><BR>Function navURL()<BR>Dim value1<BR>value1 = navDisplayURL("home", "/home")<BR>value1 = navDisplayURL("products", "/products")<BR>End Function<BR><BR>nav_other.asp contains the following function <BR>Function navURL()<BR>Dim value1<BR>value1 = navDisplayURL("home", "/home")<BR>value1 = navDisplayURL("other resources", "/other")<BR>End Function<BR><BR><BR>The problem I am facing is, though the first condition get satisfies still it displays the second functions URL. That means is the function got overwritten. If so How to resolve this? <BR><BR>

  2. #2
    Join Date
    Dec 1969

    Default ASPFAQs, category The Nature of Things

    The link to the ASPFAQs is at the top right corner of this very page.<BR><BR>Look in the category noted above for a question related to yours.<BR><BR>Oh, heck. I&#039;ll make it easy:<BR><BR><BR>You are creating *BOTH* functions in you ASP page, so it&#039;s just chance that determines which one gets called when the function is invoked.<BR><BR>

Posting Permissions

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