Ditutup

Javascript debug

I have a large javascript function init() that hides and shows a large number of div's. When the page is loaded the javascript function is triggered by the script below.

<script type="text/javascript">

$(document).ready(function() {

init();

});

</script>

Most of the time the javascript is triggered by the script below. However once in a while the script init() seems not to be triggered. Approximately 1 of 20 times the function init() seems not to be triggered. All the other 19 times the page and javascript is working fine without any errors. The circumstances when this error occurs seem to be no different from normally as this error occurs when Pressing F5 20 times.

I checked that init() seems to not being called at all because the first statement (alert("function called");) in init() wasn't called. In the cases that the javascript was working fine I got the alert message and the page was loaded fine without any errors.

I tried different ways to trigger the javascript such as [url removed, login to view] and putting at the end of the page this script:

<script type="text/javascript">init();</script>

All those different methods to trigger init() didn't seem to make any difference.

This is the init() function:

function init(){

pauzereload__gl_var=1;

load2__gl_var=0;

//Hide bus options:

var boxbusnotshow = [url removed, login to view]("boxDiv").getElementsByTagName("a");

boxbusnotshow[3].style.display="none";

boxbusnotshow[4].style.display="none";

boxbusnotshow[5].style.display="none";

[url removed, login to view]("loadingdiv").[url removed, login to view] = "none";

[url removed, login to view]("loadingdivdate").[url removed, login to view] = "none";

getvariables(); //Get variables generated by the php script, to get activetab

var a=1; b=1;

highlightboxinitiate(a,activetab__gl_var,load2__gl_var);

highlightlistinitiate(a,b);

pauzereload__gl_var=0;

}

The functions called from this function are attached.

Please bid on this project if you are sure you can debug this problem.

Kemahiran: Javascript

Lihat lebih lanjut: statement problem, php debug, debug, time triggered, javascript time difference, text javascript, hide div javascript, trigger javascript, ready javascript, javascript text, javascript document ready, document ready javascript, hide javascript hide, script alert script, pressing document, bus script php, javascript ready, large php script working, javascript page hide, javascript problem, div hide, javascript hide div, php function hide, javascript onload, can bus project

Tentang Majikan:
( 64 ulasan ) Goes, Netherlands

ID Projek: #1552353

6 pekerja bebas membida secara purata $47 untuk pekerjaan ini

HeNet

Hello I am interested in your project. Please check pm. Thanks.

$50 USD dalam sehari
(84 Ulasan)
6.5
khanhhuyna

I'm a javascript developer and I'm happy to help you to solve this bug. Thanks.

$80 USD dalam sehari
(54 Ulasan)
5.9
SSADeveloper

hello i have gone through your requirement plz check my pm for futher info thank u

$50 USD dalam sehari
(15 Ulasan)
4.4
lbear9090

Hi. I can do this perfectly. I have full experience in this job. I can start right now. Thanks.

$50 USD dalam sehari
(4 Ulasan)
3.8
itfortune

Plz let's discuss with me.

$40 USD dalam sehari
(0 Ulasan)
0.0
Alfateck

Hi. I could not see any error on those functions.... I will need to check the page and add debug alerts everywhere...

$30 USD dalam 10 hari
(0 Ulasan)
0.0
sadishkannan

i have very simple solution to resolve this issue. You can try on your own. Please do mail me or reply me to resolve this issue.

$30 USD dalam sehari
(0 Ulasan)
0.0