Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Newbie Help 1

Status
Not open for further replies.

DJBallistic

IS-IT--Management
Apr 7, 2005
23
US
I am a Microsoft Professional that is dabbling in ASP. And by dabbling I mean I am completely new to it. However, a friend of mine has purchased this Live Help or Live Support application that is running on his web server. Supposedly according to the manual I have followed everything it says to do, set permissions, set config options for database connectivity, etc. It seems like a set and go live app but sadly this isn’t the case and he didn’t purchase any support contract with them because he thought he could do it himself easily and so did I. I have gotten in all configured from the administrator backend. And in that backend it displays some code that you have to add to every page that you wish to have the Live Support status button displayed on. Well I paste that into an HTML or ASP page only containing that bit of code and nothing else as a test. It displays a blank page. But at the bottom of IE it says finished with errors. And the error is this:



Line: 2

Char: 1

Error: Syntax Error

Code: 0

URL: (Which is the page I am viewing)



The button code is this:



<script language=JavaScript src="


Any thoughts ? I came across your email address on a website about ASP troubleshooting but it doesn’t really help me in this case.
 
Sorry about the last part of the post about the email address I found on a website. I forgot to delete that, it was from an email to someone also about this problem.
 
Sorry, which page did you want the first 15 lines of code of? The livesupport.asp page only has the button code in it. The als.asp page has much more. I will post the first 15 lines of that page on here.

als.asp:

<!--#include file="incSystem.asp" -->
<%call nocache()
referer=request.servervariables("http_referer")
d=request("d")
bypass=request("bypass")

paramstart=instr(referer,"?")
'/// Get Full URL ?
if getfullurl="" and paramstart>0 then
referer=mid(referer,1,paramstart)
end if

'/// Check if there's people online
lastlogin=application("xlaALSlastlogin")
img="offline.gif"
if (isdate(lastlogin)) then
if datediff("s",lastlogin,getdate())<requestrate*3 then
img="online.gif"
isonline=true
end if
end if

In the administrator backend of the application the same error also occurs and references a different page. That file I will post also.

stats.asp

<!-- #include file="incSystem.asp" -->
<%
lvl=validate(0)
set conn=server.createobject("ADODB.Connection")
conn.open connection

'/// Requests Per Department
psql="SELECT Count(xlaALSvCustomerRequests.deptid) AS requests,

xlaALSvCustomerRequests.deptname FROM xlaALSvCustomerRequests GROUP BY

xlaALSvCustomerRequests.deptname;"
dim piecolor(5)
piecolor(1)="FFCC33"
piecolor(2)="0066cc"
piecolor(3)="FF0000"
piecolor(4)="99CC33"
piecolor(5)="F2F2F2"
set rs=conn.execute(psql)
if not(rs.eof) then
do until rs.eof
 
But at the bottom of IE it says finished with errors.

This sounds like you are describing a client side error rather than an ASP error.

When I click the link in your script tag, I get this:
Code:
function xlaALSprecheck(){
	
		xlaALSleavemsg();
	
}
function xlaALSleavemsg(){
	
		var w = 640, h = 480;
		if (document.all || document.layers) {
		   w = screen.availWidth;
		   h = screen.availHeight;
		}
		var leftPos = (w-520)/2, topPos = (h-350)/2;
		xlaALSwindow=window.open("[URL unfurl="true"]http://thedjbooth.no-ip.com/absolutels/UserForm.asp?status=offline","ALSRoom","toolbar=0,location=0,status=1,menubar=0,scrollbars=1,resizable=1,width=520,height=350,top="[/URL] + topPos + ",left=" + leftPos);
		xlaALSwindow.focus();
	
}
function xlaALSrequest(){
	var w = 640, h = 480;
	if (document.all || document.layers) {
	   w = screen.availWidth;
	   h = screen.availHeight;
	}
	var leftPos = (w-520)/2, topPos = (h-350)/2;
	xlaALSwindow=window.open("","ALSRoom","toolbar=0,location=0,status=0,menubar=0,scrollbars=1,resizable=1,width=520,height=350,top=" + topPos + ",left=" + leftPos);
	xlaALSwindow.focus();
}
document.write("<a href='#' onclick='javascript:xlaALSprecheck()'><img src='http:\/\/thedjbooth.no-ip.com\/absolutels\/files\/offline.gif' border=0><\/a>");

So it seems that the ASP in your link outputs this javascript... and that the error you see is in this rather than in the ASP.
 
What do I do then? All I see is a blank page with that error in the backend and in the livesupport.asp page..i don't see any graphic stating it's offline which it should say right now and give a form to fill out. I don't get any of that..I don't even see a link.
 
I didn't make the button. In the live support administrator back-end it displays that as the code to use when creating the buttons. I didn't write this. This is all company written.
 
And actually the als.asp does contain java or a reference to it. Sorry to do this but I will post the entire als.asp file. It isn't that large actually.

<!--#include file="incSystem.asp" -->
<%call nocache()
referer=request.servervariables("http_referer")
d=request("d")
bypass=request("bypass")

paramstart=instr(referer,"?")
'/// Get Full URL ?
if getfullurl="" and paramstart>0 then
referer=mid(referer,1,paramstart)
end if

'/// Check if there's people online
lastlogin=application("xlaALSlastlogin")
img="offline.gif"
if (isdate(lastlogin)) then
if datediff("s",lastlogin,getdate())<requestrate*3 then
img="online.gif"
isonline=true
end if
end if

response.buffer=true
response.flush

