mikwit Posted June 6, 2010 Share Posted June 6, 2010 So I know this should be an easy fix, but I've tried every thing I can think of and still nothing will get this error to go away. I looked for escaped quotations, but I couldn't find any, and I use textwrangler to do editing so it would have been more visible if that was the problem. Also I'm new to the whole javascript thing, but have a decent background in php. Here's the code. I'm getting the error in firebug "missing ) after argument list });\n" Just as a note I'm using jquery with flot. $(function () { var options = { lines: { show: true } , xaxis: { min: 0 } }; var data1 = []; var placeholder = $("#placeholder"); var show1= 0; $.plot(placeholder, data1, options); // fetch one series, adding to what we got var alreadyFetched = {}; $("input.fetchSeries1").click(function () { data1= []; if (show1 == 0) { show1 = 1; } else { show1 = 0; } plot(show1); } }); //Error is here function plot(show1){ var weight = document.getElementById("weight").value ; var dataurl = "http://drink.mikwit.com/test3_data.php" + "?w="+ weight"; if (show1 == 1) { var dataurl = dataurl + "&opt1=1"; } // then fetch the data with jQuery function onDataReceived(series) { // extract the first coordinate pair so you can see that // data is now an ordinary Javascript object data1.push(series); } // and plot all we got $.ajax({ url: dataurl, method: 'GET', dataType: 'json', success: onDataReceived }); $.plot(placeholder, data1, options); } Quote Link to comment Share on other sites More sharing options...
mikwit Posted June 6, 2010 Author Share Posted June 6, 2010 Sorry, I figured it out myself, I had both a missing ) and an extra " which was throwing me off... 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.