简体   繁体   中英

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

I recently converted php/mysql user-login code to 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). The same javascript code (used in mysql) works fine for Firefox/Ubuntu but the buttons do nothing in postgresql version with Firefox/Ubuntu. 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

<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).

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.

Also, in Firebug, see if you get hits to the server when the buttons are pressed (this if nothing appears in the error log)

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. Just debug your javascript as normal and ignore the DB issue. 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. Are you setting up your button event handlers within a document.ready callback?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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