img="<a href='#' onclick='javascript:xlaALSprecheck()'><img src='"&applicationurl&"files/"&img&"' border=0></a>"
img=replace(img,"/","\/")
if isonline then
theurl=applicationurl&"UserPreChat.asp?ref=" & server.urlencode(referer)
if d<>"" then theurl=theurl & "&d="&d&"&bypass="&bypass
else
For Each roomname in application.Contents
if Instr(1,roomname,"ALSRoom",1)=1 then application.contents.remove roomname
Next
end if
%>
function xlaALSprecheck(){
<%if isonline then%>
if (document.body && typeof(document.body.innerHTML) != 'undefined'){
xlaALSrequest();
} else {
if (confirm('Your browser does not support some of the features of this system.\nWould you like to leave a message?')) xlaALSleavemsg();
}
<% else %>
xlaALSleavemsg();
<%end if%>
}
function xlaALSleavemsg(){
<%if contactform="" then%>
var w = 640, h = 480;
if (document.all || document.layers) {
w = screen.availWidth;
h = screen.availHeight;
}
var leftPos = (w-<%=width%>)/2, topPos = (h-<%=height%>)/2;
xlaALSwindow=window.open("<%=applicationurl&"UserForm.asp?status=offline"%>","ALSRoom","toolbar=0,location=0,status=1,menubar=0,scrollbars=1,resizable=1,width=<%=width%>,height=<%=height%>,top=" + topPos + ",left=" + leftPos);
xlaALSwindow.focus();
<%else%>
window.location.href='<%=contactform%>';
<%end if%>
}
function xlaALSrequest(){
var w = 640, h = 480;
if (document.all || document.layers) {
w = screen.availWidth;
h = screen.availHeight;
}
var leftPos = (w-<%=width%>)/2, topPos = (h-<%=height%>)/2;
xlaALSwindow=window.open("<%=theurl%>","ALSRoom","toolbar=0,location=0,status=0,menubar=0,scrollbars=1,resizable=1,width=<%=width%>,height=<%=height%>,top=" + topPos + ",left=" + leftPos);
xlaALSwindow.focus();
}
document.write("<%=img%>");
 
create a simple form in html and see if that post, remove any javascript (for the moment), provide us a link
 
Perhaps I need to clarify.

The *purpose* of that ASP page is to dynamically produce javascript output.

It creates custom javascript on the fly.

The error you are seeing is the browsers attempt to process this javascript.

So this is really 2 questions.
1. What is wrong with the JavaScript?
2. Does the ASP page need to be changed to produce different JavaScript.

 
I can create a simple form but what do you want me to put in it. You said see if that post, I don't understand that :) Sorry. What javascript do you want me to remove?
 
I could also provide you the link to the backend and make that use and administrator so you can see the backend if that would be helpful.
 
Yes when I click on that link i see the button...but the problem is I should see that when I post that code onto a page...it is supposed to display that button using that javascript code. However in the administrator backend it also does not show the button.


Login as asphelp / asphelp and you'll see what i mean. I am not concerned with posting that here because there is nothing there that is crucial that I cannot change later. I will return after lunch in 1 hour. Thanks so far with patience..I am so new at this and I am pulling my hair out.
 
No here is something interesting.

If you go to the asp page in the script tag, you get the javascript output that I showed above....

... but if you allow the script debugger to launch on the error, you get something quite different:
Code:
<HTML>
<!-- WEB REDIRECTION PROVIDED BY NO-IP.COM  [URL unfurl="true"]http://www.no-ip.com/[/URL] -->
<HEAD>
<TITLE>The DJ Booth</TITLE>


<meta name="keywords" content="">
<meta name="description" content="">

<script language="JavaScript"><!-- 
var popunder=new Array(
  "[URL unfurl="true"]http://www.no-ip.com/pop_u.php?h=thedjbooth.no-ip.com"[/URL]
);

var width    = '500'; 
var height   = '430';
var one_time = 1;

var p = 'scrollbars=no,resizable=no,toolbar=no,' + 
  'menubar=no,status=no,location=no,left=85,top=20,' + 
  'height=' +  height + ',width=' + width;

function get_cookie(Name) {
  var search = Name + "="; var returnvalue = "";
  if (document.cookie.length > 0) {
    offset = document.cookie.indexOf(search);
    if (offset != -1) { 
      offset += search.length;
      end = document.cookie.indexOf(";", offset);
      if (end == -1) end = document.cookie.length;
      returnvalue=unescape(document.cookie.substring(offset, end));
    }
  }
  return returnvalue;
}

function loadornot() {
  if (get_cookie('popunder')=='') {
    load_pop_power();
    var exp = new Date();
    exp.setTime(exp.getTime() + (10800*1000) );
    document.cookie="popunder=yes"+ "; expires=" + exp.toGMTString(); 
  }
}

function load_pop_power() {
  win2=window.open(popunder[Math.floor(Math.random()*(popunder.length))],"bw",p);
  if(win2) win2.blur();
  window.focus();
}

if(one_time == 0) load_pop_power();
else loadornot();
// -->
</script>



</HEAD>
<FRAMESET  ROWS="100%,*" FRAMEBORDER=NO FRAMESPACING=0 BORDER=0>
<FRAME SRC="[URL unfurl="true"]http://70.110.153.11:83/absolutels/als.asp"[/URL] NAME="redir_frame">

</FRAMESET>
<NOFRAMES>
Sorry, your browser does not support frames.  Click <A HREF="[URL unfurl="true"]http://70.110.153.11:83/absolutels/als.asp"[/URL] TARGET=_top>here</A>
</NOFRAMES>

</HTML>
 
I use a free web redirect because my ISP blocks port 80 but that has never been a problem before. I still don't know what this all means or why this is happening.
 
So I guess this isn't something easy like I was thinking at the start of all this eh?
 
Has everyone given up on this? I don't know what else to do. Should I just give up too?
 
Maybe I missed it, but I don't see anywhere that you've contacted the tech support people from the package that was purchased.

Lee
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top