Mourning the loss of our friend, WhitPhil.
There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
Search
 
Web Design & Development
Tag Cloud
access audio black screen blue screen boot bsod connection crash dell desktop driver dvd email error excel excel 2003 firefox hard drive hardware hijackthis internet keyboard laptop malware monitor network networking outlook problem processor ram recovery router safe mode screen slow sound spyware trojan upgrade vba video virus vista vundo windows windows 7 windows vista windows xp wireless
Search
Search for:
Tech Support Guy Forums > Internet & Networking > Web Design & Development >
The javascript on my website is not working!!!

Tip: Click here to scan for System Errors and Optimize PC performance
[ Sponsored Link ]

 
Thread Tools
danielstoops's Avatar
Senior Member with 172 posts.
 
Join Date: Sep 2008
13-Oct-2009, 01:46 PM #1
Question The javascript on my website is not working!!!
Hi,

I have made a website with javascript, yet it is not working for some odd reason. It is not the server because when I display it on my computer (as in I type into Firefox 'C:/file...') the javascript does not work when it should.

An example of the problem is located at mybagshop.co.uk/Products/18181.htm (it is not a virus or anything like that). Near the bottom of the page you will find two sections splitted by an <hr> with paypal stuff inbetween them. They should both be hidden. The top one is named id="one", and the one below is named id='two'. Now, if you look to my javascript file, located at mybagshop.co.uk/websitejavascript.js, you will soon find that they should be hidden, but they are not.

I was wondering if someone could help me out here. Thanks for your help!!!

If I am not allowed to display the links above, please say and I will remove them immediately. This is not a way to obtain visitors by the way, my javascript is seriously not working!
JimmySeal's Avatar
Senior Member with 206 posts.
 
Join Date: Sep 2007
Experience: Getting there
14-Oct-2009, 01:34 AM #2
You've defined functions Hideone() and Hidetwo() but you're not calling them from anywhere. You have to call the functions in order for them to do anything.
danielstoops's Avatar
Senior Member with 172 posts.
 
Join Date: Sep 2008
14-Oct-2009, 02:06 AM #3
I have called the functions. I will double check later today, but I'm pretty sure I have
JimmySeal's Avatar
Senior Member with 206 posts.
 
Join Date: Sep 2007
Experience: Getting there
14-Oct-2009, 03:32 AM #4
Sorry, you're right. Somehow I missed that. But you have unmatched parentheses in the alerts in IRN() and PC(). That might be stopping browsers from processing your JavaScript file.
danielstoops's Avatar
Senior Member with 172 posts.
 
Join Date: Sep 2008
14-Oct-2009, 07:42 AM #5
What do you mean unmatched?
JimmySeal's Avatar
Senior Member with 206 posts.
 
Join Date: Sep 2007
Experience: Getting there
14-Oct-2009, 07:44 AM #6
I mean that they they have an opening parenthesis
Code:
(
, but no closing parenthesis
Code:
)
. You have to have both, not just the opening one.
danielstoops's Avatar
Senior Member with 172 posts.
 
Join Date: Sep 2008
14-Oct-2009, 07:49 AM #7
Thank you very much. I will change it as soon as possible.
briealeida's Avatar
Computer Specs
Senior Member with 660 posts.
 
Join Date: Jun 2007
Location: US and A
Experience: Ninja
18-Oct-2009, 05:33 PM #8
In the future, JSLint may help. JSLint is one of many JavaScript validators/checkers. I'm not sure if it would have caught this particular problem but it has saved me from pulling my hair out a few times.

http://www.jslint.com
Reply Bookmark and Share

Smart Search

Find your solution!



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
WELCOME TO TECH SUPPORT GUY! Are you looking for the solution to your computer problem? Join our site today to ask your question -- for free! Our site is run completely by volunteers who want to help you solve your computer problems. See our Welcome Guide to get started.

Thread Tools


You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -5. The time now is 09:47 PM.
Copyright © 1996 - 2009 TechGuy, Inc. All rights reserved.
Powered by vBulletin, Copyright © 2000 - 2009, Jelsoft Enterprises Ltd.
Powered by Cermak Technologies, Inc.