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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

javascripts not executing once loaded to apache

Status
Not open for further replies.

g3ck0

MIS
Feb 11, 2003
6
US
I am trying to launch an informative chromeless popup using javascript and it works fine on my development PC (win2k) using dreamweaver MX (IIS is not installed). However once I upload the files to the apache server and got to the site nothing happens when I click the link. Since javascript is run on the client side why does it not work once I upload the files to the server? Any help would be greatly apreciated. The script codeis located tin the <head> section like it is supposed to and the link is embedded in a text file that Flash reads upon entering the site. It works fine on the server if the link doesn't use javascript to open the window. also is there a log or way of logging this to narrow down what is causing me this grief.
 
here is the code I am using maybe it will help

<SCRIPT LANGUAGE='JAVASCRIPT' TYPE='TEXT/JAVASCRIPT'>
<!--
var win=null;
function NewWindow(mypage,myname,w,h,pos,infocus){
if(pos==&quot;random&quot;){myleft=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;mytop=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;}
if(pos==&quot;center&quot;){myleft=(screen.width)?(screen.width-w)/2:100;mytop=(screen.height)?(screen.height-h)/2:100;}
else if((pos!='center' && pos!=&quot;random&quot;) || pos==null){myleft=0;mytop=20}
settings=&quot;width=&quot; + w + &quot;,height=&quot; + h + &quot;,top=&quot; + mytop + &quot;,left=&quot; + myleft + &quot;,scrollbars=yes,location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no&quot;;win=window.open(mypage,myname,settings);
win.focus();}
// -->
</script>


here is the link code

<a href=&quot;javascript:NewWindow('belarc/Asset_Scan.htm','acepopup','640','480','custom','front');&quot;>Asset Scan</a>
 
I think the slash is sdrawkcab:

Code:
<a href=&quot;javascript:NewWindow('belarc/Asset_Scan.htm','acepopup','640','480','custom','front');&quot;>Asset Scan</a>

should be

Code:
<a href=&quot;javascript:NewWindow('belarc\Asset_Scan.htm','acepopup','640','480','custom','front');&quot;>Asset Scan</a>

Windows is whorish and doesn't much care, but Unix is much stricter.

Then again, I might be wrong.

Good luck!

Edward &quot;Cut a hole in the door. Hang a flap. Criminy, why didn't I think of this earlier?!&quot; -- inventor of the cat door
 
Actually the coding is correct and unix systems typically use the &quot;/&quot; and not &quot;\&quot;. I tracked it down to when cloaking is enabled by my DNS redirection the frames are getting in the way. If anyone knows a workaround for this let me know as I would like to hide the actual ports open on my web server.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top