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()'> Link to comment https://forums.phpfreaks.com/topic/91744-document-write/ 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 ” Link to comment https://forums.phpfreaks.com/topic/91744-document-write/#findComment-469933 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. Link to comment https://forums.phpfreaks.com/topic/91744-document-write/#findComment-469972 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.