简体   繁体   English

Javascript 代码在 Ubuntu/Firefox 中不起作用 - php/postgresql

[英]Javascript code doesn't work in Ubuntu/Firefox - php/postgresql

I recently converted php/mysql user-login code to php/postgresql.我最近将 php/mysql 用户登录代码转换为 php/postgresql。 Everything seems to be fine except for the places where there is call to javascript for invoking some buttons (eg Register, Forget Password etc).除了调用 javascript 来调用某些按钮(例如注册、忘记密码等)的地方,一切似乎都很好。 The same javascript code (used in mysql) works fine for Firefox/Ubuntu but the buttons do nothing in postgresql version with Firefox/Ubuntu.相同的 javascript 代码(在 mysql 中使用)适用于 Firefox/Ubuntu,但在 Firefox/Ubuntu 的 postgresql 版本中,按钮不起作用。 Since the javascript code is same for both mysql and postgresql, I believe it shouldn't depend on whether it is mysql or postgresql. Since the javascript code is same for both mysql and postgresql, I believe it shouldn't depend on whether it is mysql or postgresql. Is there something I need to include for this migration or am I missing something?我需要为这次迁移添加一些东西还是我遗漏了什么? Any help will be appreciated.任何帮助将不胜感激。

Update This is the basic code for "send password" button that only displays ajaxloader and does nothing更新这是“发送密码”按钮的基本代码,它只显示 ajaxloader 而什么都不做

<form action="" method="" name="form_passwprocess" id="form_passwprocess">

                <label>Email id</label>

                <input class="inplaceError" type="text" id="emailid" name="emailid" maxlength="120" value=""/>

                <input type="hidden" name="forgetpasswordaction" value="1"/>

                <div style="clear:both;"></div>

        <a id="_forgetpassw_btt" class="button">Send Password</a>

        <div id="emailid_error" class="error">

                    <!--div class="errorimg" style="display:none;">This is an error</div-->

            </div>

                    <img style="display:none;margin-bottom:15px;" class="ajaxload" id="ajaxld" src="images/ajax-loader.gif"/>

         </form>

Well, javascript is client side laguage - means it is executed in browser - it has nothing to do with your server side technologies (PHP, MySQL, Postgresql).好吧,javascript 是客户端语言 - 意味着它在浏览器中执行 - 它与您的服务器端技术(PHP,MySQL,Postgresql)无关。

Your problem might be from some queries that are MySQL specific and are not working with PostgreSQL, take a look in apache's error log files and see if some errors are appearing when you press the buttons that are not working.您的问题可能来自某些特定于 MySQL 并且不适用于 PostgreSQL 的查询,请查看 apache 的错误日志文件,看看当您按下不起作用的按钮时是否出现了一些错误。

Also, in Firebug, see if you get hits to the server when the buttons are pressed (this if nothing appears in the error log)此外,在 Firebug 中,查看按下按钮时是否会点击服务器(如果错误日志中没有出现任何内容)

As long as your javascript code is coming from flat files and not inside the DB, the DB switch should have nothing to do with this, as you note, unless something has gone completely haywire.只要您的 javascript 代码来自平面文件而不是 DB 内部,DB 开关应该与此无关,正如您所指出的,除非某些事情完全失控。 Just debug your javascript as normal and ignore the DB issue.只需正常调试您的 javascript 并忽略数据库问题。 Maybe there's a timing issue where the page loads faster in one of them and your event listener code is not properly wrapped in a document.ready callback function.也许存在时间问题,其中一个页面加载速度更快,并且您的事件侦听器代码未正确包装在document.ready回调 function 中。 Are you setting up your button event handlers within a document.ready callback?您是否在document.ready回调中设置按钮事件处理程序?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM