簡體   English   中英

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

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

我最近將 php/mysql 用戶登錄代碼轉換為 php/postgresql。 除了調用 javascript 來調用某些按鈕(例如注冊、忘記密碼等)的地方,一切似乎都很好。 相同的 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. 我需要為這次遷移添加一些東西還是我遺漏了什么? 任何幫助將不勝感激。

更新這是“發送密碼”按鈕的基本代碼,它只顯示 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>

好吧,javascript 是客戶端語言 - 意味着它在瀏覽器中執行 - 它與您的服務器端技術(PHP,MySQL,Postgresql)無關。

您的問題可能來自某些特定於 MySQL 並且不適用於 PostgreSQL 的查詢,請查看 apache 的錯誤日志文件,看看當您按下不起作用的按鈕時是否出現了一些錯誤。

此外,在 Firebug 中,查看按下按鈕時是否會點擊服務器(如果錯誤日志中沒有出現任何內容)

只要您的 javascript 代碼來自平面文件而不是 DB 內部,DB 開關應該與此無關,正如您所指出的,除非某些事情完全失控。 只需正常調試您的 javascript 並忽略數據庫問題。 也許存在時間問題,其中一個頁面加載速度更快,並且您的事件偵聽器代碼未正確包裝在document.ready回調 function 中。 您是否在document.ready回調中設置按鈕事件處理程序?

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM