phpSensei Posted February 18, 2008 Share Posted February 18, 2008 I get an Object Expected Error on Line 12 <html> <head> <title>Getting started with JavaScript</title> <script language=”javascript”> function displayText() { document.write("hello"); } </script> </head> <body onload='displayText()'> </body> </html> Line 12 <body onload='displayText()'> Quote Link to comment Share on other sites More sharing options...
nogray Posted February 18, 2008 Share Posted February 18, 2008 it's because you're using curly quote marks in the script tag <script language=”javascript”> You should use normal quote marks " If you copied an example for MS Word or a website, make sure all the quote marks are " and not ” Quote Link to comment Share on other sites More sharing options...
phpSensei Posted February 18, 2008 Author Share Posted February 18, 2008 thankyou, all of my scripts work in ajax now. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.