Can't see my webpages on localhost

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Can't see my webpages on localhost

Postby daisy06 » 06. April 2011 21:37

I am using local host as a testing platform, running xampp 1.7.3 on a Windows 7 machine.

I am able to see the http://localhost/xampp page with no problem. When I try to load one of my pages (http://localhost/foldername/index.html) I see the page load but it is not displayed. I know the page loads because I can right click and see the html code.

The page that will not display contains java script code. If I remove the java code, the page displays correctly. I have other pages that have no java code and they also work correctly.

Any help will be greatly appreciated.
daisy06
 
Posts: 4
Joined: 06. April 2011 21:24

Re: Can't see my webpages on localhost

Postby Sharley » 06. April 2011 22:04

...then it must be the javascript code that is giving issues and without being able to see what the code is, it will be impossible to help.

BTW javascript is parsed by your browser not the web server so XAMPP is working fine and if you have javascript issues you should ask the script's author what the issues might be.
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3

Re: Can't see my webpages on localhost

Postby daisy06 » 06. April 2011 22:14

Here is the section of code that I removed to make the page work. The code was generated by Serif WebPlusX4 development software. This is working on another of my Windows 7 machines.

<script type="text/javascript" src="_wp_scripts/jspngfix.js"></script>
<script type="text/javascript"><!--
var blankSrc = "_wp_scripts/blank.gif";
--></script>
<script type="text/javascript" src="_wp_scripts/jsMenus.js"></script>
<script type="text/javascript">

Thanks
daisy06
 
Posts: 4
Joined: 06. April 2011 21:24

Re: Can't see my webpages on localhost

Postby Sharley » 06. April 2011 22:23

You have a <script> tag that is not closed - the last <script> tag needs to be closed </script> or deleted as it does not contain anything.
Your browser is reaching that point and then stalling because it can't go any further reading the html page code.
daisy06 wrote:<script type="text/javascript" src="_wp_scripts/jspngfix.js"></script>
<script type="text/javascript"><!--
var blankSrc = "_wp_scripts/blank.gif";
--></script>
<script type="text/javascript" src="_wp_scripts/jsMenus.js"></script>
<script type="text/javascript">
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3

Re: Can't see my webpages on localhost

Postby daisy06 » 06. April 2011 22:38

Sorry, Ms. Sharley. Here is the code following what I previously posted.

<!--
var nav_2 = new wp_menus();
nav_2.m_bkgndcolor = '#543312';
nav_2.m_bkgndcolorhl = '#8c6c45';
nav_2.m_textcolor = '#ffa50c';
nav_2.m_textcolorhl = '#ffffff';
nav_2.m_bordercolor = '#543312';
nav_2.m_bordersize = 1;
nav_2.m_fontsize = 14;
nav_2.m_imagearrow = '_wp_generated/wpa9d337ce.gif';
nav_2.m_imagearrowhl = '_wp_generated/wpdba8aeda.gif';
nav_2.m_txtalign = 'center';
nav_2.m_fontfamily = 'Comic Sans MS,serif';
nav_2.m_filterOpacity = 100;
nav_2.m_mozOpacity = 1.000000;
nav_2.m_delay = 500;
nav_2.m_itemlines = false;
nav_2.m_width = 0;
nav_2.m_txtnbclr = '#ffa50c';
nav_2.m_txtnbclrinv = '#ffffff';
nav_2.m_txtnbbkgndclr = '#543312';
nav_2.m_txtnbbkgndclrinv = '#8c6c45';
nav_2.m_acStack.type = 0;
nav_2.m_acStack.m_showbelow = true;
nav_2.m_acStack.m_showright = true;
nav_2.m_acStack.gap = 0;
nav_2.m_acStack.bordergap = 1;
nav_2.m_acStack.m_firstpopup = 1;
nav_2.BeginMenu('nav_2_P2');
nav_2.AddLink('nav_2_P2_I1','More History','morehistory.html',null,'_self');
nav_2.AddLink('nav_2_P2_I2','Rules &amp; Regulations','rules.html',null,'_self');
nav_2.AddLink('nav_2_P2_I3','Latest News','news.html',null,'_self');
nav_2.AddLink('nav_2_P2_I4','Gallery','gallery.html',null,'_self');
nav_2.AddLink('nav_2_P2_I5','The Garden','thegarden.html',null,'_self');
nav_2.EndMenu();
//-->
</script>
daisy06
 
Posts: 4
Joined: 06. April 2011 21:24

Re: Can't see my webpages on localhost

Postby Sharley » 06. April 2011 22:55

So the location of the script may need to be given the full path treatment to get it to work if the code itself is not at fault.
Code: Select all
<script type="text/javascript" src="_wp_scripts/jspngfix.js"></script>
Change these src= lines to the full path location and you will have to do that as I can only take a guess but the format would look similar to this
Code: Select all
<script type="text/javascript" src="C:/xampp/htdocs/foldername/_wp_scripts/jspngfix.js"></script>
See if that helps and make sure the path to the scripts is correct for your own installation.

There may also be an error message in the C:\xampp\apache\logs\error.log file related to not being able to find the scripts.


Also I can be no help at all with the javascript code and if your issue is not fixed by using full paths then you must address this issue at the Serif Support section as XAMPP is working as it should:
http://www.serif.com/Support/
or their community forums:
http://www.serif.com/Support/Community/Forums/
http://forums.serif.com/

Good luck with it and my best wishes.
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3

Re: Can't see my webpages on localhost

Postby daisy06 » 06. April 2011 23:06

Many thanks. I checked the log file, and no errors are reported.

I failed to mention that the problem page works correctly when loaded from the Internet website.

Also, as I mentioned above, this code works on localhost on another Windows 7 computer.

Any further ideas?

daisy06
daisy06
 
Posts: 4
Joined: 06. April 2011 21:24


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 64 guests

cron