Pyro_854 Posted May 24, 2006 Share Posted May 24, 2006 I'm trying to insert styles and images with javascript, but it's not working.I checked my javascript console and this is what it says:Error: missing ) after argument listSource File: file:///D:/Web/under-the-keyboard/style.jsLine: 1, Column: 27Source Code:document.write("<link rel="stylesheet" type="text/css" href="utk-s1.css">")Error: missing ) after argument listSource File: file:///D:/Web/under-the-keyboard/logo.jsLine: 1, Column: 26Source Code:document.write("<img src="utk-logo.png" width="950" height="200">")Here is the html <html> <head> <script src="style.js"> </script> <title> Under the Keyboard </title> </head> <body> <table border="1"> <tr> <td colspan="3" width="1000" height="200"> <script src="logo.js"> </script> </td> </tr> Yes my tags are properly closed... it works without the javascript. Link to comment Share on other sites More sharing options...
scott100 Posted May 25, 2006 Share Posted May 25, 2006 It looks like a quote problem, you must nest your quotes properlyincorrectdocument.write("<img src="utk-logo.png" width="950" height="200">")correct (see the single quotes)document.write('<img src="utk-logo.png" width="950" height="200">');Change that on both the problem lines of code. Link to comment Share on other sites More sharing options...
Pyro_854 Posted May 25, 2006 Author Share Posted May 25, 2006 It woks perfectly now... thanks for the help. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now