title: Error jquery function while loading XPages
body: <p>I have been trying to the same file upload page of bootstrap. I get this error When i try. I copied all of components, Css, images and all of js files in to my database. It work on demo database but not on my application db :( </p>
  
  <p>I think I cannot call jquery file or JS file and code may not communicatate earch other :( 
  I do not know What i miss. :( </p>
  
  <p><a href="https://i.stack.imgur.com/L4xPQ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/L4xPQ.png" alt="Error Screen"></a></p>
  
  <p>Here is my Code below.. (I put all resoursces in to where they have to be)</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;xp:view xmlns:xp="http://www.ibm.com/xsp/core"
      xmlns:xc="http://www.ibm.com/xsp/custom"&gt;
      &lt;xp:this.data&gt;
          &lt;xp:dominoDocument var="document1" formName="Contact"&gt;&lt;/xp:dominoDocument&gt;
      &lt;/xp:this.data&gt;
      &lt;xp:this.resources&gt;
          &lt;xp:script src="/JQueryXSnippet.js" clientSide="true"&gt;&lt;/xp:script&gt;
      &lt;/xp:this.resources&gt;
      &lt;script type="text/javascript" src="bootstrapfileinput4/js/fileinput.js"&gt;&lt;/script&gt;
  
      &lt;link rel="stylesheet" href="bootstrapfileinput4/css/fileinput.css" media="all" type="text/css" /&gt;
      &lt;xp:scriptBlock id="scriptBlockInitFile"&gt;
          &lt;xp:this.value&gt;
              &lt;![CDATA[
             $(document).ready( 
                 function() {
                     $('input[type=file]').fileinput({
                          previewFileType: "image",
                          browseClass: "btn btn-primary",
                          browseLabel: "Browse",
                          browseIcon: '&lt;i class="glyphicon glyphicon-plus"&gt;&lt;/i&gt;',
                          removeClass: "btn btn-danger",
                          removeLabel: "Delete",
                          removeIcon: '&lt;i class="glyphicon glyphicon-trash"&gt;&lt;/i&gt;',
                          uploadClass: "btn btn-info",
                          uploadLabel: "Upload",
                          uploadIcon: '&lt;i class="glyphicon glyphicon-upload"&gt;&lt;/i&gt;',
                  });
                 }
             );
          ]]&gt;
          &lt;/xp:this.value&gt;
      &lt;/xp:scriptBlock&gt;
  
              &lt;xp:panel xp:key="facetLeft"&gt;
                  &lt;xp:image url="/bootstrapxplogodb.jpg" id="image1"&gt;&lt;/xp:image&gt;&lt;/xp:panel&gt;
              &lt;xp:panel xp:key="facetMiddle"&gt;
                  &lt;xp:br&gt;&lt;/xp:br&gt;
                  &lt;div class="page-header"&gt;
                      &lt;h2&gt;Bootstrap FileInput&lt;/h2&gt;
                      &lt;h4&gt;An enhanced HTML 5 file input for Bootstrap with file preview for 
                      various files, offers multiple selection, and more. 
                      The plugin allows you a simple way to setup an advanced file picker/upload
                       control built to work specially with Bootstrap CSS3 styles. 
                       It enhances the file input functionality further, by offering support to 
                       preview a wide variety of files i.e. images, text, html, video, audio, flash, and 
                       objects.&lt;/h4&gt;
                      &lt;xp:link escape="true" id="link1"
                          text="Bootstrap in XPages: Using the new Bootstrap Fileinput Plugin in XPages Part I"
                          value="https://xpagesandmore.blogspot.nl/2015/06/bootstrap-in-xpages-using-new-bootstrap.html"
                          target="_blank"&gt;
                      &lt;/xp:link&gt;
                      &lt;br/&gt;
                  &lt;/div&gt;              
                  &lt;xp:fileUpload id="fileUpload1"
                      value="#{document1.fileAttachment}"&gt;
                      &lt;xp:this.attrs&gt;
                          &lt;xp:attr name="accept" value="image/*" /&gt;
                      &lt;/xp:this.attrs&gt;
                  &lt;/xp:fileUpload&gt;
                  &lt;xp:br&gt;&lt;/xp:br&gt;
                  &lt;xp:br&gt;&lt;/xp:br&gt;
                  &lt;xp:fileDownload rows="30" id="fileDownload1"
                      displayLastModified="true" value="#{document1.fileAttachment}"
                      hideWhen="true" allowDelete="true"&gt;
                  &lt;/xp:fileDownload&gt;              
                  &lt;xp:br&gt;&lt;/xp:br&gt;
                  &lt;xp:button value="Save Document" id="button1"
                      styleClass="btn btn-primary" rendered="false"&gt;
                      &lt;xp:eventHandler event="onclick" submit="true"
                          refreshMode="complete"&gt;
                          &lt;xp:this.action&gt;
                              &lt;xp:actionGroup&gt;
                                  &lt;xp:saveDocument&gt;&lt;/xp:saveDocument&gt;
                                  &lt;xp:openPage name="/BootstrapFileInput4.xsp"&gt;&lt;/xp:openPage&gt;
                              &lt;/xp:actionGroup&gt;
                          &lt;/xp:this.action&gt;
                      &lt;/xp:eventHandler&gt;
                  &lt;/xp:button&gt;
                  &lt;xp:br&gt;&lt;/xp:br&gt;
                  &lt;xp:br&gt;&lt;/xp:br&gt;
              &lt;/xp:panel&gt;
  
  
  &lt;/xp:view&gt;
  </code></pre>
  
  <p><strong>UPDATE</strong>:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;xp:view xmlns:xp="http://www.ibm.com/xsp/core"
      xmlns:xc="http://www.ibm.com/xsp/custom"&gt;
      &lt;xp:this.data&gt;
          &lt;xp:dominoDocument var="document1" formName="Contact"&gt;&lt;/xp:dominoDocument&gt;
      &lt;/xp:this.data&gt;
      &lt;xp:this.resources&gt;
          &lt;xp:script src="/JQueryXSnippet.js" clientSide="true"&gt;&lt;/xp:script&gt;
      &lt;/xp:this.resources&gt;
      &lt;script type="text/javascript" src="bootstrapfileinput4/js/fileinput.js"&gt;&lt;/script&gt;
  
      &lt;link rel="stylesheet" href="bootstrapfileinput4/css/fileinput.css" media="all" type="text/css" /&gt;
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/PJNUZ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/PJNUZ.png" alt="HERE IS THE NETWORK TAB"></a></p>