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 acer asus bios bsod computer crash drive driver drivers error ethernet excel freeze games gaming graphics hard drive hardware hdmi internet laptop malware memory monitor motherboard netgear network printer problem ram random registry router slow software sound trojan usb video virus vista wifi windows windows 7 windows 7 32 bit windows 7 64 bit windows xp wireless xbox
Search
Search for:
Tech Support Guy Forums > Internet & Networking > Web Design & Development >
The javascript on my website is not working!!!

Reply  
Thread Tools
danielstoops's Avatar
Member with 178 posts.
 
Join Date: Sep 2008
13-Oct-2009, 02: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
Computer Specs
Member with 289 posts.
 
Join Date: Sep 2007
Experience: Getting there
14-Oct-2009, 02: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
Member with 178 posts.
 
Join Date: Sep 2008
14-Oct-2009, 03:06 AM #3
I have called the functions. I will double check later today, but I'm pretty sure I have
JimmySeal's Avatar
Computer Specs
Member with 289 posts.
 
Join Date: Sep 2007
Experience: Getting there
14-Oct-2009, 04: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
Member with 178 posts.
 
Join Date: Sep 2008
14-Oct-2009, 08:42 AM #5
What do you mean unmatched?
JimmySeal's Avatar
Computer Specs
Member with 289 posts.
 
Join Date: Sep 2007
Experience: Getting there
14-Oct-2009, 08: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
Member with 178 posts.
 
Join Date: Sep 2008
14-Oct-2009, 08:49 AM #7
Thank you very much. I will change it as soon as possible.
briealeida's Avatar
Computer Specs
Senior Member with 677 posts.
 
Join Date: Jun 2007
Location: US and A
Experience: Ninja
18-Oct-2009, 06: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

THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.

Search Tech Support Guy

Find the solution to your
computer problem!




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



Facebook Facebook Twitter Twitter TechGuy.tv TechGuy.tv Mobile TSG Mobile
You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 03:32 PM.
Copyright © 1996 - 2011 TechGuy, Inc. All rights reserved.

Powered by Cermak Technologies, Inc.