Month: February 2005

Use server-side application variables to drive client-side scripts

You can use serverside variables to drive client-side javascripts. Server-side variables get processed and the results output by the time the page is rendered, so the value of the variable can be used in client-side functions.

In an ASP application I’m working with, I wanted a different tooltip to show up on each tab, depending on what the tab title was. There is a server-side variable called “tabs[i].title”. So I created a little client-side function to test the value of the title on each tab.

 
<script>
var tabName ;

function whichTab(tabTitle){
   if (tabTitle == 'Summary'){
   tabName = Summary;
}
else if (tabTitle == 'Plan Details'){
   tabName = PlanDetails;
}
else if (tabTitle == 'Certifications'){
   tabName = Certifications;
}
else if (tabTitle == 'Transcript'){
  tabName = Transcript;
}
}
</script>
Continue reading

Troubleshooting Questionmark Perception database connections

We’ve had just about every sort of database connection issue with our two Questionmark Perception servers, so in the interest of saving someone else the kind of struggles we’ve gone through, here are some things to look for.

  1. tnsnames.ora issues:
    There is a file that lives in a subdirectory of the Oracle folder – this directory may be called Oracle_Home, Oracle9 etc, and is often but not always in the root directory of the server.

    A typical path to the tnsnames.ora file on a server is

    E:\Oracle_HomenetworkAdmintnsnames.ora

    There are a variety of things that could be incorrect in this file.

    1. Hidden control characters brought in during copy and paste:
      If you copy and paste the settings from some email programs into this file, you may be adding hidden control characters to the tnsnames.ora file. You won’t be able to see them but they’re there, and they’re screwing things up.

      Continue reading