Date:  12/10/2003 12:05:19 PM Msg ID:  001763
From:  Roger Stanley Thread:  001760
Subject:  Re: Interesting Find!
Thank you for your help.  I've discovered my problem, which is not with foxweb, but with my computer.  I just installed Norton Internet Security on the computer I use to contact my site - when I turn it off I'm able to call the foxweb.exe without the full path, with it on I'm not.  Thought I'd share this in case any of your users have the same problem.
 
 
Sent by FoxWeb Support on 12/09/2003 06:32:50 PM:
In FoxWeb 2 the MakeURL function has been fixed, so that it only returns the necessary portion of the URL.  If all you need is relative URLs, then that's what you get.  Apparently your JavaScript function assumes that it is receiving a fully qualified URL, which is what the MakeURL function used to return.
 
In order to fix the problem, you can modify your code so that a full URL is passed to the JavaScript function.  This can be achieved by using Request.ServerVariables("SERVER_NAME").
 
By the way, the MakeURL function has been phased out.  Instead, you should follow the techniques described in the Locating and Addressing Scripts page of the FoxWeb documentation.  In this particular situation all you need to use is relative URLs, as follows:
 
M.ContTypeList = M.ContTypeList +'&nbsp;&nbsp;&nbsp;<a href="Sschedule@local_league?leagueid='+M.leagueid+'&'+'season='+M.season+'" class="menuDefaultLink">Schedule</a><br>'+CHR(10)

FoxWeb Support Team
support@foxweb.com email

Sent by Roger Stanley on 12/09/2003 11:44:03 AM:
Made the move to 2.0 and am having a minor problem with the MAKEURL.
I create a menu with a number of selections.  Several of them call a JavaScript function (to open a new window).  For all types of menu items I use the MAKEURL.  In the old version it worked fine for all but in the new version with I hit an item which calls JavaScript nothing happens. 
 
Where I'm not calling JS it also seems to add the full url, with the JS it does not..e.g. www.xxx.com/cgi/foxweb.exe/ for non JS and /cgi/foxweb.exe/ for JS.  Do I need to add the full path in every menu item or did I do something wrong? I hope it's the latter since I use this call a lot.
 
The following is a small sample from a protion of a menu:
 
M.ContTypeList = M.ContTypeList +'<span style="text-decoration:none;color:#FFCC33"><b>Season Information</b></span><br>'+CHR(10)
M.ContTypeList = M.ContTypeList +'&nbsp;&nbsp;&nbsp;<a href="'+MAKEURL('local_league','Sschedule')+'?leagueid='+M.leagueid+'&'+'season='+M.season+'" class="menuDefaultLink">Schedule</a><br>'+CHR(10)
M.ContTypeList = M.ContTypeList +'&nbsp;&nbsp;&nbsp;<a href=Javascript:Start("'+MAKEURL('local_league','show_fldstatus')+'?leagueid='+M.leagueid+'&'+'season='+M.season+'") class="menuDefaultLink">Field Status</a><br>'+CHR(10)
M.ContTypeList = M.ContTypeList +'&nbsp;&nbsp;&nbsp;<a href=Javascript:Start("'+MAKEURL('local_league','show_fldlocate')+'?leagueid='+M.leagueid+'&'+'season='+M.season+'") class="menuDefaultLink">Field Location</a><br>'+CHR(10)
M.ContTypeList = M.ContTypeList +'&nbsp;&nbsp;&nbsp;<a href="'+MAKEURL('local_league','Sresults')+'?leagueid='+M.leagueid+'&'+'season='+M.season+'" class="menuDefaultLink">Game Results</a><br>'+CHR(10)
M.ContTypeList = M.ContTypeList +'&nbsp;&nbsp;&nbsp;<a href="'+MAKEURL('local_league','Sstandings')+'?leagueid='+M.leagueid+'&'+'season='+M.season+'" class="menuDefaultLink">Standings</a><br>'+CHR(10)
M.ContTypeList = M.ContTypeList +'&nbsp;&nbsp;&nbsp;<a href="'+MAKEURL('local_league','Sstats')+'?leagueid='+M.leagueid+'&'+'season='+M.season+'" class="menuDefaultLink">Statistics</a><br>'+CHR(10)
M.ContTypeList = M.ContTypeList +'&nbsp;&nbsp;&nbsp;<a href="'+MAKEURL('league_tournament','View_Tournament')+'?leagueid='+M.leagueid+'&'+'season='+M.season+'" class="menuDefaultLink">Tournaments</a>'+CHR(10)
M.ContTypeList = M.ContTypeList +'</td>'+CHR(10)
M.ContTypeList = M.ContTypeList +'</tr>'+CHR(10)