javascript function doesnt work -


I will repeat my question

I have written this code and I do not understand that Why does it work?

I wrote the sandwich option I wrote in the website that an order is made to make something that one person comes to the website and then It is sandwich displayed and content in sandwich (contents are all arrays)

I also have my HTM Will add L code, and if anyone can write an example of the correct code will be very much useful for me.

Javascript code:

  var avucado = ["eggs", "avucado", "tommato", "mayonnaise", "pickle", "gumba"]; Var Eggassald = ["Egg", "Dill", "Mayonnaise", "Pickle"]; Var tuna = ["tuna", "coriander", "pickle", "mayonnaise", "gamba"]; Var cheeze = ["Yellow Chase", "Mayonnaise", "Toetato", "Cucumber"]; Ware sausage = ["sausage", "mustard", "mayonnaise", "totoato", "pickle"]; Var choice1 = ("You chose:"); Var choice2 = ("The contents of your sandwich are:") var food = function (foodName) {if (document.getElementById ("input"). Value = avucado) {document.write (like 1 + "" + 'avucado. '+ "

" + + "+ Option 2 +" "+ avucado +".);); } And if (document.getElementById ("Input") value = eggSalad) {document.write (prefer1 + "" + egg salad "+"


" + "" + 2 + + + + + Egg Sallad + ".); } And if (document.getElementById ("Input"). Value = tuna) {document.write (like 1 + "" 'tuna.' + "


+ "" + Likes 2 + "" + tuna + "."); } And if (document.getElementById ("Input"). Value = cheeze {document.write (like 1 + "+ 'yellow chase.' +"







< "+" "+ Likes2 +" + + + fibers + ".); } And if (document.getElementById ("input") value = sausage) {document.write (like 1 + "" 'tuna. + "


"" + 2 likes + + "+ tuna +". "); } Else (document.getElementById ("input" .value! = Avucado, eggSalad, tuna, chase, sausage) {document.write ("error, please select a sandwich in the list)";}};
< / Pre>

HTML code:

     Hello World! </ Title> ; & Lt; Meta http-equiv = "Type content" content = "text / html; charset = UTF-8" /> gt; lit script type = "text / javascript" src = "script.js" & gt; </ Script> <br/> Body dir = "rtl"> <h1> is the sandwich you want to order? & Lt; / h1 & Gt; & lt; form & gt; & lt; Input Type = "text" id = "input" /> gt; & lt; br / & gt; button type = "button" id = "button" value = "submit" onclick = "food ()" & Gt; Submit & lt; / button & gt; & lt; br / & gt; & lt; / form> & lt; / body & gt; & lt </ p> <pre> <p> </code> </pre> </code> </pre> </div> <p> <div class = "post-text" itemprop = "text"> <p> Replace all occurrences: </p> <pre > <code> document.getElementById ("input"). With value = </code> </pre> <p>: </p> <pre> <code> document.getElementById ("Input"). Value == </ cod e> </ pre> <p> single "equal to" sign (<code> = </code>) is a double - "equal to" sign (<code> == </code>) Is </P> <p> In your <code> if </code>, you were specifying the contents of the food in the <code> .value </code> of input instead of checking equality. </p> <p> To check that the <code> value </code> is in the array, you should do something like this: </p> <pre> <code> if (avucado.indexOf (document.getElementById ( "Input") .Value! == -1) {</code> </pre> <p> So, if the value is in the array <code> avucado </code>, then what is <code> is below </code>. </p> </p> <p> Finally, this requires your <<> << code> other </code> statement to fix something: </p> <pre> <code> else (document.getElementById ("input" .value! = Avucado, eggSalad, tuna, cheeze, sausage) {document.write ("Error, one of the sandwiches in the list is selected");} </code> </pre> <p> Replace with: </p> <pre> <code> else if (avacado.concat (egg salad, tuna, chase, sausage) .indexOf (document.getElementById ("input") .value) == -1) {document.write ( "Error, please select a sandwich in the list");} </code> </pre> <p> Now, instead of <code> document.write ("text") </code>, I dump manipers Using I suggest: </p> <p> In your HTML, add an element like this: </p> <pre> <code> & lt; span id = "message" & gt; & lt; / span </code> </pre> <p> Then, in your JS:. </p> <pre> <code> document.getElementById ("message") innerHTML = "text"; </code> </pre> </div> </html> <br /> 
<script data-cfasync='false' type='text/javascript' src='//p257699.clksite.com/adServe/banners?tid=257699_495604_10&type=footer&size=37'></script>
<script data-cfasync='false' type='text/javascript' src='//p257699.clksite.com/adServe/banners?tid=257699_495604_11&tagid=9'></script>
<script type="text/javascript" src="//ylx-1.com/slider.php?section=General&pub=435796&ga=g&side=random"></script>

  </div>
<div class='post-bottom'>
<div class='post-footer float-container'>
<div class='post-footer-line post-footer-line-1'>
</div>
<div class='post-footer-line post-footer-line-2'>
</div>
<div class='post-footer-line post-footer-line-3'>
</div>
</div>
<div class='post-share-buttons post-share-buttons-bottom invisible'>
<div class='byline post-share-buttons goog-inline-block'>
<div aria-owns='sharing-popup-Blog1-byline-7432275272098907930' class='sharing' data-title='javascript function doesnt work -'>
<button aria-controls='sharing-popup-Blog1-byline-7432275272098907930' aria-label='Share' class='sharing-button touch-icon-button' id='sharing-button-Blog1-byline-7432275272098907930' role='button'>
<div class='flat-icon-button ripple'>
<svg class='svg-icon-24'>
<use xlink:href='/responsive/sprite_v1_6.css.svg#ic_share_black_24dp' xmlns:xlink='http://www.w3.org/1999/xlink'></use>
</svg>
</div>
</button>
<div class='share-buttons-container'>
<ul aria-hidden='true' aria-label='Share' class='share-buttons hidden' id='sharing-popup-Blog1-byline-7432275272098907930' role='menu'>
<li>
<span aria-label='Get link' class='sharing-platform-button sharing-element-link' data-href='https://www.blogger.com/share-post.g?blogID=923898269918992536&postID=7432275272098907930&target=' data-url='https://bavocode111.blogspot.com/2015/04/javascript-function-doesnt-work.html' role='menuitem' tabindex='-1' title='Get link'>
<svg class='svg-icon-24 touch-icon sharing-link'>
<use xlink:href='/responsive/sprite_v1_6.css.svg#ic_24_link_dark' xmlns:xlink='http://www.w3.org/1999/xlink'></use>
</svg>
<span class='platform-sharing-text'>Get link</span>
</span>
</li>
<li>
<span aria-label='Share to Facebook' class='sharing-platform-button sharing-element-facebook' data-href='https://www.blogger.com/share-post.g?blogID=923898269918992536&postID=7432275272098907930&target=facebook' data-url='https://bavocode111.blogspot.com/2015/04/javascript-function-doesnt-work.html' role='menuitem' tabindex='-1' title='Share to Facebook'>
<svg class='svg-icon-24 touch-icon sharing-facebook'>
<use xlink:href='/responsive/sprite_v1_6.css.svg#ic_24_facebook_dark' xmlns:xlink='http://www.w3.org/1999/xlink'></use>
</svg>
<span class='platform-sharing-text'>Facebook</span>
</span>
</li>
<li>
<span aria-label='Share to Twitter' class='sharing-platform-button sharing-element-twitter' data-href='https://www.blogger.com/share-post.g?blogID=923898269918992536&postID=7432275272098907930&target=twitter' data-url='https://bavocode111.blogspot.com/2015/04/javascript-function-doesnt-work.html' role='menuitem' tabindex='-1' title='Share to Twitter'>
<svg class='svg-icon-24 touch-icon sharing-twitter'>
<use xlink:href='/responsive/sprite_v1_6.css.svg#ic_24_twitter_dark' xmlns:xlink='http://www.w3.org/1999/xlink'></use>
</svg>
<span class='platform-sharing-text'>Twitter</span>
</span>
</li>
<li>
<span aria-label='Share to Pinterest' class='sharing-platform-button sharing-element-pinterest' data-href='https://www.blogger.com/share-post.g?blogID=923898269918992536&postID=7432275272098907930&target=pinterest' data-url='https://bavocode111.blogspot.com/2015/04/javascript-function-doesnt-work.html' role='menuitem' tabindex='-1' title='Share to Pinterest'>
<svg class='svg-icon-24 touch-icon sharing-pinterest'>
<use xlink:href='/responsive/sprite_v1_6.css.svg#ic_24_pinterest_dark' xmlns:xlink='http://www.w3.org/1999/xlink'></use>
</svg>
<span class='platform-sharing-text'>Pinterest</span>
</span>
</li>
<li>
<span aria-label='Email' class='sharing-platform-button sharing-element-email' data-href='https://www.blogger.com/share-post.g?blogID=923898269918992536&postID=7432275272098907930&target=email' data-url='https://bavocode111.blogspot.com/2015/04/javascript-function-doesnt-work.html' role='menuitem' tabindex='-1' title='Email'>
<svg class='svg-icon-24 touch-icon sharing-email'>
<use xlink:href='/responsive/sprite_v1_6.css.svg#ic_24_email_dark' xmlns:xlink='http://www.w3.org/1999/xlink'></use>
</svg>
<span class='platform-sharing-text'>Email</span>
</span>
</li>
<li aria-hidden='true' class='hidden'>
<span aria-label='Share to other apps' class='sharing-platform-button sharing-element-other' data-url='https://bavocode111.blogspot.com/2015/04/javascript-function-doesnt-work.html' role='menuitem' tabindex='-1' title='Share to other apps'>
<svg class='svg-icon-24 touch-icon sharing-sharingOther'>
<use xlink:href='/responsive/sprite_v1_6.css.svg#ic_more_horiz_black_24dp' xmlns:xlink='http://www.w3.org/1999/xlink'></use>
</svg>
<span class='platform-sharing-text'>Other Apps</span>
</span>
</li>
</ul>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<section class='comments embed' data-num-comments='0' id='comments'>
<a name='comments'></a>
<h3 class='title'>Comments</h3>
<div id='Blog1_comments-block-wrapper'>
</div>
<div class='footer'>
<div class='comment-form'>
<a name='comment-form'></a>
<h4 id='comment-post-message'>Post a Comment</h4>
<a href='https://www.blogger.com/comment/frame/923898269918992536?po=7432275272098907930&hl=en-GB&skin=contempo' id='comment-editor-src'></a>
<iframe allowtransparency='allowtransparency' class='blogger-iframe-colorize blogger-comment-from-post' frameborder='0' height='410px' id='comment-editor' name='comment-editor' src='' width='100%'></iframe>
<script src='https://www.blogger.com/static/v1/jsbin/4269703388-comment_from_post_iframe.js' type='text/javascript'></script>
<script type='text/javascript'>
      BLOG_CMT_createIframe('https://www.blogger.com/rpc_relay.html');
    </script>
</div>
</div>
</section>
</article>
</div>
</div><div class='widget PopularPosts' data-version='2' id='PopularPosts1'>
<h3 class='title'>
Popular posts from this blog
</h3>
<div class='widget-content'>
<div role='feed'>
<article class='post' role='article'>
<h3 class='post-title'><a href='https://bavocode111.blogspot.com/2013/08/pass-db-connection-parameters-to-kettle.html'>Pass DB Connection parameters to a Kettle a.k.a PDI table Input step
dynamically from Excel -</a></h3>
<div class='post-header'>
<div class='post-header-line-1'>
<span class='byline post-timestamp'>
-
<meta content='http://bavocode111.blogspot.com/2013/08/pass-db-connection-parameters-to-kettle.html'/>
<a class='timestamp-link' href='https://bavocode111.blogspot.com/2013/08/pass-db-connection-parameters-to-kettle.html' rel='bookmark' title='permanent link'>
<time class='published' datetime='2013-08-15T03:22:00-07:00' title='2013-08-15T03:22:00-07:00'>
August 15, 2013
</time>
</a>
</span>
</div>
</div>
<div class='item-content float-container'>
<div class='item-thumbnail'>
<a href='https://bavocode111.blogspot.com/2013/08/pass-db-connection-parameters-to-kettle.html'>
<img alt='Image' sizes='72px' src='https://lh3.googleusercontent.com/blogger_img_proxy/AEn0k_uJlG3y_yMJG5I46Uu7eEpwmqV4zOx6an5brP065JxinbaDmuZF56zo0xaHuOAxojsyvoxq5mr52TQ6wTC7BY1ByapTUsu4' srcset='https://lh3.googleusercontent.com/blogger_img_proxy/AEn0k_uJlG3y_yMJG5I46Uu7eEpwmqV4zOx6an5brP065JxinbaDmuZF56zo0xaHuOAxojsyvoxq5mr52TQ6wTC7BY1ByapTUsu4=w72-h72-p-k-no-nu 72w, https://lh3.googleusercontent.com/blogger_img_proxy/AEn0k_uJlG3y_yMJG5I46Uu7eEpwmqV4zOx6an5brP065JxinbaDmuZF56zo0xaHuOAxojsyvoxq5mr52TQ6wTC7BY1ByapTUsu4=w144-h144-p-k-no-nu 144w'/>
</a>
</div>
<div class='popular-posts-snippet snippet-container r-snippet-container'>
<div class='snippet-item r-snippetized'>
    I have a requirement whenever I run my own kettle, dynamically took database connection parameters from an excel source Every run should go.   I have an Excel column names: hostname, username, database, password.   I want to pass these connection parameters to my table input stage dynamically whenever it runs the job.   This is what I was trying to do.     You can get it    Connection parameters from the DB reading source (for example Excel or a CSV file in my example) < / Li>  Store the parameters in the variable   Using the variable in your connection's settings.     Setting Variables Create another conversion for (you can not do it in the same conversion Uses):        set variables  element variable:       The element that reads / writes your data creates a new connection and sets the connection parameter using  $ {variable name_}  Note that you will need to type in the field field in the field  $ {password}  Also keep in mind that this can be a security problem as the
</div>
<a class='snippet-fade r-snippet-fade hidden' href='https://bavocode111.blogspot.com/2013/08/pass-db-connection-parameters-to-kettle.html'></a>
</div>
<div class='jump-link flat-button ripple'>
<a href='https://bavocode111.blogspot.com/2013/08/pass-db-connection-parameters-to-kettle.html' title='Pass DB Connection parameters to a Kettle a.k.a PDI table Input step
dynamically from Excel -'>
Read more
</a>
</div>
</div>
</article>
<article class='post' role='article'>
<h3 class='post-title'><a href='https://bavocode111.blogspot.com/2010/04/multithreading-phantomjs-node-in-for.html'>multithreading - PhantomJS-Node in a for Loop -</a></h3>
<div class='post-header'>
<div class='post-header-line-1'>
<span class='byline post-timestamp'>
-
<meta content='http://bavocode111.blogspot.com/2010/04/multithreading-phantomjs-node-in-for.html'/>
<a class='timestamp-link' href='https://bavocode111.blogspot.com/2010/04/multithreading-phantomjs-node-in-for.html' rel='bookmark' title='permanent link'>
<time class='published' datetime='2010-04-15T03:22:00-07:00' title='2010-04-15T03:22:00-07:00'>
April 15, 2010
</time>
</a>
</span>
</div>
</div>
<div class='item-content float-container'>
<div class='popular-posts-snippet snippet-container r-snippet-container'>
<div class='snippet-item r-snippetized'>
    I am trying to implement a screen-scraps application that opens a URL in which a parameter changes as it is for a loop:    var data = [ '100', '101', '102', '103', '104']; (Var indexA = 0; indexA & lt; data.length; indexA ++) for {Phantom Generation ({'port': freeport}, function (pH) {ph.create page (function (page) {page.open ("http: //...++ data [index B] +" ... " , Status {console.log ("open site:" + data [index B], position); / * OLD * / indexB ++; page evaluation (function () {// page scrape and an object Return}, function {console.log (result.dataRequest); // here is the problem}); / * new and fixed * / indexB ++}    first console Logs it:    Open Site: 100 Success Opens Site: 101 Success B Ola Site: 102 Success Opening Site: 103 Success Opened Site: 104 Success    Which is good.   Data is verified in scrap HTML and from index to array Matches. So in page 101 I scrap '101 and retrieve' and pu
</div>
<a class='snippet-fade r-snippet-fade hidden' href='https://bavocode111.blogspot.com/2010/04/multithreading-phantomjs-node-in-for.html'></a>
</div>
<div class='jump-link flat-button ripple'>
<a href='https://bavocode111.blogspot.com/2010/04/multithreading-phantomjs-node-in-for.html' title='multithreading - PhantomJS-Node in a for Loop -'>
Read more
</a>
</div>
</div>
</article>
<article class='post' role='article'>
<h3 class='post-title'><a href='https://bavocode111.blogspot.com/2010/02/c-matlab-m-file-to-mex-file-using.html'>c++ - MATLAB .m file to .mex file using Matlab Compiler -</a></h3>
<div class='post-header'>
<div class='post-header-line-1'>
<span class='byline post-timestamp'>
-
<meta content='http://bavocode111.blogspot.com/2010/02/c-matlab-m-file-to-mex-file-using.html'/>
<a class='timestamp-link' href='https://bavocode111.blogspot.com/2010/02/c-matlab-m-file-to-mex-file-using.html' rel='bookmark' title='permanent link'>
<time class='published' datetime='2010-02-15T02:22:00-08:00' title='2010-02-15T02:22:00-08:00'>
February 15, 2010
</time>
</a>
</span>
</div>
</div>
<div class='item-content float-container'>
<div class='popular-posts-snippet snippet-container r-snippet-container'>
<div class='snippet-item r-snippetized'>
    I know that it can speak as a very famous topic, but something that helps me with it Not found   This scenario is:     I have my functions function, no matter what's inside, it's a generic function that may depend on other toolboxes. Does. Has input and output;     I want to generate the same myFun.mex function;             : Lib myFun    This way I get some new files:   libmyfun.c   libmyfun.dll   Libmyfun.exp   libmyfun.exports   libmyfun .h   libmyfun.lib   Reading around and I think that Creating a myfun.cpp that is very famous is included:    / * gateway function * / zero max function (ent NLHS, MXARRA * PLS [], int NRHS, CONST M Xeray * PHS []) Here is the Variable Deals * / / * code here * /}    I have tried to do this and are called Regular of Max Generation:    Max ('- v', 'myfun.cpp')    But I get many errors, and I should say that my myfun.cpp copy / Paste Function is where I have a lot of doubts ... especially on input / output management.   My q
</div>
<a class='snippet-fade r-snippet-fade hidden' href='https://bavocode111.blogspot.com/2010/02/c-matlab-m-file-to-mex-file-using.html'></a>
</div>
<div class='jump-link flat-button ripple'>
<a href='https://bavocode111.blogspot.com/2010/02/c-matlab-m-file-to-mex-file-using.html' title='c++ - MATLAB .m file to .mex file using Matlab Compiler -'>
Read more
</a>
</div>
</div>
</article>
</div>
</div>
</div><div class='widget HTML' data-version='2' id='HTML3'>
<div class='widget-content'>
<!-- PopAds.net Popunder Code for bavocode111.blogspot.com -->
<script type="text/javascript" data-cfasync="false">
/*<![CDATA[/* */
  var _pop = _pop || [];
  _pop.push(['siteId', 2496310]);
  _pop.push(['minBid', 0]);
  _pop.push(['popundersPerIP', 0]);
  _pop.push(['delayBetween', 0]);
  _pop.push(['default', false]);
  _pop.push(['defaultPerDay', 0]);
  _pop.push(['topmostLayer', false]);
  (function() {
    var pa = document.createElement('script'); pa.type = 'text/javascript'; pa.async = true;
    var s = document.getElementsByTagName('script')[0]; 
    pa.src = '//c1.popads.net/pop.js';
    pa.onerror = function() {
      var sa = document.createElement('script'); sa.type = 'text/javascript'; sa.async = true;
      sa.src = '//c2.popads.net/pop.js';
      s.parentNode.insertBefore(sa, s);
    };
    s.parentNode.insertBefore(pa, s);
  })();
/*]]>/* */
</script>
<!-- PopAds.net Popunder Code End -->
</div>
</div><div class='widget HTML' data-version='2' id='HTML1'>
<div class='widget-content'>
<script type="text/javascript" src="//ylx-1.com/slider.php?section=General&pub=435796&ga=g&side=random"></script>
</div>
</div></div>
</main>
</div>
<footer class='footer section' id='footer' name='Footer'><div class='widget Attribution' data-version='2' id='Attribution1'>
<div class='widget-content'>
<div class='blogger'>
<a href='https://www.blogger.com' rel='nofollow'>
<svg class='svg-icon-24'>
<use xlink:href='/responsive/sprite_v1_6.css.svg#ic_post_blogger_black_24dp' xmlns:xlink='http://www.w3.org/1999/xlink'></use>
</svg>
Powered by Blogger
</a>
</div>
<div class='image-attribution'>
Theme images by <a href="http://www.offset.com/photos/394244">Michael Elkan</a>
</div>
</div>
</div></footer>
</div>
</div>
</div>
<aside class='sidebar-container container sidebar-invisible' role='complementary'>
<div class='navigation'>
<button class='svg-icon-24-button flat-icon-button ripple sidebar-back'>
<svg class='svg-icon-24'>
<use xlink:href='/responsive/sprite_v1_6.css.svg#ic_arrow_back_black_24dp' xmlns:xlink='http://www.w3.org/1999/xlink'></use>
</svg>
</button>
</div>
<div class='sidebar_top_wrapper'>
<div class='sidebar_top section' id='sidebar_top' name='Sidebar (top)'><div class='widget Profile' data-version='2' id='Profile1'>
<div class='wrapper solo'>
<div class='widget-content individual'>
<a href='https://www.blogger.com/profile/06912243864490924105' rel='nofollow'>
<div class='default-avatar-wrapper'>
<svg class='svg-icon-24 avatar-icon'>
<use xlink:href='/responsive/sprite_v1_6.css.svg#ic_person_black_24dp' xmlns:xlink='http://www.w3.org/1999/xlink'></use>
</svg>
</div>
</a>
<div class='profile-info'>
<dl class='profile-datablock'>
<dt class='profile-data'>
<a class='profile-link g-profile' href='https://www.blogger.com/profile/06912243864490924105' rel='author nofollow'>
Szoka
</a>
</dt>
</dl>
<a class='profile-link visit-profile pill-button' href='https://www.blogger.com/profile/06912243864490924105' rel='author'>
Visit profile
</a>
</div>
</div>
</div>
</div></div>
</div>
<div class='sidebar_bottom section' id='sidebar_bottom' name='Sidebar (bottom)'><div class='widget BlogArchive' data-version='2' id='BlogArchive1'>
<details class='collapsible extendable'>
<summary>
<div class='collapsible-title'>
<h3 class='title'>
Archive
</h3>
<svg class='svg-icon-24 chevron-down'>
<use xlink:href='/responsive/sprite_v1_6.css.svg#ic_expand_more_black_24dp' xmlns:xlink='http://www.w3.org/1999/xlink'></use>
</svg>
<svg class='svg-icon-24 chevron-up'>
<use xlink:href='/responsive/sprite_v1_6.css.svg#ic_expand_less_black_24dp' xmlns:xlink='http://www.w3.org/1999/xlink'></use>
</svg>
</div>
</summary>
<div class='widget-content'>
<div id='ArchiveList'>
<div id='BlogArchive1_ArchiveList'>
<div class='first-items'>
<ul class='flat'>
<li class='archivedate'>
<a href='https://bavocode111.blogspot.com/2015/09/'>September 2015<span class='post-count'>673</span></a>
</li>
<li class='archivedate'>
<a href='https://bavocode111.blogspot.com/2015/08/'>August 2015<span class='post-count'>642</span></a>
</li>
<li class='archivedate'>
<a href='https://bavocode111.blogspot.com/2015/07/'>July 2015<span class='post-count'>638</span></a>
</li>
<li class='archivedate'>
<a href='https://bavocode111.blogspot.com/2015/06/'>June 2015<span class='post-count'>645</span></a>
</li>
<li class='archivedate'>
<a href='https://bavocode111.blogspot.com/2015/05/'>May 2015<span class='post-count'>677</span></a>
</li>
<li class='archivedate'>
<a href='https://bavocode111.blogspot.com/2015/04/'>April 2015<span class='post-count'>654</span></a>
</li>
<li class='archivedate'>
<a href='https://bavocode111.blogspot.com/2015/03/'>March 2015<span class='post-count'>625</span></a>
</li>
<li class='archivedate'>
<a href='https://bavocode111.blogspot.com/2015/02/'>February 2015<span class='post-count'>643</span></a>
</li>
<li class='archivedate'>
<a href='https://bavocode111.blogspot.com/2015/01/'>January 2015<span class='post-count'>611</span></a>
</li>
<li class='archivedate'>
<a href='https://bavocode111.blogspot.com/2014/09/'>September 2014<span class='post-count'>679</span></a>
</li>
</ul>
</div>
<div class='remaining-items'>
<ul class='flat'>
<li class='archivedate'>
<a href='https://bavocode111.blogspot.com/2014/08/'>August 2014<span class='post-count'>584</span></a>
</li>
<li class='archivedate'>
<a href='https://bavocode111.blogspot.com/2014/07/'>July 2014<span class='post-count'>593</span></a>
</li>
<li class='archivedate'>
<a href='https://bavocode111.blogspot.com/2014/06/'>June 2014<span class='post-count'>626</span></a>
</li>
<li class='archivedate'>
<a href='https://bavocode111.blogspot.com/2014/05/'>May 2014<span class='post-count'>616</span></a>
</li>
<li class='archivedate'>
<a href='https://bavocode111.blogspot.com/2014/04/'>April 2014<span class='post-count'>658</span></a>
</li>
<li class='archivedate'>
<a href='https://bavocode111.blogspot.com/2014/03/'>March 2014<span class='post-count'>597</span></a>
</li>
<li class='archivedate'>
<a href='https://bavocode111.blogspot.com/2014/02/'>February 2014<span class='post-count'>650</span></a>
</li>
<li class='archivedate'>
<a href='https://bavocode111.blogspot.com/2014/01/'>January 2014<span class='post-count'>649</span></a>
</li>
<li class='archivedate'>
<a href='https://bavocode111.blogspot.com/2013/09/'>September 2013<span class='post-count'>677</span></a>
</li>
<li class='archivedate'>
<a href='https://bavocode111.blogspot.com/2013/08/'>August 2013<span class='post-count'>624</span></a>
</li>
<li class='archivedate'>
<a href='https://bavocode111.blogspot.com/2013/07/'>July 2013<span class='post-count'>646</span></a>
</li>
<li class='archivedate'>
<a href='https://bavocode111.blogspot.com/2013/06/'>June 2013<span class='post-count'>659</span></a>
</li>
<li class='archivedate'>
<a href='https://bavocode111.blogspot.com/2013/05/'>May 2013<span class='post-count'>660</span></a>
</li>
<li class='archivedate'>
<a href='https://bavocode111.blogspot.com/2013/04/'>April 2013<span class='post-count'>653</span></a>
</li>
<li class='archivedate'>
<a href='https://bavocode111.blogspot.com/2013/03/'>March 2013<span class='post-count'>632</span></a>
</li>
<li class='archivedate'>
<a href='https://bavocode111.blogspot.com/2013/02/'>February 2013<span class='post-count'>706</span></a>
</li>
<li class='archivedate'>
<a href='https://bavocode111.blogspot.com/2013/01/'>January 2013<span class='post-count'>605</span></a>
</li>
<li class='archivedate'>
<a href='https://bavocode111.blogspot.com/2012/09/'>September 2012<span class='post-count'>628</span></a>
</li>
<li class='archivedate'>
<a href='https://bavocode111.blogspot.com/2012/08/'>August 2012<span class='post-count'>648</span></a>
</li>
<li class='archivedate'>
<a href='https://bavocode111.blogspot.com/2012/07/'>July 2012<span class='post-count'>657</span></a>
</li>
<li class='archivedate'>
<a href='https://bavocode111.blogspot.com/2012/06/'>June 2012<span class='post-count'>618</span></a>
</li>
<li class='archivedate'>
<a href='https://bavocode111.blogspot.com/2012/05/'>May 2012<span class='post-count'>636</span></a>
</li>
<li class='archivedate'>
<a href='https://bavocode111.blogspot.com/2012/04/'>April 2012<span class='post-count'>655</span></a>
</li>
<li class='archivedate'>
<a href='https://bavocode111.blogspot.com/2012/03/'>March 2012<span class='post-count'>674</span></a>
</li>
<li class='archivedate'>
<a href='https://bavocode111.blogspot.com/2012/02/'>February 2012<span class='post-count'>613</span></a>
</li>
<li class='archivedate'>
<a href='https://bavocode111.blogspot.com/2012/01/'>January 2012<span class='post-count'>608</span></a>
</li>
<li class='archivedate'>
<a href='https://bavocode111.blogspot.com/2011/09/'>September 2011<span class='post-count'>580</span></a>
</li>
<li class='archivedate'>
<a href='https://bavocode111.blogspot.com/2011/08/'>August 2011<span class='post-count'>569</span></a>
</li>
<li class='archivedate'>
<a href='https://bavocode111.blogspot.com/2011/07/'>July 2011<span class='post-count'>646</span></a>
</li>
<li class='archivedate'>
<a href='https://bavocode111.blogspot.com/2011/06/'>June 2011<span class='post-count'>642</span></a>
</li>
<li class='archivedate'>
<a href='https://bavocode111.blogspot.com/2011/05/'>May 2011<span class='post-count'>638</span></a>
</li>
<li class='archivedate'>
<a href='https://bavocode111.blogspot.com/2011/04/'>April 2011<span class='post-count'>655</span></a>
</li>
<li class='archivedate'>
<a href='https://bavocode111.blogspot.com/2011/03/'>March 2011<span class='post-count'>661</span></a>
</li>
<li class='archivedate'>
<a href='https://bavocode111.blogspot.com/2011/02/'>February 2011<span class='post-count'>653</span></a>
</li>
<li class='archivedate'>
<a href='https://bavocode111.blogspot.com/2011/01/'>January 2011<span class='post-count'>640</span></a>
</li>
<li class='archivedate'>
<a href='https://bavocode111.blogspot.com/2010/09/'>September 2010<span class='post-count'>666</span></a>
</li>
<li class='archivedate'>
<a href='https://bavocode111.blogspot.com/2010/08/'>August 2010<span class='post-count'>665</span></a>
</li>
<li class='archivedate'>
<a href='https://bavocode111.blogspot.com/2010/07/'>July 2010<span class='post-count'>667</span></a>
</li>
<li class='archivedate'>
<a href='https://bavocode111.blogspot.com/2010/06/'>June 2010<span class='post-count'>649</span></a>
</li>
<li class='archivedate'>
<a href='https://bavocode111.blogspot.com/2010/05/'>May 2010<span class='post-count'>605</span></a>
</li>
<li class='archivedate'>
<a href='https://bavocode111.blogspot.com/2010/04/'>April 2010<span class='post-count'>659</span></a>
</li>
<li class='archivedate'>
<a href='https://bavocode111.blogspot.com/2010/03/'>March 2010<span class='post-count'>633</span></a>
</li>
<li class='archivedate'>
<a href='https://bavocode111.blogspot.com/2010/02/'>February 2010<span class='post-count'>594</span></a>
</li>
<li class='archivedate'>
<a href='https://bavocode111.blogspot.com/2010/01/'>January 2010<span class='post-count'>616</span></a>
</li>
</ul>
</div>
<span class='show-more pill-button'>Show more</span>
<span class='show-less hidden pill-button'>Show less</span>
</div>
</div>
</div>
</details>
</div>
<div class='widget ReportAbuse' data-version='2' id='ReportAbuse1'>
<h3 class='title'>
<a class='report_abuse' href='https://www.blogger.com/go/report-abuse' rel='noopener nofollow' target='_blank'>
Report Abuse
</a>
</h3>
</div><div class='widget Navbar' data-version='2' id='Navbar1'><script type="text/javascript">
    function setAttributeOnload(object, attribute, val) {
      if(window.addEventListener) {
        window.addEventListener('load',
          function(){ object[attribute] = val; }, false);
      } else {
        window.attachEvent('onload', function(){ object[attribute] = val; });
      }
    }
  </script>
<div id="navbar-iframe-container"></div>
<script type="text/javascript" src="https://apis.google.com/js/platform.js"></script>
<script type="text/javascript">
      gapi.load("gapi.iframes:gapi.iframes.style.bubble", function() {
        if (gapi.iframes && gapi.iframes.getContext) {
          gapi.iframes.getContext().openChild({
              url: 'https://www.blogger.com/navbar.g?targetBlogID\x3d923898269918992536\x26blogName\x3dBAVO\x26publishMode\x3dPUBLISH_MODE_BLOGSPOT\x26navbarType\x3dLIGHT\x26layoutType\x3dLAYOUTS\x26searchRoot\x3dhttps://bavocode111.blogspot.com/search\x26blogLocale\x3den_GB\x26v\x3d2\x26homepageUrl\x3dhttps://bavocode111.blogspot.com/\x26targetPostID\x3d7432275272098907930\x26blogPostOrPageUrl\x3dhttps://bavocode111.blogspot.com/2015/04/javascript-function-doesnt-work.html\x26vt\x3d-5631592120584289347',
              where: document.getElementById("navbar-iframe-container"),
              id: "navbar-iframe"
          });
        }
      });
    </script><script type="text/javascript">
(function() {
var script = document.createElement('script');
script.type = 'text/javascript';
script.src = '//pagead2.googlesyndication.com/pagead/js/google_top_exp.js';
var head = document.getElementsByTagName('head')[0];
if (head) {
head.appendChild(script);
}})();
</script>
</div></div>
</aside>
<script type="text/javascript" src="https://resources.blogblog.com/blogblog/data/res/2809677405-indie_compiled.js" async="true"></script>

<script type="text/javascript" src="https://www.blogger.com/static/v1/widgets/523887051-widgets.js"></script>
<script type='text/javascript'>
window['__wavt'] = 'AOuZoY6dlAE02H3Ihy8rMvJHYCGNlwMPiQ:1716052006236';_WidgetManager._Init('//www.blogger.com/rearrange?blogID\x3d923898269918992536','//bavocode111.blogspot.com/2015/04/javascript-function-doesnt-work.html','923898269918992536');
_WidgetManager._SetDataContext([{'name': 'blog', 'data': {'blogId': '923898269918992536', 'title': 'BAVO', 'url': 'https://bavocode111.blogspot.com/2015/04/javascript-function-doesnt-work.html', 'canonicalUrl': 'http://bavocode111.blogspot.com/2015/04/javascript-function-doesnt-work.html', 'homepageUrl': 'https://bavocode111.blogspot.com/', 'searchUrl': 'https://bavocode111.blogspot.com/search', 'canonicalHomepageUrl': 'http://bavocode111.blogspot.com/', 'blogspotFaviconUrl': 'https://bavocode111.blogspot.com/favicon.ico', 'bloggerUrl': 'https://www.blogger.com', 'hasCustomDomain': false, 'httpsEnabled': true, 'enabledCommentProfileImages': true, 'gPlusViewType': 'FILTERED_POSTMOD', 'adultContent': false, 'analyticsAccountNumber': '', 'encoding': 'UTF-8', 'locale': 'en-GB', 'localeUnderscoreDelimited': 'en_gb', 'languageDirection': 'ltr', 'isPrivate': false, 'isMobile': false, 'isMobileRequest': false, 'mobileClass': '', 'isPrivateBlog': false, 'isDynamicViewsAvailable': true, 'feedLinks': '\x3clink rel\x3d\x22alternate\x22 type\x3d\x22application/atom+xml\x22 title\x3d\x22BAVO - Atom\x22 href\x3d\x22https://bavocode111.blogspot.com/feeds/posts/default\x22 /\x3e\n\x3clink rel\x3d\x22alternate\x22 type\x3d\x22application/rss+xml\x22 title\x3d\x22BAVO - RSS\x22 href\x3d\x22https://bavocode111.blogspot.com/feeds/posts/default?alt\x3drss\x22 /\x3e\n\x3clink rel\x3d\x22service.post\x22 type\x3d\x22application/atom+xml\x22 title\x3d\x22BAVO - Atom\x22 href\x3d\x22https://www.blogger.com/feeds/923898269918992536/posts/default\x22 /\x3e\n\n\x3clink rel\x3d\x22alternate\x22 type\x3d\x22application/atom+xml\x22 title\x3d\x22BAVO - Atom\x22 href\x3d\x22https://bavocode111.blogspot.com/feeds/7432275272098907930/comments/default\x22 /\x3e\n', 'meTag': '', 'adsenseHostId': 'ca-host-pub-1556223355139109', 'adsenseHasAds': true, 'adsenseAutoAds': false, 'boqCommentIframeForm': true, 'loginRedirectParam': '', 'view': '', 'dynamicViewsCommentsSrc': '//www.blogblog.com/dynamicviews/4224c15c4e7c9321/js/comments.js', 'dynamicViewsScriptSrc': '//www.blogblog.com/dynamicviews/8a8c39e8754b0ef7', 'plusOneApiSrc': 'https://apis.google.com/js/platform.js', 'disableGComments': true, 'interstitialAccepted': false, 'sharing': {'platforms': [{'name': 'Get link', 'key': 'link', 'shareMessage': 'Get link', 'target': ''}, {'name': 'Facebook', 'key': 'facebook', 'shareMessage': 'Share to Facebook', 'target': 'facebook'}, {'name': 'BlogThis!', 'key': 'blogThis', 'shareMessage': 'BlogThis!', 'target': 'blog'}, {'name': 'Twitter', 'key': 'twitter', 'shareMessage': 'Share to Twitter', 'target': 'twitter'}, {'name': 'Pinterest', 'key': 'pinterest', 'shareMessage': 'Share to Pinterest', 'target': 'pinterest'}, {'name': 'Email', 'key': 'email', 'shareMessage': 'Email', 'target': 'email'}], 'disableGooglePlus': true, 'googlePlusShareButtonWidth': 0, 'googlePlusBootstrap': '\x3cscript type\x3d\x22text/javascript\x22\x3ewindow.___gcfg \x3d {\x27lang\x27: \x27en_GB\x27};\x3c/script\x3e'}, 'hasCustomJumpLinkMessage': false, 'jumpLinkMessage': 'Read more', 'pageType': 'item', 'postId': '7432275272098907930', 'pageName': 'javascript function doesnt work -', 'pageTitle': 'BAVO: javascript function doesnt work -'}}, {'name': 'features', 'data': {}}, {'name': 'messages', 'data': {'edit': 'Edit', 'linkCopiedToClipboard': 'Link copied to clipboard', 'ok': 'Ok', 'postLink': 'Post link'}}, {'name': 'template', 'data': {'name': 'custom', 'localizedName': 'Custom', 'isResponsive': true, 'isAlternateRendering': false, 'isCustom': true}}, {'name': 'view', 'data': {'classic': {'name': 'classic', 'url': '?view\x3dclassic'}, 'flipcard': {'name': 'flipcard', 'url': '?view\x3dflipcard'}, 'magazine': {'name': 'magazine', 'url': '?view\x3dmagazine'}, 'mosaic': {'name': 'mosaic', 'url': '?view\x3dmosaic'}, 'sidebar': {'name': 'sidebar', 'url': '?view\x3dsidebar'}, 'snapshot': {'name': 'snapshot', 'url': '?view\x3dsnapshot'}, 'timeslide': {'name': 'timeslide', 'url': '?view\x3dtimeslide'}, 'isMobile': false, 'title': 'javascript function doesnt work -', 'description': '    I will repeat my question   I have written this code and I do not understand that Why does it work?   I wrote the sandwich option I wrot...', 'url': 'https://bavocode111.blogspot.com/2015/04/javascript-function-doesnt-work.html', 'type': 'item', 'isSingleItem': true, 'isMultipleItems': false, 'isError': false, 'isPage': false, 'isPost': true, 'isHomepage': false, 'isArchive': false, 'isLabelSearch': false, 'postId': 7432275272098907930}}, {'name': 'widgets', 'data': [{'title': 'Search This Blog', 'type': 'BlogSearch', 'sectionId': 'search_top', 'id': 'BlogSearch1'}, {'title': 'BAVO (Header)', 'type': 'Header', 'sectionId': 'header', 'id': 'Header1'}, {'title': 'Featured post', 'type': 'FeaturedPost', 'sectionId': 'page_body', 'id': 'FeaturedPost1', 'postId': '268011884071188695'}, {'title': 'Blog Posts', 'type': 'Blog', 'sectionId': 'page_body', 'id': 'Blog1', 'posts': [{'id': '7432275272098907930', 'title': 'javascript function doesnt work -', 'showInlineAds': true}], 'headerByline': {'regionName': 'header1', 'items': [{'name': 'share', 'label': ''}, {'name': 'timestamp', 'label': '-'}]}, 'footerBylines': [{'regionName': 'footer1', 'items': [{'name': 'comments', 'label': ''}, {'name': 'icons', 'label': ''}]}, {'regionName': 'footer2', 'items': [{'name': 'labels', 'label': ''}]}, {'regionName': 'footer3', 'items': [{'name': 'location', 'label': ''}]}], 'allBylineItems': [{'name': 'share', 'label': ''}, {'name': 'timestamp', 'label': '-'}, {'name': 'comments', 'label': ''}, {'name': 'icons', 'label': ''}, {'name': 'labels', 'label': ''}, {'name': 'location', 'label': ''}]}, {'title': '', 'type': 'PopularPosts', 'sectionId': 'page_body', 'id': 'PopularPosts1', 'posts': [{'title': 'Pass DB Connection parameters to a Kettle a.k.a PDI table Input step\ndynamically from Excel -', 'id': 2793814376539540092}, {'title': 'multithreading - PhantomJS-Node in a for Loop -', 'id': 6059979332267408919}, {'title': 'c++ - MATLAB .m file to .mex file using Matlab Compiler -', 'id': 1442653424619804864}]}, {'title': '', 'type': 'HTML', 'sectionId': 'page_body', 'id': 'HTML3'}, {'title': '', 'type': 'HTML', 'sectionId': 'page_body', 'id': 'HTML1'}, {'type': 'Attribution', 'sectionId': 'footer', 'id': 'Attribution1'}, {'title': 'About Me', 'type': 'Profile', 'sectionId': 'sidebar_top', 'id': 'Profile1'}, {'title': '', 'type': 'BlogArchive', 'sectionId': 'sidebar_bottom', 'id': 'BlogArchive1'}, {'title': '', 'type': 'ReportAbuse', 'sectionId': 'sidebar_bottom', 'id': 'ReportAbuse1'}, {'title': 'Navbar', 'type': 'Navbar', 'sectionId': 'sidebar_bottom', 'id': 'Navbar1'}]}]);
_WidgetManager._RegisterWidget('_BlogSearchView', new _WidgetInfo('BlogSearch1', 'search_top', document.getElementById('BlogSearch1'), {}, 'displayModeFull'));
_WidgetManager._RegisterWidget('_HeaderView', new _WidgetInfo('Header1', 'header', document.getElementById('Header1'), {}, 'displayModeFull'));
_WidgetManager._RegisterWidget('_FeaturedPostView', new _WidgetInfo('FeaturedPost1', 'page_body', document.getElementById('FeaturedPost1'), {}, 'displayModeFull'));
_WidgetManager._RegisterWidget('_BlogView', new _WidgetInfo('Blog1', 'page_body', document.getElementById('Blog1'), {'cmtInteractionsEnabled': false, 'lightboxEnabled': true, 'lightboxModuleUrl': 'https://www.blogger.com/static/v1/jsbin/1132154221-lbx__en_gb.js', 'lightboxCssUrl': 'https://www.blogger.com/static/v1/v-css/13464135-lightbox_bundle.css'}, 'displayModeFull'));
_WidgetManager._RegisterWidget('_PopularPostsView', new _WidgetInfo('PopularPosts1', 'page_body', document.getElementById('PopularPosts1'), {}, 'displayModeFull'));
_WidgetManager._RegisterWidget('_HTMLView', new _WidgetInfo('HTML3', 'page_body', document.getElementById('HTML3'), {}, 'displayModeFull'));
_WidgetManager._RegisterWidget('_HTMLView', new _WidgetInfo('HTML1', 'page_body', document.getElementById('HTML1'), {}, 'displayModeFull'));
_WidgetManager._RegisterWidget('_AttributionView', new _WidgetInfo('Attribution1', 'footer', document.getElementById('Attribution1'), {}, 'displayModeFull'));
_WidgetManager._RegisterWidget('_ProfileView', new _WidgetInfo('Profile1', 'sidebar_top', document.getElementById('Profile1'), {}, 'displayModeFull'));
_WidgetManager._RegisterWidget('_BlogArchiveView', new _WidgetInfo('BlogArchive1', 'sidebar_bottom', document.getElementById('BlogArchive1'), {'languageDirection': 'ltr', 'loadingMessage': 'Loading\x26hellip;'}, 'displayModeFull'));
_WidgetManager._RegisterWidget('_ReportAbuseView', new _WidgetInfo('ReportAbuse1', 'sidebar_bottom', document.getElementById('ReportAbuse1'), {}, 'displayModeFull'));
_WidgetManager._RegisterWidget('_NavbarView', new _WidgetInfo('Navbar1', 'sidebar_bottom', document.getElementById('Navbar1'), {}, 'displayModeFull'));
</script>
</body>
</html>