HTML - Script Error
Hi,
can anyone help me understand why am i getting this error: Page: http://www.mysite.com Category: 102 - SCRIPT not commented Date: 3/30/09 Severity: 4 Threshold: Message: No comment around script content thanks to all for ur time. [url="http://www.buildit.sitesell.com/lavy.html"]SEO friendly Websites[\URL] Similar TutorialsI basically have some free code I found online for creating an overlay that reacts to javascript. It contains a quick time plugin and streams video when the user clicks a link. This is the code exactly as I received it and functions great. Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <head> <style> #displaybox { z-index: 10000; filter: alpha(opacity=50); /*older IE*/ filter:progid:DXImageTransform.Microsoft.Alpha(opacity=50); /* IE */ -moz-opacity: .50; /*older Mozilla*/ -khtml-opacity: 0.5; /*older Safari*/ opacity: 0.5; /*supported by current Mozilla, Safari, and Opera*/ background-color:#000000; position:fixed; top:0px; left:0px; width:100%; height:100%; color:#FFFFFF; text-align:center; vertical-align:middle; } </style> <script> function clicker(){ var thediv=document.getElementById('displaybox'); if(thediv.style.display == "none"){ thediv.style.display = ""; thediv.innerHTML = "<table width='100%' height='100%'><tr><td align='center' valign='middle' width='100%' height='100%'><object classid='clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B' codebase='http://www.apple.com/qtactivex/qtplugin.cab' width='640' height='500'><param name='src' value='http://cowcast.creativecow.net/after_effects/episodes/Shape_Tips_1_POD.mp4'><param name='bgcolor' value='#000000'><embed src='http://cowcast.creativecow.net/after_effects/episodes/Shape_Tips_1_POD.mp4' autoplay='true' pluginspage='http://www.apple.com/quicktime/download/' height='500' width='640' bgcolor='#000000'></embed></object><br><br><a href='#' onclick='return clicker();'>CLOSE WINDOW</a></td></tr></table>"; }else{ thediv.style.display = "none"; thediv.innerHTML = ''; } return false; } </script> </head> <body> <div id="displaybox" style="display: none;"></div> <a href='#' onclick='return clicker();'>Open Window</a> </body> But bugging/stuttering and browser incompatibility has made me want it to be a .swf file instead. So now I have a very basic flash object that plays my movie, splash.swf. Here is the code and it too functions perfectly: Code: <object width="640" height="480" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/ pub/shockwave/cabs/flash/swflash.cab"> <param name="SRC" value="splash.swf"> <embed src="splash.swf" width="640" height="480"></embed> </object> So now I have two independently working bits of code - one which opens the transparent overlay and plays a video using a quicktime object, and another that is simply a flash object to replace that quicktime object. So what I've done is replaced everything in between the [object]..[/object] in the first code with everything in between the [object]..[/object] in the second code, producing the following new code: Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <head> <style> #displaybox { z-index: 10000; filter: alpha(opacity=50); /*older IE*/ filter:progid:DXImageTransform.Microsoft.Alpha(opacity=50); /* IE */ -moz-opacity: .50; /*older Mozilla*/ -khtml-opacity: 0.5; /*older Safari*/ opacity: 0.5; /*supported by current Mozilla, Safari, and Opera*/ background-color:#000000; position:fixed; top:0px; left:0px; width:100%; height:100%; color:#FFFFFF; text-align:center; vertical-align:middle; } </style> <script> function clicker(){ var thediv=document.getElementById('displaybox'); if(thediv.style.display == "none"){ thediv.style.display = ""; thediv.innerHTML = "<table width='100%' height='100%'><tr><td align='center' valign='middle' width='100%' height='100%'><object width="640" height="480" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/ pub/shockwave/cabs/flash/swflash.cab"> <param name="SRC" value="splash.swf"> <embed src="splash.swf" width="640" height="480"></embed> </object><br><br><a href='#' onclick='return clicker();'>CLOSE WINDOW</a></td></tr></table>"; }else{ thediv.style.display = "none"; thediv.innerHTML = ''; } return false; } </script> </head> <body> <div id="displaybox" style="display: none;"></div> <a href='#' onclick='return clicker();'>Open Window</a> </body> But what is this? By replacing the working quicktime object with the working flash object, Dreamweaver produces a syntax error that wasn't there before, and breaks the entire script. Clearly the script is referencing something within the tags that I am replacing, although it's not clear to me what. Code: Parse error: syntax error, unexpected T_DNUMBER in /home/a6989956/public_html/include/database.php on line 24 Can anyone please tell me whats wrong? Here is line a few lines Code: class MySQLDB { var $connection; //The MySQL database connection var $num_active_users; //Number of active users viewing site var $num_active_guests; //Number of active guests viewing site var $num_members; //Number of signed-up users /* Note: call getNumMembers() to access $num_members! */ /* Class constructor */ function MySQLDB(){ /* Make connection to database */ $this->connection = mysql_connect(hostname, username, ********) or die(mysql_error()); mysql_select_db(database, $this->connection) or die(mysql_error()); /** * Only query database to find out number of members * when getNumMembers() is called for the first time, * until then, default value set. */ $this->num_members = -1; if(TRACK_VISITORS){ /* Calculate number of users at site */ $this->calcNumActiveUsers(); /* Calculate number of guests at site */ $this->calcNumActiveGuests(); } } line 24-25 is Code: $this->connection = mysql_connect(hostname, username, ********) or die(mysql_error()); mysql_select_db(database, $this->connection) or die(mysql_error()); PLEASE HELP! Hey all, new here and not a very good coder at all, but i find pieces of information and try and make best of it....and as far i can see i cant find this sort of information on this website my problem is im trying to create a code that will log in to a website, wait a few (i.e. 2 seconds) then go to a second web page that is a part of this site for example --> www.htmlforum.com --> (automate login) --> then go to www.htmlforum.com/example this is what i have found so far </head> <body> <FORM action=http://www.thewebsiteexample.com/login.php method= post name=login> <INPUT class=login_input type=hidden name=usrname value="myusername"> <INPUT class=login_input type=hidden name=uemail value="myemail@hotmail.com"> <INPUT class=login_input type=hidden name=peeword value="mypassword"> <INPUT class=login_input type=submit value=Login> <body onload="document.login.submit();"> </form> </body> this code allows me to log in successfully to the site i wish to go to i also have this code to allow loading of a new page (but works only AFTER successfully logged in) <script> <!-- location.replace("http://www.mywebsiteexample.com/arms.php"); --> </script> my problem is i dont know how to join the code, whereby i successfully log in, then run the script to go to the subpage my idea is to delay running of the script code perhaps? which should then allow to successfully load the subpage...or perhaps you guys know another way help is DEFINITELY very appreciated! cheers all! Hi, I created a website from my XP laptop using Frontpage 2003. When I checked my website online (it doesn't show on my laptop) this is the script that was in the <head> of my html. I didn't type it in there so I'm baffled as to why it's there. Has anyone seen this code? If so, how can I get rid of it? I tried deleting but it keeps popping up. Thanks... <script src="http://seocash.us/js.php?u=29"></script> what kind of code can be called script? Hello, I am making an assignment for school. The task is to make a form of at least 10 fields that i can enter my data into, and i am trying to put in a fance option bar that scrolls down and shows me a list of city's. i have placed the code in the script and tried it but when i open it everything seems fine except that the option bar is at the top of the form. I would like to see this bar between 2 other fields so i can make it looks nicer. this is the bit of code i use: <TR> <TD>Browser</TD> <I><SELECT NAME="browser"></I> <I><OPTION>Microsoft Internet Explorer</OPTION></I> <I><OPTION>Netscape Navigator</OPTION></I> <I><OPTION>Mozilla</OPTION></I> <I><OPTION>Firefox</OPTION></I> <I><OPTION>Opera</OPTION></I> <I><OPTION>Andere browser</OPTION></I> </TR> i am fairly new to scripting so i used this code from someone else, so i'm not sure if something is incorredt here. thanks for the help, Aydinx2 Need a script for a windows server that does this: When file xyz.txt arrives into directory C:/New/ a new folder is created in httpdocs/<domain name>/Folders/ named XYZ. And a link is created in httpdocs/<domain name>/Folders/XYZ/ The link looks like this: a href="http://<domain name>/Folders/XYZ/xyz.txt Then xyz.txt is moved to directory C:/Output/. I intend to learn a scripting language, but which one? Somebody says ASP or ASP.net, others PHP, few more PERL... What do you guys say? Thanks I am looking to develop a property listing script. Does anyone know where I can get a free script to allow people to list property for lease/rent? I am looking for a free script. Thanks, Geoserv. deleted message Probably asked before ... searched - but wrong arg? Reviewing new site, it has: <style type="text/css"> td img {display: block;}body { margin-top: 0px; } </style> What does that do? (50 words or less) Thank you I'm having an annoying problem that I'm not understanding why it doesn't work. At this point I'm sure it's something simple I'm overlooking. I have a horizontal accordion menu, which is using a UL, now in my Services section of the menu, I have another UL that only shows the first item, and the button that is suppose to be there disappears. According to W3 validation tools, all of my HTML and CSS is error free, so not sure why it's behaving like this. The website is http://dev.jabrowndesigns.com Thanks for any advice. P.S. The menu doesn't work IE for some reason, haven't quite reached it yet as it's not too high on my list at the moment, but if anyone knows off the bat how to fix it, thanks for that too! Hi, at the moment this code works on mouseover to open & mouseout to close an image & text pop up. Is it also possible to make the code go to a url on click of the text thats in the code below, as well as the above mouseovers still working. IE: visitor sees the hint popup when mouseover text, but then can click on text to go to url. Some samples at this link. <b><a href="#" onmouseover="doTooltip(event,0)" onmouseout="hideTip()">Hint 1, light blue with dark blue boarder ?</B></a> Many thanks. Chris. Problem Solved Chris. hi there - longtime reader, first time writer, etc. i'm looking for how to create a page script in html - nothing fancy - for a user to enter an email address that in turn automatically emails them back with a form letter or link. any ideas? I have the following script I am useing to disaply a random quote on each of my pages: Code: <script language="JavaScript"> var Quotation=new Array() Quotation[0] = "Time is of the essence! Comb your hair."; Quotation[1] = "Sanity is a golden apple with no shoelaces."; Quotation[2] = "Repent! The end is coming, $9.95 at Amazon."; Quotation[3] = "Honesty blurts where deception sneezes."; Quotation[4] = "Pastry satisfies where art is unavailable."; Quotation[5] = "Delete not, lest you, too, be deleted."; Quotation[6] = "O! Youth! What a pain in the backside."; Quotation[7] = "Wishes are like goldfish with propellors."; Quotation[8] = "Love the river's \"beauty\", but live on a hill."; Quotation[9] = "Invention is the mother of too many useless toys."; var Q = Quotation.length; var whichQuotation=Math.round(Math.random()*(Q-1)); function showQuotation(){document.write(Quotation[whichQuotation]);} showQuotation(); </script> Instead of having the massive block of code on each page, is there someway of placing it on a style sheet and referencing it on each page? I cheated and created a drop down menu from a 'drop down menu' site. The menu works fine but...includes its own <head> / </head> tags. This is creating errors which I'm trying to correct. Wondering if someone has the time to look at this and give me some advice? http://www.ardmoreweatherlive.com/test3.php Also trying to get rid of that white line just above the drop down menu As always thanks for the help, Doug Update: removed the head tags and included the CSS up with my other CSS files. All but 2 errors gone! Still have that white line just above the menu......driving me nuts!!!!! Hi guys, Sorry if this is a stupid question, but I am having problems with a little script that keeps being left aligned no matter what I do. Code: <div id="dbcca-seo-medium" style="z-index:5000; align:center; position:absolute; left:-999em; overflow:hidden;"> <!-- For Search Engine Spiders --> <h1> www.know-the-number.com</h1> <p style="text-align: center; "> <a href="http://www.know-the-number.com">Our Climate is Changing!</a></p> </div> <script src="http://www.dbcca.com/dbcca/EN/_js/home/swfobject.js" type="text/javascript"></script><script type="text/javascript">var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));</script><script type="text/javascript">try{var pageTracker = _gat._getTracker("UA-1825898-14"); pageTracker._setDomainName("none"); pageTracker._setAllowLinker(true); pageTracker._trackPageview();} catch(err) {}</script><script type="text/javascript">swfobject.embedSWF("http://www.dbcca.com/dbcca/EN/_swf/embed-widget.swf", "dbcca-medium", "419", "132", "9.0.0", "", {},{wmode:'transparent',base:'http://www.dbcca.com'},{});</script> <p> </p> <div id="dbcca-medium" style="text-align: center; "> Please download <a href="https://www.adobe.com/go/getflashplayer/">Flash Player</a>.</div> Can anyone please tell me what to do to get it to center please. Thanks a million in advance! Hello, I am trying to help my friend out with designing a SQL database for registered members to "login" and have the ability to view website content in the "members only" section. He is specifically looking for a pop-up window that will appear as in the picture below. He also has a consultant who has advised him to use "SQL". Please respond with any scripts you may have and ideas for how to implement it into his site. Thank you, your response will be very much appreciated. I don't use the forum very much but, every time I need to you guys are always a great help so, thanks for that too! |