Tag: joomla

如何在joomla模块中通过javascript发送输入文件类型

我想用javascript发送一个文件到php文件。 我在我的php文件中有这个表单 Filename: upload 和js文件中的白色代码 jQuery(document).on(“click”,”#poi”,function(){ var objfile=new FormData(); var file=jQuery(“#file1”).get(0).files[0]; objfile.append(“iefile078”,file); var ajax ; ajax.upload.addEventListener(“progress” ,progresshandler ,false); function progresshandler(){ jQuery(“#plo”).text(“uploading ….”); } ajax.open(“POST”,”helper.php”); ajax.send(objfile); }); 当我点击我页面上的“上传”时,此function正常启动。 我想在上传进行“上传….”节目时向用户显示。 另外我想将此文件发送到helper.php文件。 如何在这种情况下将open()和send()函数的属性设置为传递上传到helper.php的文件? 这是我的文件结构,我的表单位于default.php中 js jquery.js tmpl default.php helper.php mod_upload.php mod_upload.xml

我可以在我的joomla网站中嵌入一个砌体jquery模板吗?

我想在我的网站上使用Masonry创建一个video库,但我遇到了困难。 我正在使用Joomla作为我的CMS并且已经有一个使用火箭主题的模板但在我的一个页面上我想要一个video列表(我将更新)供人们观看。 我想让它在视觉上吸引人,而砖石引起了我的注意,但我不明白如何让它运行起来。 Jquery如何与Joomla合作,如果它可以的话呢?

在Php文件的If语句中使用DIV的宽度

我有一个.php文件,其中我有一个布局,我想根据div的宽度改变。 该div是以下代码的父级,位于另一个文件中。 400) { ?> sidepanel-left content sidepanel-right sidepanel-left sidepanel-right content 这给了我一个只有Html,head和body标签的空白页面。 我确定这是我需要的一个非常基本的代码,但我只是从PHP / JS开始,我不确定我在做什么-_- 如果您需要更多信息,请与我们联系! 在此先感谢您的帮助! 🙂 B.

如何在AJAX中编写PHP

我试图让我的会话在ajax ..因为我已经编写了这样的代码 BTLJ.ajax({ type: “POST”, url: btlOpt.BT_AJAX, data: datasubmit, success: function(html){ //if html contain “Registration failed” is register fail BTLJ(“#btl-register-in-process”).hide(); if(html.indexOf(‘$error$’)!= -1){ … … } }else{ BTLJ(“.btl-formregistration”).children(“div”).hide(); BTLJ(“#btl-success”).html(html); BTLJ(“#btl-success”).show(); alert(); setTimeout(function() { ); BTLJ(“.kcregbox”).show();},7000); // BTLJ(“#btl-success”).hide(); } }, error: function (XMLHttpRequest, textStatus, errorThrown) { alert(textStatus + ‘: Ajax request failed’); } }); 但如果我这样写,ajax就无法工作了……请帮助我在ajax中开会。 提前致谢。

找不到“JFactory”类

我一直在使用Jumi在Joomla中创建一些模块。 所以我可以编写任何php / javascript代码并创建一个Jumi模块,我可以在哪里显示。 我已经做了一段时间没有问题但现在我正在尝试使用Jquery进行一些AJAX开发我收到此错误: Class ‘JFactory’ not found in api.php 所以我有一个带有jQuery代码的PHP文件: $(function() { $.ajax({ url: ‘ajax_dashboard/api.php’, //the script to call to get data data: “”, dataType: ‘json’, //data format success: function(data) //on recieve of reply { var id = data[0]; //get id var vname = data[1]; //get name $(‘#output’).append(“id: “+id+” name: “+vname) .append(“”); //Set […]

Joomla Jquery不工作,为什么?

我安装了joomla 2.5正版安装,但是JQuery无法正常工作。我怎样才能让jQuery在joomla中工作? 默认的JQuery库是不是和joomla一起出现的?

Joomla:菜单项指向同一页面中的不同位置

我想在侧边栏中创建一个菜单,每个项目将通过在页面内上下滚动来指向当前页面中的一个部分。 我可以使用任何模块吗? 我使用的是3.0,我可以访问所有文件 谢谢

JQuery删除div无法在Internet Explorer中工作

我不是一个真正的javascript / jquery编码器,我有一个非常简单的代码来删除一个不能在IE中工作的div 我在Joomla页面中使用它,所以我称之为: $document->addScript(“http://code.jquery.com/jquery-latest.js”);//adiciona jquery 而且,在身体文件中: setTimeout(function() { $(“#yourDiv”).remove(); }, 50000); FireFox和Chrome(一如既往)还可以。 有人可以指出我的错误吗? 非常感谢 :) 已编辑* ** * ** * ** * ** 我也试过这个代码没有jquery,但总是不在IE中工作(9) setTimeout(‘yourFunction();’, 5000); function yourFunction(){ var div = document.getElementById(“yourDiv”); div.parentNode.removeChild(div); }

通过ajaxpost发送一组值

请考虑以下代码, . . . 我想用ajaxpost提交这个。 $.post(‘index.php’,{ ‘option’:’com_movies’, ‘controller’:’movie’, ‘task’ : ‘savedata’, ‘format’:’raw’, ‘mid’:$(‘#movie_id’).val() },function(result){ if(result) alert(result); return; }); 我想知道如何使用ajax post发送showtime id。

Joomla 2.5 Jquery无法调用null方法

大家好我正在使用Joomla 2.5与Jquery,我在我的chrome控制台中遇到了这个奇怪的错误: “Uncaught TypeError: Cannot call method ‘slideUp’ of null ” 这里是index.php标题部分: <script type="text/javascript" src="baseurl ?>/templates/template ?>/js/jscript.js”> 和jscript.js代码: $(document).ready(function(){ var slider = document.getElementById(“login-form”); alert (slider); $(“#login-form”).slideUp(100); <- error is on this line }); 我测试了它并且警告显示:[object HTMLFormElement],因此它的测试“登录表单”真的存在。 无法弄清楚为什么我会得到 “Uncaught TypeError: Cannot call method ‘slideUp’ of null ” 拜托,你能帮我!!!!!!