Getting a javascript Expected_';"

Attempting to create a Cisco IP phone service. Following exact guidelines of one that does work;
Have logging enabled.

I get a 500 server error on the phone; very generic.
On the log, I get this -

(cs-uri-query field of the log)
ctype=out|4|800a03ec|Expected_';'

Can someone please tell me where I'm going wrong?
Code is attached.
thanks - Cindy

<%@ Language=JavaScript %>
<% 
var serverIP = Request.ServerVariables("LOCAL_ADDR");
var SERVICE_DIR="CiscoIPServices";

function MainMenu()
{	Response.Write("<CiscoIPPhoneMenu><Title>IP Time Clock</Title><Prompt>Choose a selection:</Prompt>\r\n");
	Response.Write("<MenuItem>\r\n");
	Response.Write("<Name>Clock In</Name>\r\n");
	Response.Write("<URL>http://" + serverIP + "/" + SERVICE_DIR + "/timeclock/menu.asp?option=in</URL>\r\n");
	Response.Write("</MenuItem>\r\n");

	Response.Write("<MenuItem>\r\n");
	Response.Write("<Name>Clock Out</Name>\r\n");
	Response.Write("<URL>http://" + serverIP + "/" + SERVICE_DIR + "/timeclock/menu.asp?option=out</URL>\r\n");
	Response.Write("</MenuItem>\r\n");
	Response.Write("</CiscoIPPhoneMenu>\r\n");
	return;
}

function Menu()
{	Response.Write("<CiscoIPPhoneMenu>\r\n");
	Response.Write("<Prompt>Select an option</Prompt>\r\n");

	//Clock In
	Response.Write("<MenuItem>\r\n");
	Response.Write("<Name>Clock In</Name>\r\n");
	Response.Write("<URL>http://" + serverIP + "/" + SERVICE_DIR + "/timeclock/input.asp?ctype=in</URL>\r\n");
	Response.Write("</MenuItem>\r\n");

	//Clock Out
	Response.Write("<MenuItem>\r\n");
	Response.Write("<Name>Clock Out</Name>\r\n");
	Response.Write("<URL>http://" + serverIP + "/" + SERVICE_DIR + "/timeclock/input.asp?ctype=out</URL>\r\n");
	Response.Write("</MenuItem>\r\n");

	Response.Write("</CiscoIPPhoneMenu>\r\n");
}

	var opt=Request.QueryString("option");
	Response.ContentType = "text/xml";
	Response.Buffer = true;
	Menu();

	Response.Flush();
%>

Open in new window

LVL 9
jrfaustVP of ITAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Michel PlungjanIT ExpertCommented:
I would return concatenated strings instead of response writing them in your functions.

However there is nothing I can see should give you this issue
<%@ Language=JavaScript %>
<% 
var serverIP = Request.ServerVariables("LOCAL_ADDR"+
var SERVICE_DIR="CiscoIPServices";

function MainMenu() { 
  return "<CiscoIPPhoneMenu><Title>IP Time Clock</Title><Prompt>Choose a selection:</Prompt>\r\n"+
  "<MenuItem>\r\n"+
  "<Name>Clock In</Name>\r\n"+
  "<URL>http://" + serverIP + "/" + SERVICE_DIR + "/timeclock/menu.asp?option=in</URL>\r\n"+
  "</MenuItem>\r\n"+

  "<MenuItem>\r\n"+
  "<Name>Clock Out</Name>\r\n"+
  "<URL>http://" + serverIP + "/" + SERVICE_DIR + "/timeclock/menu.asp?option=out</URL>\r\n"+
  "</MenuItem>\r\n"+
  "</CiscoIPPhoneMenu>\r\n";

}

function Menu()
{  
  return "<CiscoIPPhoneMenu>\r\n"+
  "<Prompt>Select an option</Prompt>\r\n"+

  //Clock In
  "<MenuItem>\r\n"+
  "<Name>Clock In</Name>\r\n"+
  "<URL>http://" + serverIP + "/" + SERVICE_DIR + "/timeclock/input.asp?ctype=in</URL>\r\n"+
  "</MenuItem>\r\n"+

  //Clock Out
  "<MenuItem>\r\n"+
  "<Name>Clock Out</Name>\r\n"+
  "<URL>http://" + serverIP + "/" + SERVICE_DIR + "/timeclock/input.asp?ctype=out</URL>\r\n"+
  "</MenuItem>\r\n"+

  "</CiscoIPPhoneMenu>\r\n";
}

  var opt=Request.QueryString("option");
  Response.ContentType = "text/xml";
  Response.Buffer = true;
  Response.write(Menu());

  Response.Flush();
%>

Open in new window

0
SStoryCommented:
I can't see anything wrong with your functions or the XML that they output.
However, I do not know the API for the Cisco IP phone. To me it seems the error is coming from there.
Or is it from input.asp?
I can't see that code so I don't know why it is complaining.
Ctype is a system function name in dotnet so the parameter naming choice might not be the best possible.
0
jrfaustVP of ITAuthor Commented:
The error was coming from the input.asp page - elseif is 2 words in javascript.
Thanks for taking a look. much appreciated.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
jrfaustVP of ITAuthor Commented:
Solution was on page not given to experts to review.
0
SStoryCommented:
Again, couldn't see that code.  Yes that sort of thing can get you.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
JScript

From novice to tech pro — start learning today.