dtnbjjq51949 2016-05-04 10:58 采纳率: 0%
浏览 38

由于jquery插件,图片上传不再上传图片

I am using Jquery mobile and I have a form that contain a file upload meant to upload a profile picture to be saved in a folder and database as well.It worked well when i had jquery 1.8.2 min.js plugged in but it messed my listview search but when i changed the jquery 1.8.2 to 1.5.2 it fixed the listview search but now doesn't allow me to upload picture when i click it doesn't open the directory.at the moment i removed the jquery 1.8.2 so i can't upload pictures.Can someone suggest what i can use to fix it.Is there another plugin that i can use to fix it or can i do it manually inside the file to fix it.I know the problem has to do with the plugins but which one can fix it.

My plugins

<link rel="stylesheet" href="http://code.jquery.com/mobile/1.0a4.1/jquery.mobile-1.0a4.1.min.css" />
<script src="http://code.jquery.com/jquery-1.5.2.min.js"></script>
<script src="http://code.jquery.com/mobile/1.0a4.1/jquery.mobile-1.0a4.1.min.js"></script>  
<script src="http://code.jquery.com/jquery-1.8.2.min.js"></script>

My Jquery codes

<div data-role="page" id="page5" >
    <div data-role="header">
        <h1>Vacancies</h1>
    </div>

    <div data-role="content">
    <h5><span class="glyphicon glyphicon-user"></span>
        <?php  echo 'Welcome '.$_SESSION['username'];

        echo "<br><a href='logout.php' data-ajax='false'>Logout</a>"; ?> ...</h5> 

    <ul data-role="listview" data-inset="true"  data-filter="true" id="jobList">
    <li data-role="list-divider"></li>

    </ul>
    <script>
    addToHomescreen();
    </script>
    </div>   
    <div data-role="footer">
        <h4>&copy;2016 &bull; Genesis M&C Holdings Pty</h4>
    </div>
</div>
<script type="text/javascript">

 $.getJSON("http://localhost:8080//recruitment//jobdetails.json", function(jobs){
   //Start off with an empty list every time to get the latest from server
   $('#jobList').empty();

   //add the job items as list
   $.each(jobs, function(i, job){
     $('#jobList').append(generateJobLink(job));
   });

   //refresh the list view to show the latest changes
  $('#jobList').listview().listview('refresh');    

 });

  //creates a job link list item
 function generateJobLink(job){

  //debugger;
  return '<li><a href="javascript:void(0)'
         + '" onclick="goToJobDetailPage(\''
         + job.jobtype 
         + '\',\''
         + job.city 
         + '\',\''
          + job.message 
         + '\',\''
          + job.details 
         + '\',\''
          + job.jobid 
         + '\',\''


         + job.jobid +'\')">' 
         + job.jobtype+"<h3></h3>"
          + job.city +"<p><strong><br>"
           + job.message +"<h4></h4>"

         + '</a></li>';
  }

  function goToJobDetailPage(jobType,jobCity,jobMessage,jobDetails,jobId){

   //create the page html template
   var jobPage = $("<div data-role='page' data-url=dummyUrl> <div data-role='header'><h1>"
                   + 'Job Details' + "</h1></div><div data-role='content'><strong><form style='border:dotted 1px #CCC' action='jobapp.php' method='post' data-ajax='false'>" 
                   + jobType + "</strong><h6> <input type='hidden' name='jobid'  value='"+ jobId +"' />"
                    + jobId + "</strong><h6> <input type='hidden' name='jobtype'  value='"+ jobType +"' />"
                   + jobCity +"</h6><p> <input type='hidden' name='city'  value='"+ jobCity +"' />"  
                   + jobDetails +"</P><input type='hidden' name='jobid'  value='"+ jobId +"' /><input type='hidden' name='jobtype'  value='"+ jobType +"' /><input type='hidden' name='city'  value='"+ jobCity +"' /> <div class='col-lg-10 text-center'><button type='submit' class='btn btn-warning' id='appbtn' name='appbtn' value='jobapp' data-role='none'><span class='glyphicon glyphicon-envelope'></span>&nbsp;Apply</button><span>&nbsp</span><button type='submit' class='btn btn-danger' id='favbtn' name='favbtn' value='favorite' data-role='none'><span class='glyphicon glyphicon-star'></span>&nbsp;Favorite</button></div></form></div><div data-role='footer'><h4>" 
                   + '&copy;2016 &bull; Genesis M&C Holdings Pty' + "</h4></div></div>");

   //append the new page to the page container
   jobPage.appendTo( $.mobile.pageContainer );

  //go to the newly created page
  $.mobile.changePage( jobPage );
  }  

</script> 
  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥20 关于#硬件工程#的问题,请各位专家解答!
    • ¥15 关于#matlab#的问题:期望的系统闭环传递函数为G(s)=wn^2/s^2+2¢wn+wn^2阻尼系数¢=0.707,使系统具有较小的超调量
    • ¥15 FLUENT如何实现在堆积颗粒的上表面加载高斯热源
    • ¥30 截图中的mathematics程序转换成matlab
    • ¥15 动力学代码报错,维度不匹配
    • ¥15 Power query添加列问题
    • ¥50 Kubernetes&Fission&Eleasticsearch
    • ¥15 報錯:Person is not mapped,如何解決?
    • ¥15 c++头文件不能识别CDialog
    • ¥15 Excel发现不可读取的内容