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); } Link to comment https://forums.phpfreaks.com/topic/204023-problem-with-missing-after-argument-list/ 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... Link to comment https://forums.phpfreaks.com/topic/204023-problem-with-missing-after-argument-list/#findComment-1068593 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.