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.
 
There is no tech support, we purchased no support contract. The last product my friend bought from them was an image gallery and that when on without a hitch. It was also ASP and Microsoft SQL driven. So we thought this one would be no problem as well.
 
The problem is the method that you are using to get around your ISP's port 80 blocking.

If you take the actual javascript code returned by your ASP page...

... and you change it so that the image link also goes to the correct server on port 83 ...

... and you save this as a .htm file on your desktop...

... and you put <script> tags around it

... then it will work!

Here is the code if you want to try it for yourself:
Code:
<script>
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();
}
[green]//document.write("<a href='#' onclick='javascript:xlaALSprecheck()'><img src='http:\/\/thedjbooth.no-ip.com\/absolutels\/files\/offline.gif' border=0><\/a>");[/green]
document.write("<a href='#' onclick='javascript:xlaALSprecheck()'><img src='http:\/\/70.110.153.11:83\/absolutels\/files\/offline.gif' border=0><\/a>");

</script>

The green text shows what I commented out... the line following it is the replacement, notice the :83 in the url for the image source. I also used the IP address instead of the name, because that is the way your forwarding process seems to do it. Check the forwarding code above and look at the part where it gives you a link if you don't support frames.
 
Great thanks...I am going to try it right now. The only problem is that my IP address changes. I don't have a static either. That is the reason for the dynamic service I use. I guess I might need to look at another one.
 
You might not have to get another service if you can figure out how to make it place nice with the image tag.
 
plus do i need to use all that code you posted or just the changed lines? I am furthermore going to look in more at my redirection service. I don't like that it is showing the IP. It isn't supposed to.
 
OK i copied the code in it's entirety to an html file and saved it on my desktop..I can then see the image..but I don't clearly see how that is going to help me with the existing problem in the backstage. It is supposed to display that image in the administrator control panel. Would I do the same thing there. Because that is an asp page.
 
Sorry Sheco got it. So that is the button code. OK I'm clear on that now. Sorry long rough day at work I just got home. Ok so the problem is my redirect service and as I said I can't use the IP because my IP changes and my server monitors that so that is why I should be able to use the name. I wonder what could be happening there? I'll check that part out further. If you go to my admin page with the link i posted earlier and login with that info I posted earlier as well you will see a similar problem. Is this the same problem as with the redirect? Will I need to modify that stats.asp page which is what that page is when you first login to be able to display the correct status graphic?
 
The ASP creates the Javascript as either online or offline.

The code that I changed above only showed us that there was a problem with the redirect thing to port 83 that was stopping the image from getting through.

But that was a static copy of the Javascript that I changed....

Now that you can see how the JavaScript needs to be written, you've gotta go back to the ASP edit it so that it delivers the proper JavaScript.

Just a quick glance at the ASP you posted above makes me think that maybe the value of the variable named applicationurl needs to be changed... perhaps it needs a :83 appended to the end of it. But I don't see where that variable is defined. Is it perhaps in the INCLUDE file named incSystem.asp ???

Be careful changing it if it is, it might have some other negative effect elsewhere.
 
Holy crap..it works.!!!!!!!!

I changed the application url to


And i used that original button code and pasted that back into the livesupport.htm file and it all works perfect.

The only problem remaining is that doesn't help because now it is displaying the port 83 to the user and I wanted that hidden that is why I used the redirect service. I have never had this happen before..other web apps i run don't have a problem with the redirect. Could this be as a result of something in the code that they wrote?
 
Nope scratch that...go the the site and try it..it asks you to fill out a form and I do and then it gives me an error of

Microsoft JET Database Engine error '80040e14'

Syntax error (missing operator) in query expression 'userid not in (0,0) and lastlogin>='20050407193225' and deptid='.

/absolutels/incSystem.asp, line 57
 
Well I have no idea but I can make a wild asp guess. heh.

Here goes:
Perhaps the redirect service scans any HTML and automatically does a replacement... but it doesn't scan inside of <script> tags. Since this particular HTML elment is "created" by script at load time, it sneaks past the redirect.


Yeah, I know. It sounds pretty far fetched but its late and its the best "BS" I can come up with right now.
 
It is all good...everything is good...thank you everyone for the help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top