JavaScript - Javascript Error Code 0 On My Webpage?
OK, I programmed most of my page, but not all of it, not the CSS or Javascript. On all the individual HTML pages, it shows Done but with errors. Here is the error.
Webpage error details User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; InfoPath.2; Alexa Toolbar) Timestamp: Sat, 18 Dec 2010 05:18:55 UTC Message: Invalid argument. Line: 4 Char: 116 Code: 0 URI: http://www.addyourl.com/convergance/nym6pbs.js Now, the addyourl site is mine too and I put it there because I want my page to load quicker and everything that I do to make it load quicker suggest combing CSS sheets and Javascript files, but whatever the case, I don't have the technical ability to do that. My webpage is: www.fkcapitalfund.com So, I can't fix that error, I don't have the technial wherewithal to do it and the person who did the programming won't help anymore, he made the template for me and left me to my own devices unfortunately. Along the same lines as this, my goal is to get my page to load quicker and my appealing to google Any help to that end would be appreciated. Thanks Similar TutorialsHi All, This is my first post and I need some assistance. I'm learning code and attempting to put more than 1 script on a webpage, but individual (separate pages) but together, neither one works. I'm a newbie and my professor doesn't know how to teach so it's me trying to do this myself and any assistance will be helpful. This is what I have (trying to add random pictures and a cycling banner) <script> var imgArray = new Array (4); var index = 0; function cycle () { document.banner.src = imgArray[index].src; index++; if (index > 3) { index = 0; } setTimeout("cycle()", 2000); return; } function startup () { imgArray[0] = new Image; imgArray[0].src = "Im.png"; imgArray[1] = new Image; imgArray[1].src = "Tired.jpg"; imgArray[2] = new Image; imgArray[2].src = "of this.jpg"; imgArray[3] = new Image; imgArray[3].src = "Rainy.jpg"; cycle(); return; } </script> </head> <body onLoad="select();startup()"> <div align="center"> <img name="banner" src="Im.png"> </div> </body> </body> <script> var imgArray = new Array (5); var index = 0; function select () { index= Math.floor(Math.random() * 5); document.banner.src = imgArray[index].src; setTimeout("select()", 2000); return; } function startup () { imgArray[0] = new Image; imgArray[0].src = "1.jpg"; imgArray[1] = new Image; imgArray[1].src = "2.jpg"; imgArray[2] = new Image; imgArray[2].src = "3.jpg"; imgArray[3] = new Image; imgArray[3].src = "4.jpg"; imgArray[4] = new Image; imgArray[4].src = "sheep.jpg"; select(); return; } </script> </head> <body onLoad="cycle(); startup()"> <div align="center"> <img name="banner" src="1.jpg"> </div> </body> Hi all, I am new to CodingForums.com as well as new to javascript. I am currently trying to create a small calculator for a friend which is to do with calculating a dose. The calculator itself works but I am now fine tweaking the text that appears with the calculated values. This is my code: Code: <script type="text/javascript"> function calculate() { var IBW = 1; var IBW2 = 1; var dose2 = 1; var CrCl = 1; var hgtft = document.getElementById("height_feet").value - 0; var hgtinches = document.getElementById("height_inches").value - 0; var weight = document.getElementById("weight").value - 0; var sex = document.getElementById("sex").value; var age = document.getElementById("age").value - 0; var creatinine = document.getElementById("creatinine").value - 0; if (age < 16) { alert("This tool is only for use in adult patients i.e. 16 years or older"); return; //process no further } if (sex == "M") { if (hgtft < 5) { IBW = 50; IBW2 = 50; } else { IBW = 50 + (2.3 * ((hgtft - 5) * 12 + hgtinches)); IBW2 = 50 + (2.3 * ((hgtft - 5) * 12 + hgtinches)); } if (IBW > weight) { IBW = weight } CrCl = ((140 - age) * IBW * 1.23) / creatinine; } else { if (hgtft < 5) { IBW = 45; IBW2 = 45; } else { IBW = 45 + (2.3 * ((hgtft - 5) * 12 + hgtinches)); IBW2 = 45 + (2.3 * ((hgtft - 5) * 12 + hgtinches)); } if (IBW > weight) { IBW = weight } CrCl = ((140 - age) * IBW * 1.04) / creatinine; } var dose = Math.round((5 * IBW) / 40.0) * 40.0 var IBW = Math.round(IBW, 1) var IBW2 = Math.round(IBW2,1) var CrCl = Math.round(CrCl, 0) if (CrCl < 40) { dose2 = "As GFR < 40mL/min Extended Interval Gentamicin is not indicated. Contact microbiology for an alternative agent"; } else { dose2 = dose "mg - Note: This dose has been calculated using a weight of " IBW "kg and rounded to the nearest 40mg to aid administration"; } document.getElementById('IBW2').innerHTML = IBW2 + "kg"; document.getElementById('CrCl').innerHTML = CrCl + "mL/min"; document.getElementById('dose2').innerHTML = dose2; } </script> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <table> <tr> <td>Height</td><td class="style17"><input id='height_feet' value=""/> feet</td><td><input id='height_inches' value=""/> inches</td> </tr> <tr> <td>Weight</td><td class="style17"><input id='weight' value=""/> kg</td> </tr> <tr> <td>Age</td><td class="style17"><input id='age'value=""/> years</td> </tr> <tr> <td>Creatinine</td><td class="style17"><input id='creatinine'/> mmol/L</td> </tr> <tr> <td>Sex</td><td class="style1"><select id='sex'> <option value="M">Male</option><option value="F">Female</option></select></td> </tr> </table><br /> <input type="button" onclick="calculate()" value="Calculate!"/><input id="Reset" type="reset" value="Reset" /> <br /> <br /> <br /> <br /> <table> <tr><td class="style16">Ideal Body Weight: </td><td id='IBW2' /></td></tr> <tr><td class="style16">Calculated GFR: </td><td id='CrCl' /></td></tr> <tr><td class="style16">Calculated Gentamicin Dose: </td><td id='dose2' /></td></tr> </table> What I am trying to do is have the dose displayed as: xxdose mg - Note: This dose has been calculated using a weight of IBWkg and rounded to the nearest 40mg to aid administration but if the CrCl is less than 40 then the dose message should be: As GFR < 40mL/min Extended Interval Gentamicin is not indicated. Contact microbiology for an alternative agent can anyone help me with this please? This is how this page should work: click on an abbreviation and see player info to the immediate right of the green field. The left-most 'WR' and 'RB' in the upper portion of the field (imagemap) have javascript assigned to them. Click on these to test. So far, I get no player info but I do get this error: 'eleObj.style' is null or not an object Here's part of the html ... is the script call in the right place???? Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Diamond Bowl Depth Chart</title> <script type="text/javascript" src="http://juniorrank.com/depth/scripts/controls.js"></script> <script type="text/javascript" src="http://juniorrank.com/depth/scripts/event.js"></script> <link href="style.css" rel="stylesheet" type="text/css" /> </head> I am using this fancy box code to smoothly pop up an image on click, I got it working on my main index page but that's not where I want to put it. My site has a menu where it loads webpages inside the main index one, I would like to use the code on one of those pages but something is not working. I am not able to use the specified DOCTYPE but find that it works all the same with my current one, however if I use the given one in addition to the one I have now (and need) then my site does not work properly, further if I replace it I get the same results. My existing doctype: Code: <DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd" "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> What the code uses: Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> I'm not sure what the differences are but I've been advised that I need to run the code in "standards mode" before I try to fix it. As I see it the code works, just not where I need it to, nothing unusual on my site and nothing unusual that I may be wrong. On my site you can see at the bottom right a blue text link called "aaaa" this is the code that works, however (clicking the dome to the left of that to scroll the page down and selecting the "met.a has guts" menu option diagram) you'll see the "aaaa" link again at the bottom left of that page and that is where I need it to work from. I even tried using the exact code from the example in that linked .htm page but it doesn't make a difference, it probably even hinders the code as it looks at the main html page. But if loading the page on its own the code will work, so its related to the menu and the way that works. If anybody can help that would be brilliant, I'm sure its something simple. Thanks! Complete and utter newb here, so I apologize in advance. I'm trying to create a widget for a website that will show the Recent Comments, but will limit what is shown to 1 comment per unique thread. The idea being that the popular threads don't drown out the unpopular threads in the widget. Alas, I do not know Javascript. I am, however, proficient in XSLT. So I mapped out a little transform to get (essentially) what I want, thus: Input: http://anamardoll.disqus.com/latest.rss XSLT: Code: <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/> <xsl:template name="RSS_Feed" match="rss"> <xsl:value-of select="'
'"/> <!-- ITERATE THROUGH ALL POST NODES --> <xsl:for-each select="//item"> <!-- IF NOT PREVIOUSLY USED --> <xsl:if test="not(preceding-sibling::item/child::title/node() = current()/child::title/node())"> <xsl:value-of xmlns:dc="http://purl.org/dc/elements/1.1/" select="child::dc:creator/node()"/> <xsl:value-of select="(' posted on 
')"/> <xsl:value-of select="substring-after(child::title/node(), 'Ramblings: ')"/> <xsl:value-of select="('
')"/> <xsl:value-of select="child::link/node()"/> <xsl:value-of select="('

