[lug] Javascript Help

Kyle Moore kmoore at trustamerica.com
Fri Mar 23 12:17:02 MST 2001

Can someone tell me what is wrong with this? I try to avoid JavaScript
as much as possible. I'm trying to search for a string in part of the
referrer url and then display some text based on the result of the test.
I'm sticking this in a row in a table if that makes any difference.

<script language="JavaScript" type="text/javascript">
  var from = document.referrer;
  var re = "doc.html";

   if (re.test(from)) {
      var text = "Yes"
   } else {
      var text = "No"


More information about the LUG mailing list