JavaScript - Prototype 1.7 Uncaught Exception Issue With Syntax Error, Unrecognized Expression
uncaught exception: Syntax error, unrecognized expression:
Code:
:([rel*=qnt_Rc]) I have this code: Code: grpDiv = $$('div:([rel*=' + txt_val + '])'); Which when operaterated on, we have: Code: grpDiv = $$('div:([rel*=qnt_Rc]) This error: uncaught exception: Syntax error, unrecognized expression: Code: :([rel*=qnt_Rc]) Is new. The code in question has been around for about a year and no issues with prototype 1.6.1. Yet we upgraded to 1.7, and this error started showing. any ideas what this could be and how to fix it? thanks Similar TutorialsHey folks. I am needing some help with an error I'm getting from a project I'm working on. First off let me preface this all with the fact that I'm a total javascript noob. I'm really trying to understand what I'm doing wrong. So any help or advice is MORE than welcome. Here's what is happening. I found this code that will duplicate a row in a table and modifiy the name of a input in the row. Well for my purposes I have two different tables I need to work with. (each one idividually) So I changed the code a bit to make it accecpt a variable to use for the table name. (before it was static) and now I'm getting a error. Code: Error: uncaught exception: [Exception... "Component returned failure code: 0x80004003 (NS_ERROR_INVALID_POINTER)" nsresult: "0x80004003 (NS_ERROR_INVALID_POINTER)" location: "JS frame :: http://www.tourandtravelnow.com/admin/scripts/faxPageScript.js :: addRow :: line 14" data: no] This is the old code that would work (only for one of the tables) Code: var clone; function cloneRow(){ var rows=document.getElementById('mytab').getElementsByTagName('tr'); var index=rows.length; clone=rows[index-1].cloneNode(true); var inputs=clone.getElementsByTagName('input'), inp, i=0 ; while(inp=inputs[i++]){ inp.name=inp.name.replace(/\d/g,'')+(index+1); } } function addRow(){ var tbo=document.getElementById('mytab').getElementsByTagName('tbody')[0]; tbo.appendChild(clone); cloneRow(); } onload=cloneRow; and here is my code that doesn't work. Code: var clone; function cloneRow(mytab){ var rows=document.getElementById(mytab).getElementsByTagName('tr'); var index=rows.length; clone=rows[index-1].cloneNode(true); var inputs=clone.getElementsByTagName('input'), inp, i=0 ; while(inp=inputs[i++]){ inp.name=inp.name.replace(/\d/g,'')+(index+1); } } function addRow(mytab){ alert(mytab); var tbo=document.getElementById(mytab).getElementsByTagName('tbody')[0]; tbo.appendChild(clone); cloneRow(mytab); } onload=cloneRow(mytab); So like I said any help would AWESOME! have a great day. Kevin. Double post I'm sorry. Please look at my other one.
I can't get any info from Firebug except that one line, uncaught exception [object Object]. The code fully worked, then I needed to make it dynamically create Sortables from the scriptaculous library based on how many X were in a table in my database, which I've done, and I'm thinking it may be a simple slight parse error of some type, I'm not too good with Javascript, because now my script barely works. I've double checked the script's source code, the PHP variables are exactly what they should be. Code: print<<<HERE Sortable.create('sortlist$box', { tag: 'img', overlap:'horizontal',constraint:false, containment: $list, dropOnEmpty: true, onChange: function(item) { var list = Sortable.options(item).element; if(changeEffect) changeEffect.cancel(); changeEffect = new Effect.Highlight('changeNotification', {restoreColor:"transparent" }); }, onDrop: function(item) { var thing=Sortable.options(item).element.identify(); var anchors = document.getElementById(thing).childNodes.length-2; if(anchors > 20){ alert('This box had 20 creatures in it already, your last action has not been saved.'); window.location.reload(); } else{ new Ajax.Request("saveImageOrder.php", { method: "post", parameters: { data: Sortable.serialize("sortlist$box") } }); } } }); HERE; $box++; } ?> }); </script> if you solve this I'll send ya $10 via paypal I was working on a tutorial for some ajax uploading stuff and I ran across a new function syntax I don't recognize. I am not a Javascript pro, but I am not a newbie either. here is the code I am working on: Code: function handleFileSelect(e){ var files = e.target.files; var output = []; for(var i=0,f;f=files[i];i++){ if(f.type.match('image.*')){ var reader = new FileReader(); reader.onload = (function(theFile){ return function(e){ var span = document.createElement('span'); span.innerHTML = ['<img class="thumb" src="',e.target.result,'" title="',theFile.nbame,'" />'].join(''); document.getElementById('list').insertBefore(span,null); }; })(f); reader.readAsDataURL(f); } } document.getElementById('list').innerHTML = '<ul>'+output.join('')+'</ul>'; } document.getElementById('files').addEventListener('change',handleFileSelect,false); To be a little more clear, the code in question is that is the very middle. The syntax I don't understand is: Code: class.event = (function(arguments){ //stuff you put in a function... })(more Arguments?); I tried to customize a simple one to learn for myself and I wrote this: Code: var a = 'A'; var b = 'B'; test = (function(t){ alert(t); alert(b); })(b); test(a); The browser would alert 'B' and that's it. The console would tell me that 'test is not a function.' OK, so I am confused. The topmost code works. What I am wondering is what the syntax is called for creating a function (or event listener?) that way, and how it works. Although if I new what it was called I could just google how it works. Hi, all~..According to ECMAScript, the root of the prototype chain is Object.Prototype. Each object has an internal property [[Prototype]] that could be another object or NULL.... However, it also says that every function has the Function prototype object: Function.Prototype, it confused me, because a function is an object, for a function object, what is its function prototype and object prototype..For example: Code: var x = function (n) {return n+1;}; what is the relationships of x, Object.Prototype and Function.Prototype Thx a lot !!!!!!!!! ok so Code: <p> Howdy <p> expressed as a literal string that is passed to the setTimeout() function might look like this: Code: setTimeout("document.getElementById('first').innerHTML = '<p>' + 'HOWDY' + '<\/p>';", 2000); ..so I guess you can't just put quotes around an expression like this: "'<p> HOWDY <\/p>;" So tags have to be isolated, but it get confusing with expressions like this, which I am not sure how to express as a string: Code: <p><h2 class="pos_left"> <img src="car1.jpg" name="slide" width="400" height="250" /> </h2> </p> ^ I wish I could change the " in there to ' and then just wrap the whole thing in double " This is what I came up with but it did not work: Code: setTimeout("document.getElementById('first').innerHTML = '<p>' + '<h2' + 'class='pos_left'' + '>' + '<img' + 'src='car1.jpg'' + 'name='slide'' + 'width='400'' + 'height='250'' + '/>' + '</h2>' + '<\/p>';", 4000); Hello: I have a Fire Fox 3.5.2 error console message regarding a DHTML script: Error: uncaught exception: [Exceptions: ... "Not enough arguments" nsresult "0x8057001 (NS_ERROR_XPC_NOT_ENOUGH_ARGS)" Location: "JS frame :: (file path) upHandler :: line 102" no data] The line referenced is: document.removeEventListener('mouseup', upHandler); It is part of a drag function that is applied to a container div. I have successfull used this code block, copied from Orielly's Javascript: The Definitive Guide, 4th Edition in another project. The only real difference is that the code in the working use is div tags hard coded. In the one giving me problems, the div tags are written using document.write() in a function that is called in the body of the document when the page loads. I could supply the code context, but it is several hundred lines. The project is not available at present on the web to surf to but the one project that works is jekillen.com/jekillen/content/web_design/OOP_panel/test_OOP_DEV_ALT.php The code in question is 'beginDrag'. There is a panel called fortune cookie which the user can drag, and a panel called 'Advisory' that the user can also drag around after clicking button labeled 'message'. Any info, suggestions, advice? Thanks in advance. Jeff K Code: /* Assignment * Change Request #7 Requestor: Ninfa Pendleton - Rapid City, SD Write the program in Java (with a graphical user interface) and have it calculate and display the mortgage payment amount from user input of the amount of the mortgage and the user's selection from a menu of available mortgage loans: - 7 years at 5.35% - 15 years at 5.5% - 30 years at 5.75% Use an array for the mortgage data for the different loans. Read the interest rates to fill the array from a sequential file. Display the mortgage payment amount followed by the loan balance and interest paid for each payment over the term of the loan. Add graphics in the form of a chart. Allow the user to loop back and enter a new amount and make a new selection or quit. Please insert comments in the program to document the program. *///////////////////////////////////////////////// // Java utilities import javax.swing.*; import java.awt.event.*; import java.lang.Math.*; import java.text.NumberFormat; import javax.swing.ButtonGroup; import java.awt.Graphics; public class MortgageCR7 extends JFrame { public static void main(String[] args) { new MortgageCalculator5(); } // Declare buttons, text fields, and labels private JButton calculate; private JButton exit; private JButton calc; private JTextField enterAmount; private JTextField enterInterest; private JTextField enterMonth; private JLabel loan; private JLabel interest; private JLabel mRate; private JLabel blankspace; private JLabel data; private JLabel data1; private JLabel data2; private JRadioButton term7; private JRadioButton term15; private JRadioButton term30; public MortgageCR7() { // set the size of the frame this.setSize(350, 350); // what the "exit" button will do when clicked. this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); // Title of frame this.setTitle("Mortgage Calculator"); // Create the layout JPanel mainpanel = new JPanel(); // panel1 JPanel panel1 = new JPanel(); data = new JLabel("Please fill out the amount of the loan."); panel1.add(data); mainpanel.add(panel1); // panel2 JPanel panel2 = new JPanel(); loan = new JLabel("Amount of Loan"); enterAmount = new JTextField(8); panel2.add(loan); panel2.add(enterAmount); mainpanel.add(panel2); // panel3 JPanel panel3 = new JPanel(); data1 = new JLabel("Choose between rate & term"); panel3.add(data1); mainpanel.add(panel3); // panel4 JPanel panel4 = new JPanel(); ButtonGroup choice = new ButtonGroup(); term7 = new JRadioButton("30 Years @ 5.75%"); term15 = new JRadioButton("15 Years @ 5.5%"); term30 = new JRadioButton("7 Years @ 5.35%"); panel4.add(term7); choice.add(term7); panel4.add(term15); choice.add(term15); panel4.add(term30); choice.add(term30); mainpanel.add(panel4); // panel5 JPanel panel5 = new JPanel(); calc = new JButton("Calculate Choice"); panel5.add(calc); mainpanel.add(panel5); // panel6 JPanel panel6 = new JPanel(); data2 = new JLabel("Or fill in yourself."); panel6.add(data2); mainpanel.add(panel6); //panel7 JPanel panel7 = new JPanel(); interest = new JLabel("Interest Rate"); enterInterest = new JTextField(8); panel7.add(interest); panel7.add(enterInterest); mainpanel.add(panel7); // panel8 JPanel panel8 = new JPanel(); mRate = new JLabel("Term of Loan"); enterMonth = new JTextField(8); panel8.add(mRate); panel8.add(enterMonth); mainpanel.add(panel8); // panel9 JPanel panel9 = new JPanel(); blankspace = new JLabel(" "); panel9.add(blankspace); mainpanel.add(panel9); // panel10 JPanel panel10 = new JPanel(); calculate = new JButton("Calculate"); exit = new JButton("Exit"); panel10.add(calculate); panel10.add(exit); mainpanel.add(panel10); // Creating the event listener ClickListener click = new ClickListener(); // Create Action Listeners calculate.addActionListener(click); exit.addActionListener(click); calc.addActionListener(click); // adds all 10 panels together this.add(mainpanel); // set see the frame this.setVisible(true); } public void paint(Graphics g) { double width = 900.00; int height= 400; double x=1.0; double y=0.0; int counter = 0; double xincrement = (width/(dblLoanDuration*12)); double yincrement = height/dblLoanAmount; g.drawString("Payments", 65, 10); while (counter <= 10) { x = x + xincrement; g.drawString(Integer.toString((int)((((dblLoanDuration*12)/10)*counter))), (int)((width/10)*counter)+55, 20); counter++; drawn = true; } double amount=dblLoanAmount; double payment=amount/12; g.drawString("Amount", 0, 20); while (y < height) { y = y + (height/12); g.drawString(paymentFormat.format(amount), 0, (int)y); amount = amount-payment; } // begin the events // Create Action Listeners calculate.addActionListener(click); public void actionPerformed(ActionEvent p) { if (p.getSource() == calc) // if user clicks the calculate button { try { // convert text entry into numbers double receiveAmount = Double.parseDouble(enterAmount.getText()); // create the arrays for the three different loans int Terms[] = {7, 15, 30}; // loan in years double InterestArray[] = {5.35, 5.5, 5.75}; // interest as a percent // Array 1 if (term7.isSelected()) { double receiveInterest = InterestArray[0]; double receiveTerms = Terms[0]; double interest1 = (receiveInterest / (12 * 100)); double term1 = (receiveTerms * 12); double term2 = (1 + interest1); double pay1 = Math.pow(term2, -term1); double payment = ((receiveAmount * interest1) / (1 - pay1)); double interestpay; double remainBal = receiveAmount; // create the number format NumberFormat fixdecimal = NumberFormat.getNumberInstance(); fixdecimal.setMinimumFractionDigits(2); fixdecimal.setMaximumFractionDigits(2); // Create counter for (int x = 1; x <= term1; x++) { interestpay = (remainBal * interest1); double interestout = 0; remainBal = (remainBal - (payment - interestpay)); interestout = (interestout + interestpay); // The output based on amount input and loan selection. JOptionPane.showMessageDialog(null, "Original Balance = $" + receiveAmount + "\nPayment #" + x + "\nMonthly Payment $" + fixdecimal.format(payment) + "\nRemaining Balance $" + fixdecimal.format(remainBal) + "\nInterest Paid $" + fixdecimal.format(interestpay), "Payment History", JOptionPane.PLAIN_MESSAGE); } // Exit or enter option. int finalanswer = JOptionPane.showConfirmDialog(null, "Would you like to input a new amount?" + "\n\n(chose Yes to continue or No to Exit)", "Continue", JOptionPane.YES_NO_OPTION); if (finalanswer == JOptionPane.NO_OPTION) { System.exit(0); } else if (finalanswer == JOptionPane.YES_OPTION) { // if the user chooses 'yes' the amount field will blank out enterAmount.setText(null); } // Array 2 } else if (term15.isSelected()) { double receiveInterest = InterestArray[1]; double receiveTerms = Terms[1]; double interest1 = (receiveInterest / (12 * 100)); double term1 = (receiveTerms * 12); double term2 = (1 + interest1); double pay1 = Math.pow(term2, -term1); double payment = ((receiveAmount * interest1) / (1 - pay1)); double interestpay; double remainBal = receiveAmount; // create the number format NumberFormat fixdecimal = NumberFormat.getNumberInstance(); fixdecimal.setMinimumFractionDigits(2); fixdecimal.setMaximumFractionDigits(2); // Create counter for (int x = 1; x <= term1; x++) { interestpay = (remainBal * interest1); double interestout = 0; remainBal = (remainBal - (payment - interestpay)); interestout = (interestout + interestpay); // The output based on amount input and loan selection. JOptionPane.showMessageDialog(null, "Original Balance = $" + receiveAmount + "\nPayment #" + x + "\nMonthly Payment $" + fixdecimal.format(payment) + "\nRemaining Balance $" + fixdecimal.format(remainBal) + "\nInterest Paid $" + fixdecimal.format(interestpay), "Payment History", JOptionPane.PLAIN_MESSAGE); } // Exit or enter option. int finalanswer = JOptionPane.showConfirmDialog(null, "Would you like to enter a new amount?" + "\n\n(chose Yes to continue or No to Exit)", "Continue", JOptionPane.YES_NO_OPTION); if (finalanswer == JOptionPane.NO_OPTION) { System.exit(0); // If the user chooses 'yes' the amount field will blank out } else if (finalanswer == JOptionPane.YES_OPTION) { enterAmount.setText(null); } // Array 3 } else if (term30.isSelected()) { double receiveInterest = InterestArray[2]; double receiveTerms = Terms[2]; double interest1 = (receiveInterest / (12 * 100)); double term1 = (receiveTerms * 12); double term2 = (1 + interest1); double pay1 = Math.pow(term2, -term1); double payment = ((receiveAmount * interest1) / (1 - pay1)); double interestpay; double remainBal = receiveAmount; // create the number format NumberFormat fixdecimal = NumberFormat.getNumberInstance(); fixdecimal.setMinimumFractionDigits(2); fixdecimal.setMaximumFractionDigits(2); // Create counter for (int x = 1; x <= term1; x++) { interestpay = (remainBal * interest1); double interestout = 0; remainBal = (remainBal - (payment - interestpay)); interestout = (interestout + interestpay); // The output based on amount input and loan selection. JOptionPane.showMessageDialog(null, "Original Balance = $" + receiveAmount + "\nPayment #" + x + "\nMonthly Payment $" + fixdecimal.format(payment) + "\nRemaining Balance $" + fixdecimal.format(remainBal) + "\nInterest Paid $" + fixdecimal.format(interestout), "Payment History", JOptionPane.PLAIN_MESSAGE); } // Exit or enter option. int finalanswer = JOptionPane.showConfirmDialog(null, "Would you like to enter a new amount?" + "\n\n(chose Yes to continue or No to Exit)", "Continue", JOptionPane.YES_NO_OPTION); if (finalanswer == JOptionPane.NO_OPTION) { System.exit(0); // If the user chooses 'yes' the amount field will blank out } else if (finalanswer == JOptionPane.YES_OPTION) { enterAmount.setText(null); } } } catch (NumberFormatException e) { } } // Create a new event if (p.getSource() == calculate) { try { // turn text entries into numbers double receiveAmount = Double.parseDouble(enterAmount.getText()); double receivePerc = Double.parseDouble(enterInterest.getText()); double receiveTerm = Double.parseDouble(enterMonth.getText()); double receiveInterest = receivePerc; double receiveTerms = receiveTerm; double interest1 = (receiveInterest / (12 * 100)); double term1 = (receiveTerms * 12); double term2 = (1 + interest1); double pay1 = Math.pow(term2, -term1); double payment = ((receiveAmount * interest1) / (1 - pay1)); double interestpay; double remainBal = receiveAmount; // create the number format NumberFormat fixdecimal = NumberFormat.getNumberInstance(); fixdecimal.setMinimumFractionDigits(2); fixdecimal.setMaximumFractionDigits(2); // Create counter for (int x = 1; x <= term1; x++) { interestpay = (remainBal * interest1); double interestout = 0; remainBal = (remainBal - (payment - interestpay)); interestout = (interestout + interestpay); // The output based on amount input and loan selection. JOptionPane.showMessageDialog(null, "Original Balance = $" + receiveAmount + "\nPayment #" + x + "\nMonthly Payment $" + fixdecimal.format(payment) + "\nRemaining Balance $" + fixdecimal.format(remainBal) + "\nInterest Paid $" + fixdecimal.format(interestout), "Payment History", JOptionPane.PLAIN_MESSAGE); } // Exit or enter option. int finalanswer = JOptionPane.showConfirmDialog(null, "Would you like to enter a new amount?" + "\n\n(chose Yes to continue or No to Exit)", "Continue", JOptionPane.YES_NO_OPTION); if (finalanswer == JOptionPane.NO_OPTION) { System.exit(0); // if the user chooses 'yes' the amount field will blank out } else if (finalanswer == JOptionPane.YES_OPTION) { // resets the entry fields enterAmount.setText(null); enterInterest.setText(null); enterMonth.setText(null); } } catch (NumberFormatException e) { } } // Event Exit button if (p.getSource() == exit) { System.exit(0); } } } } (just started JS 2 weeks ago) -- this is also my first time posting here, if my post isnt following the proper template let me know and Ill fix it .. Thanks so much for taking the time to check this out in advance Im trying to make the first ul tag in the each slideMenus[] array index values have a position of left = 0px I keep recieving this error however ____________________________________________________ Error: slideMenus[i].getElementsByTagName("ul").style is undefined Line: 63 ------------------------------------------------------------------ the script in question is in [code]. Could someone tell me if I am just making a syntax error if not ill try redoing the whole thing. window.onload = makeMenus var currentSlide = null var timeID = null leftPos = 0 function makeMenus(){ var slideMenus = new Array() var allElems = document.getElementsByTagName("*") var slideListArr = new Array() for(var i=0 ; i < allElems.length ; i++){ if(allElems[i].className = "slideMenu") slideMenus.push(allElems[i]) } for(var i=0 ; i < slideMenus.length ; i++){ slideMenus[i].onclick = showSlide; Code: slideMenus[i].getElementsByTagName("ul")[0].style.left = "0px"; } document.getElementById("head").onClick = closeSlide document.getElementById("main").onClick = closeSlide } function showSlide(){ var slideList = this.getElementsByTagName("ul")[0] // mess with this if((currentSlide != null) && (currentSlide.id == slideList.id)) {closeSlide()} else{ closeSlide(); var currentSlide = slideList; currentSlide.style.display = "block"; timeID = setInterval('moveSlide()', 1); } } function closeSlide(){ if(currentSlide){ clearInterval(timeID); currentSlide.style.left = "0px" currentSlide.style.display = "none"; var currentSlide = null } } function moveSlide(){ var leftPos = leftPos + 5; if(leftPos <= 220) {currentSlide.style.left = leftPos + "px"} else{ clearInterval(timeID); var leftPos = 0} } On this page http://jimpix.co.uk/ecards/262-no-words.html I get this Javascript error in IE6: Code: Line: 5 Character: 1 Code: 0 Error Message: Syntax error URL: http://jimpix.co.uk/ecards/262-no-words.html I'm using the DebugBar add in for IE (http://www.debugbar.com/) The error message in DebugBar is this: http://jimpix.co.uk/junk/error.png And the view-source of the page is he http://jimpix.co.uk/junk/source-code.png I don't get the error in Firefox 3 or IE7. I can't work out how to fix it. Any advice would be much appreciated. Thanks! Code: out += (out ? rogueArray[14] : rogueArray[13]) + arrayItem + ((vanWilder[arrayItem] !== null) ? = + encodeURIComponent(vanWilder[arrayItem]) : rogueArray[13]); There is supposedly a syntax error here on the line up until [arrayItem in Dreamweaver. Any help? Can someone point where i'm going wrong? I want to evaluate the values of 'miles' to be >=0 and 'putime' to between 0 and 24 only. Code: <script type = "text/javascript"> function TaxiFare() { // calculates taxi fare based upon miles travelled // and the hour of the day in military time (0-23). var baseFare = 2.50; var costPerMile = 2.00; var nightSurcharge = 0.50; // 8pm to 6am, every night var milesTravelled = Number(document.getElementById("miles").value); var pickupTime = Number(document.getElementById("putime").value); var cost = baseFare + (costPerMile * milesTravelled); // add the nightSurcharge to the cost if it is after // 10pm or before 6am if (pickupTime >= 22 || pickupTime < 6) { cost += nightSurcharge; } if((document.getElementById('miles').value>=0)&&(document.getElementById('putime').value>=0||<=24) { alert("Your taxi fare is $" + cost.toFixed(2)); } else{return 0;} } </script> Hi, Im currently building my first website, I'm trying to use a JQuery Slider effect for a top banner, however I seem to be getting a syntax error after the javascript. Any ideas? Ive attached a screenshot of the code Thanks Simon Hopefully this is something easy to fix. I am using Javascript in Adobe Pro 9 for a form and though I managed to get a different if/else to work, this nested one is giving me fits. If anyone could correct, I would like to know why it fails. I get the following error which highlights the blue line of code: SyntaxError: syntax error 169: at line 170 Code: var ACDex = this.getField("ACDex"); var ArmorMaxDex = this.getField("ArmorMaxDex").value; var ShieldMaxDex = this.getfield("ShieldMaxDex").value; if(ArmorMaxDex => ShieldMaxDex){ if(ArmorMaxDex => DexMod){ ACDex.value = ArmorMaxDex; }Else{ ACDex.value = DexMod; } }Else{ if(ShieldMaxDex => DexMod) { ACDex.value = ShieldMaxDex; }Else{ ACDex.value = DexMod; } } why does my javascript function run right away when the page loads? but not wen the button is clicked? its working the opposite to how i want it to i didnt include the other html tags to help focus on this. Btw im tryna avoid the method of having the onclick="funct()" method which would be written in the button tag. Thank you. <body> <button id="mybutton">Click me</button> </body> <script type = "text/javascript"> var b = document.getElementById("mybutton"); b.onclick = funct() function funct() { alert("Thanks for clicking me!"); } </script> Dreamweaver is giving me a syntax error, but i dont understand what is wrong. i copied the line from the source code of the demo file included in the download and it it still telling me there is a syntax error. obviously something is wrong bc my slider isnt auto-sliding. so then i tried copying and pasting from the source code of the web page i got the slider from (http://www.ndoherty.biz/demos/coda-slider/2.0/) Dreamweaver then moved the syntax error warning to the line that only contains my closing script tag what am i doing wrong? why am i getting syntax errors? how can i make this thing autoslide? full code available at: http://mydomainsample.com/fire_rebuild greetings, I'm unable to find solution for dreamweaver reporting syntax error with the following page: http://www.redskyjewelry.com/test_product_detail.html I am revamping my website so the css is not set up for this page but that's okay. I have put in the various javascripts based on the product so the page is similar to a template. The syntax error is for the second set of boxes, the bracelet length options, and specifically for line with: form.amount.value = 6.5 inches; from the following script-- <SCRIPT language=javascript> function BraceletLength(form) { if (form.os0.value == "6.5 inches") { form.amount.value = 6.5 inches; form.item_number.value = "6.5 inches"; } if (form.os0.value == "7 inches") { form.amount.value = 7 inches; form.item_number.value = "7 inches"; } if (form.os0.value == "7.5 inches") { form.amount.value = 7.5 inches; form.item_number.value = "7.5 inches"; } if (form.os0.value == "8 inches") { form.amount.value = 8 inches; form.item_number.value = "8 inches"; } } </SCRIPT> I hope I have included enough information and I thank any input into this glitch I am having. I'll check back tomorrow, and thank you. judith I'm trying to render 14 same sized images on a webpage using a Javascript, I've used in the past, but now can't seem to get it to work. Getting a Syntax Error. On Page http://www.newenglandonline.net/index.fix.html The ERROR appears to be on the following; line 270: var imageDir = ; [CODE] <script type="text/javascript"> (function() { var rotator = document.getElementById(rotator); var imageDir = ; var delayInSeconds = 3; var images = [Cannon_top.jpg,Mount-Washington-Summer.jpg,Mount-Washington-Winter.jpg,Boston_Charles.jpg,Boston_Harbor.jpg,Boston_Harbor_night.jpg,Zakim Bridge.jpg,Edgartown.jpg,GayHeadLighthouse.jpg,HighlandLight.jpg,Newport.jpg,Bridgeport.jpg,Eastpoin tLight.jpg]; var num = 0; var changeImage = function() { var len = images.length; rotator.src = imageDir + images[num++]; if (num == len) { num = 0; } }; setInterval(changeImage, delayInSeconds * 1000); })(); </script> [CODE] Any help or insight will be greatly appreciated. Thanks in advance. Hi, For the life of me I can't work out what is wrong with the code he http://www.spencercarpenter.co.uk/po...162&fgh=showMe I know it is somthing to do with the url and that it is a synax error but I really am stuck as I cant see what it is. If anyone could help me resolve this I would be very grateful. Thanks for any help. Spencer |