')"/> </xsl:if> </xsl:for-each> </xsl:template> </xsl:stylesheet> Output: Code: Ana Mardoll posted on Twilight: It's All About The Protagonist, Baby http://www.anamardoll.com/2011/09/twilight-its-all-about-protagonist-baby.html#comment-320798527 Thepepboy posted on eReader: Running CM7 on a Nook Color from SD Card (REPOST) http://www.anamardoll.com/2011/07/ereader-running-cm7-on-nook-color-from.html#comment-320690496 Jckeeml posted on Narnia: The Clean and Tidy Poor http://www.anamardoll.com/2011/09/narnia-clean-and-tidy-poor.html#comment-320649311 chris the cynic posted on Metapost: Newsletter Subscriptions http://www.anamardoll.com/2011/09/metapost-newsletter-subscriptions.html#comment-320586205 (And here is why I say the output is "essentially" what I want -- I'd PREFER the links to be linked around the preceding texts, but that's an advanced step at this point in the game.) Is there an easy way in Javascript to just invoke an XSLT on a webpage and display the results? I've read online that there is, but can find no examples that work for me. I do appreciate any help provided and thank you in advance! (Also, for background: This will be going into the Blogger HTML/Javascript Widget tool, so... yeah.) I'm trying getting one of my webpage XHTML 1.0 Strict. There is only one error left, namely: document type does not allow element "br" here at this line: Code: container.innerHTML = result.translation.replace(/mdw/g, '<br />'); Obviously this is part of my javascript coding, but it's where the validation goes wrong. I can't put the javascript in an external file since several javascript variables are getting filled by php. I've tried several options, but I ain't a javascript expert.. so perhaps someone can help me out. Alright so I've been teaching myself php/javascript/html/joomla for the past couple weeks, learning as i go along. So bear with me if i seem like a total moron =p. I'm trying to run a script from a js file to add javascript to the website inside the iframe. I also would like the script to only be activated onclick(this is all in an article). To clarify my website has an iframe and this iframe contains a webpage from http://website987.com/. I want to run thescript.js on the website inside that iframe, to add javascript to that website, however i also only want to run this js file on the click of a link/button. I hope i'm being clear if I'm not please tell me and ill try to reiterate. I've been trying to get this to work for a while now and I feel like this is really simple and I'm asking a stupid question. However this is what I've got so far, currently this just redirects the iframe to the URL with my code on it(instead of actually running it).How could i edit this/what coding could I use to make it so thescript.js actually runs instead of it being just redirected? Reply With Quote Code: <?php $filename = 'thescript.js'; $path = '/media/system/js/'; // add the path parameter if the path is different than : 'media/system/js/' JHTML::script($filename, $path, true); // MooTools will load if it is not already loaded ?> Code: <HTML> <HEAD> <script language="javascript"> function loadOne() { parent.FRAME1.location.javascript: function('/media/system/js/thescript.js') } </script> </HEAD> <BODY> <iframe name="FRAME1" src="http://website987.com/" width="740" height="500" frameborder="0" scrolling="yes"></iframe> <a href="javascript:loadOne()">Click Here/a> </BODY> </HTML> Am i even on the right track? I've been testing out a billion different codes and I think it would be ridiculous to post them all so I was hoping someone could help me fix this code or at least point me in the right direction. I'm usually able to figure everything out on my own but I'm failing atm and I just need help on this one thing, I would be ever so thankful for any assistance provided, ! (BTW I'm also currently using the Joomla CMS and a joomla plugin called CodeMirror that runs your code directly from the article, not sure if this is relevent or not) I have a JavaScript drop down menu and just under it is the slide show also using JavaScript.Now when I you select the menu the drop down contents are hidden behind the slide underneath it .But if it is a still image,they appear on top of the image. I need the menu the drop down contents to appear on top on the slide show. How can I achieve that. Hi. Can someone tell me if it is possible to display the duration a webpage is accesssed. For example, if its a form webpage, then the time to be displayed will be = time the webpage was left (press submit button etc. or the time the viewer left the page) - time the webpage was first accessed or loaded. If it is possible with javascript, what are the methods, attributes etc that need to be used. How do you make an ios5 type notification system with javascript for your webpage?
First of all, I read the rules regarding how to post a question on the forums, and I couldn't think of a much better description, so I hope thats okay. My problem is this, I am using a simple code (Posted Below) that creates a drop-down menu containing a list of languages, when any of these languages are clicked it sends the user to Google translate to automatically convert the text. The code works fine, but now Im realizing I have no way of knowing which languages are chosen and how often. I have tried linking it to my Google Analytics but to no avail. The only solution I can think of is to send the user to maybe a PHP file that then redirects them to the Google translate page, so I can monitor it by viewing how many times the redirect page was viewed. I already use this redirect technique to track how many users follow my links to external downloads, so I know its probable. But my real question is how would I go about sending the user to a redirect page? I'm a novice web developer by the way. I'm thinking I would have to send the variable containing language to the redirect, along with a variable containing the URL to be translated, and then have the redirect input the data same as the original form. But even if this is possible, I don't know how to go about it. Any help would be greatly appreciated. Quote: <select name="translate" style="height:18px; font-size:10px;" onchange="javascript:window.location = 'http://www.google.com/translate_c?hl=en&langpair=en%7C' + this.value + '&u=' + window.location.href;"> <option value="">Translate This Page</option> <option value="ar">Arabic</option> ...LIST OF OTHER LANGUAGES <option value="es">Spanish</option> </select> If I have a javascript var in a webpage(html form textarea VALUE - yui) that contains html code, and want to appear it, in confirmformpage.php, then how to transfer it...? is it really needed go via PHP ...? and ofcourse use innerHTML to write it....yes I usually use an intermitened processform.php script. http://developer.yahoo.com/yui/editor We have an issue with some code in a js file. Could someone look at a portion of the code below that appears to start the problem, and let me know why this sends the program into an infinite loop. Any help would be appreciated....See below: //The control parameter is typically not used; it is to allow us to call the function // without it being fired by an event. function Colorize(manualcontrol) { //If we don't have a control from an event bubble, try to get it as passed into the function if (!(event == null)) { if (!event.srcElement) control = manualcontrol; else control = event.srcElement; }[/COLOR] else { control = manualcontrol; [/B] } Hi, I'm having problems tracking down the code that causes IE to throw an error where all other browsers work just fine. I have attached the menu.js file, two style sheets (one for IE, the other for all browsers, css code for menu is at the end), and a body.html file that calls the menu. Of course these are uploaded as text files, but please feel free to rename and run the body file! The IE error states that it's looking for an object after the script tag on line 18 of the body file that creates menu settings. What is wrong with this line, and how can I fix it? Many thanks for any help that can be provided! hello i have a form which when the user hits "submit," the info in the textboxes is entered to a database. the only textbox which is not entered to the DB is an "age" textbox, which i need to verify to see if user is 18yrs or older. if user is not 18 years or older, they get an alert telling them they arent 18+. if they are, then the form submits this is my code so far, and i dont get any alerts when i enter an age younger than 18: Code: <head> <script language="text/javascript"> var age; document.getElementById("userage").value = age; if (age >=18) document.location="feedbacksaveanddisplay.php"; else { alert('Sorry, we can not let you in!') document.location="content.html"; } </script> </head> <form method = "post" action = "FeedbackSaveAndDisplay.php"> <input type = "hidden" name = "user" value = "test"/> <input type = "hidden" name = "pwd" value = "test"/> <p>Enter your name, feedback, score</p> <table> <tr> <td>Name</td> <td> <input type = "text" name = "name" style="width:150px; height:20px;" /> </td> </tr> <tr> <td>Feedback</td> <td> <input type = "text" name = "feedback" style="width:150px; height:20px;" /> </td> </tr> <tr> <td>Score</td> <td> <input type = "text" name = "score" style="width:150px; height:20px;" /> </td> </tr> <tr> <td>Product</td> <td> <input type = "text" name = "product" style="width:150px; height:20px;" /> </td> </tr> <tr> <td>Age</td> <td> <input type = "text" name = "age" style="width:150px; height:20px;" /> </td> </tr> <tr> <td colspan = "2"> <input type = "submit" value = "Submit" /> </td> </tr> </table> </form> any tips/advice on how to fix my code? the problem i think is in the javascript... will greatly appreciate any help thanks!! I'm getting a runtime error on the code in red. Can anyone see anything that is wrong with it? These functions are called by an onBlur by the way. <script type="text/javascript"> //THIS GENERATES QUANTITY OF MATERIALS function generate3() { var tot3 = document.ComplianceForm.materialamount.value; var tbl3 = document.getElementById("quantitymaterials"); if (tot3 > 28) { alert("16 is total amount of materials for now."); } else { for(var i =1; i<=tot3; i++) { tbl3.innerHTML = tbl3.innerHTML + '<tr><td colspan=\"2\"><hr /></td></tr><tr><td>'+i+') Quantity: <input type=\"text\" name=\"qty'+i+'\" size=\"3\"\/></td><td>Description: <input type=\"text\" name=\"material'+i+'\" /></td></tr><tr><td colspan=\'2\' \">Your Truck<input type=\"checkbox\" \/> Other truck<input type=\"checkbox\" \/> Cash<input type=\"checkbox\" \/> Credit Card<input type=\"checkbox\" \/> P.O.<input type=\"checkbox\" \/></td></tr>'; } tbl3.innerHTML = tbl3.innerHTML + '<br>'; } } function remove3() { var tot3 = document.ComplianceForm.materialamount.value; var tbl3 = document.getElementById("quantitymaterials"); for(var i =1;i<=tot3; i++) { tbl3.innerHTML = ""; document.ComplianceForm.materialamount.value = ""; tbl3.innerHTML = ""; } } </script> I'm pretty new to Javascript so don't lay into me too hard. haha thanks. -Ty Please help, I'm getting this error, Object expected, Code: 0 in Internet Explorer (not in Firefox, though). Here is the link to the page: http://www.uatparts.com/miva/merchan...Category_Code= I'm worried that my customers might shy away and not buy from me when they see this error. What do I need to do in order to stop this error from appearing? Note: I tried including the code in this thread but it was too long, the forum wouldn't let me. I have put this together and it looks to me like it should work but when i ht submit it does nothing, no error or anything, which makes it hard for me to diagnose. You all are much more experienced minds and may look at it and see my error right away (at least thats what im hoping) the point of this project is a form that will post(including pics) to a google spreadsheet. it may be i need to post this in the ajax forum, but its at least partially js so let me know thank you so much for your help all Code: <!DOCTYPE html> <html> <head> <title>QC Observation</title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"></script> </head> <body> <div> <form id="form" target="_self" onsubmit="" action=""> <div class="ss-header-image-container"><div class="ss-header-image-image"><div class="ss-header-image-sizer"></div></div></div> <div class="ss-top-of-page"><div class="ss-form-heading"><h1 class="ss-form-title" dir="ltr">QC Observation</h1> <div class="ss-form"><form action="https://docs.google.com/forms/d/1jkIpSFH16SiNlsj13cBBRsuoiXmqeGVAI6PttCQiff8/formResponse" method="POST" id="ss-form" target="_self" onsubmit=""><ol role="list" class="ss-question-list" style="padding-left: 0"> <div class="ss-form-question errorbox-good" role="listitem"> <div dir="ltr" class="ss-item ss-item-required ss-select"><div class="ss-form-entry"> <label class="ss-q-item-label" for="entry_1344879795"><div class="ss-q-title">Bldg <label for="itemView.getDomIdToLabel()" aria-label="(Required field)"></label> <span class="ss-required-asterisk" aria-hidden="true">*</span></div> <div class="ss-q-help ss-secondary-text" dir="ltr"></div></label> <select name="entry.1344879795" id="entry_1344879795" aria-label="Bldg " aria-required="true" required=""><option value=""></option> <option value="A Residence">A Residence</option> <option value="B Residence">B Residence</option> <option value="C Residence">C Residence</option> <option value="D Residence">D Residence</option> <option value="OSB">OSB</option> <option value="MNT">MNT</option> <option value="TWB">TWB</option> <option value="VP">VP</option> <option value="VM">VM</option> <option value="Site Dev">Site Dev</option></select> <div class="required-message">This is a required question</div></div></div></div> <div class="ss-form-question errorbox-good" role="listitem"> <div dir="ltr" class="ss-item ss-item-required ss-select"><div class="ss-form-entry"> <label class="ss-q-item-label" for="entry_1358292836"><div class="ss-q-title">QC Representative <label for="itemView.getDomIdToLabel()" aria-label="(Required field)"></label> <span class="ss-required-asterisk" aria-hidden="true">*</span></div> <div class="ss-q-help ss-secondary-text" dir="ltr"></div></label> <select name="entry.1358292836" id="entry_1358292836" aria-label="QC Representative " aria-required="true" required=""><option value=""></option> <option value="David Bradley">David Bradley</option> <option value="Ryan Harper">Ryan Harper</option> <option value="Herschell Mirick">Herschell Mirick</option> <option value="Bill Bejelis">Bill Bejelis</option> <option value="Nick Pappas">Nick Pappas</option> <option value="Stephen Gehrlich">Stephen Gehrlich</option> <option value="Beth Davis">Beth Davis</option> <option value="Ohene Akrofi">Ohene Akrofi</option> <option value="Mike Dow">Mike Dow</option> <option value="David Picknell">David Picknell</option> <option value="Lynne Viescas">Lynne Viescas</option></select> <div class="required-message">This is a required question</div></div></div></div> <div class="ss-form-question errorbox-good" role="listitem"> <div dir="ltr" class="ss-item ss-item-required ss-select"><div class="ss-form-entry"> <label class="ss-q-item-label" for="entry_895392494"><div class="ss-q-title">Shop Responsible <label for="itemView.getDomIdToLabel()" aria-label="(Required field)"></label> <span class="ss-required-asterisk" aria-hidden="true">*</span></div> <div class="ss-q-help ss-secondary-text" dir="ltr"></div></label> <select name="entry.895392494" id="entry_895392494" aria-label="Shop Responsible " aria-required="true" required=""><option value=""></option> <option value="Walls/Ceilings">Walls/Ceilings</option> <option value="Plumbing">Plumbing</option> <option value="Electrical">Electrical</option> <option value="HVAC/Sheet Metal">HVAC/Sheet Metal</option> <option value="Carpentry">Carpentry</option> <option value="Interiors">Interiors</option> <option value="Exteriors">Exteriors</option> <option value="Masonry">Masonry</option> <option value="Mechanics">Mechanics</option> <option value="Structural">Structural</option></select> <div class="required-message">This is a required question</div></div></div></div> <div class="ss-form-question errorbox-good" role="listitem"> <div dir="ltr" class="ss-item ss-select"><div class="ss-form-entry"> <label class="ss-q-item-label" for="entry_1493538421"><div class="ss-q-title">Issue Type </div> <div class="ss-q-help ss-secondary-text" dir="ltr"></div></label> <select name="entry.1493538421" id="entry_1493538421" aria-label="Issue Type "><option value=""></option> <option value="Poor Workmanship">Poor Workmanship</option> <option value="Lack of Training">Lack of Training</option> <option value="Not Per Plans">Not Per Plans</option> <option value="Not Per Code">Not Per Code</option> <option value="Not Per Spec">Not Per Spec</option> <option value="Plan Conflict">Plan Conflict</option></select> <div class="required-message">This is a required question</div></div></div></div> <div class="ss-form-question errorbox-good" role="listitem"> <div dir="ltr" class="ss-item ss-paragraph-text"><div class="ss-form-entry"> <label class="ss-q-item-label" for="entry_177485091"><div class="ss-q-title">Notes/Actions </div> <div class="ss-q-help ss-secondary-text" dir="ltr"></div></label> <textarea name="entry.177485091" rows="8" cols="0" class="ss-q-long" id="entry_177485091" dir="auto" aria-label="Notes/Actions "></textarea> <div class="error-message" id="754075454_errorMessage"></div> <div class="required-message">This is a required question</div> </div></div></div> <div class="ss-form-question errorbox-good" role="listitem"> <div dir="ltr" class="ss-item ss-item-required ss-date"><div class="ss-form-entry"> <label class="ss-q-item-label" for="entry_1875356531"><div class="ss-q-title">Follow-Up Date <label for="itemView.getDomIdToLabel()" aria-label="(Required field)"></label> <span class="ss-required-asterisk" aria-hidden="true">*</span></div> <div class="ss-q-help ss-secondary-text" dir="ltr"></div></label> <input type="date" name="entry.1875356531" value="" class="ss-q-date" dir="auto" id="entry_1875356531" aria-label="Follow-Up Date " aria-required="true" required=""> <div class="required-message">This is a required question</div></div></div></div> <input type="hidden" name="draftResponse" value="[,,"3618330731406970920"] "> <input type="hidden" name="pageHistory" value="0"> <input type="hidden" name="fbzx" value="3618330731406970920"> <tr> <td>Image File</td> <td> <input type="file" name="uploadedFile" class="gwt-FileUpload"> </td> </ol></div> <div style="width: 100%; display: block; float: right;"> <button id="send" type="submit"> Send </button> </div> </form> </div> <script type="text/javascript"> function postToGoogle() { var field1 = $("input[type='radio'][name='qs1']:checked").val(); var field2 = $("input[type='radio'][name='qs2']:checked").val(); var field3 = $('#feed').val(); $.ajax({ url: "https://docs.google.com/forms/d/1jkIpSFH16SiNlsj13cBBRsuoiXmqeGVAI6PttCQiff8/formResponse", data: {"entry.1023121230": field3, "entry.1230072460": field1, "entry.2113237615": field2}, type: "POST", dataType: "xml", statusCode: { 0: function() { //Success message }, 200: function() { //Success Message } } }); } $(document).ready(function(){ $('#form').submit(function() { postToGoogle(); return false; }); }); </script> </body> </html> Reply With Quote 01-27-2015, 10:10 AM #2 Dormilich View Profile View Forum Posts Senior Coder Join Date Jan 2010 Location Behind the Wall Posts 3,532 Thanks 13 Thanked 372 Times in 368 Posts first you should verify whether your AJAX actually sends something off: open the browser’s dev tools and check the network panel for any outgoing requests. I might as well mention the SOP (same origin policy) here that governs which URLs you are allowed to contact. Hey guys, I've been learning Javascript for a few days using code academy. I've come across this issue, and I'm not sure what exactly I'm doing wrong. Any help would be great. // Check if the user is ready to play! confirm("I am ready to play!"); var age = prompt("What's your age?"); if (age < 13) { console.log("I take no responsiblity, but you are allowed to play") } else { console.log("Have fun!") } console.log("You are at a Justin Bieber concert, and you hear this lyric 'Lace my shoes off, start racing.'") console.log("Suddenly, Bieber stops and says, 'Who wants to race me?'") var userAnswer = prompt("Do you want to race Bieber on stage?"); if userAnswer === "yes" { console.log("You and Bieber start racing. It's neck and neck! You win by a shoelace!"); } else { console.log("Oh no! Bieber shakes his head and sings 'I set a pace, so I can race without pacing.'"); } |