SitePoint Sponsor |
|
User Tag List
Results 1 to 3 of 3
Thread: Object Expected.. *screams*
-
Sep 15, 2006, 09:35 #1
- Join Date
- Jul 1999
- Location
- A cave with 47 computers and an internet feed
- Posts
- 3,559
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Object Expected.. *screams*
I'm no Javascript expert... All I want to do is put a Tell a Friend script on a page here:
www.momandpopmarketing.com/marketing/tellafriend
But when I click the button, I get the yellow triangle of doom with Error on Page which tells me "Object Expected - line 122. So I go to line 122 and see the end center tag, and that doesn't help me one bit, of course... So now I turn to you all. What did I do wrong?
-
Sep 15, 2006, 09:48 #2
- Join Date
- Sep 2006
- Posts
- 3
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Sometimes the line # that the error gives you and the line # in your design/code program don't always match - the error could be on another line. Best of luck.
-
Sep 16, 2006, 08:26 #3
- Join Date
- Jun 2006
- Location
- Cape Town | South Africa
- Posts
- 117
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Hi
A couple of things i noticed when looking at the source code of the link above:
1. There are some parts which look like they are supposed to be PHP - either you didnt save the page as .php or you need to have <?php ...... ?> - you have <? ........ ?>. I thought that that was supposed to work, but i always use <?php instead of <? anyway.
2. On your "Click once to send" button, the onclick attribute's value if validate(); - firstly you dont need ; at the end - but im not sure if it makes a difference. And secondly, there is no function defined for validate() so that accounts for the Object Expected error. I have looked though all the external .js pages and there is defenitely no validate() function defined.
Tell me if that works....Ben Sheard
-------------
Log all your dives easily and quickly from anywhere in the world
www.divinglogs.cafe150.com
Bookmarks