if I put alert here in javascript …then only background visible in Chrome …but I don’t need such alert in Firefox to get visible.
function getUserInfo(){
divDisplay(‘div_background’); alert(‘test’) // this pauses excution …and background becomes visible now in Chrome …but in Firefox it works without alert.
…
…
Do you find any reason here ? I could post the code but that will confuse you more…because of unnecessary codes.
I have narrowed down the problem area …this is where it differentiates between firefox and chrome…see if I put a alert as shown Chrome will show you background …but firefox does not require any alert to show background.
alternatively , by looking at the code if you suggest me diagnostics , I may come up with results …which could possibly be helpful to resolve this issue.
Well, to summarize the situation:
You have a hidden element: <div id="div_background" class="ModalBackground">
You want to call the function getUserInfo(), which in turn should call the function divDisplay(), passing it the id of the element to display. divDisplay() should then display the element, but this isn’t working in Chrome.
You call this at the end of getUserInfo: divHide(‘div_background’)
Could that be the problem? It seems to be hiding it as soon as it displays. The reason it works with the alert is because it pauses the code so it can’t call divHide() yet.
You seem to be using jQuery, so why not just use $(‘#div_background’).show() ?
Ok then, please try to isolate the code which illustrates your problem, but is not working for you and post an example of that.
It doesn’t matter if you post a bit too much JS, but it would help to see when the function is getting called, what exists on the page when it is called, that sort of thing …