Problem with javascript on some pages

Helpdesk for my helpdesk software

Moderator: mkoch227

m4dbra1n
Posts: 60
Joined: Sun Oct 04, 2009 10:33 am

Problem with javascript on some pages

Post by m4dbra1n »

Script URL:
Version of script:
Hosting company:
URL of phpinfo.php:
URL of session_test.php:
What terms did you try when SEARCHING for a solution:

Write your message below:

Hi everybody, I've recently upgraded my 2.1 installation to 2.2, and all went good. I'm even making all the mods again from the start, without problems.

But I'ma having a strange issues with the custom fiels OPTIONS link on the Settings page: if I click on it, nothing happen. In fact I had to modify the custom fields I'm using directly from the php file...

Why is this happening? I have the latest JRE and this happens even with Explorer 7/8 and Firefox 3.6.4/.3. Currently I'm using Chrome Dev 6.0.473.3

With the old 2.1 version, this never happened, even with the old JRE and browsers versions.

HELP!

Thanks in advance :wink:
Klemen
Site Admin
Posts: 10145
Joined: Fri Feb 11, 2005 4:04 pm

Post by Klemen »

It's a Javascript problem (not Java). The Javascript for options hasn't changed since 2.0 so that shouldn't be a problem. Try clearing your browser cache and re-uploading the hesk_javascript.js file.

If it still doesn't work do this:
1. open hesk MAIN admin page in Firefox
2. in FireFox go to "Tools" > "Error console"
3. click "Clear"
4. in HESK go to settings page and click the Options button
5. in FireFox again go to the Error console and see what messages you get.
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
m4dbra1n
Posts: 60
Joined: Sun Oct 04, 2009 10:33 am

Post by m4dbra1n »

That's what give the Error Console:

hesk_customOptions is not defined
http://localhost/hesk/admin/admin_settings.php

But I don't understand what it means, sorry :oops:
Klemen
Site Admin
Posts: 10145
Joined: Fri Feb 11, 2005 4:04 pm

Post by Klemen »

Did you try clearing your browser cache and re-uploading the hesk_javascript.js file?

Does it work for you in the hesk demo?
http://www.hesk.com/demo/admin/admin_settings.php
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
m4dbra1n
Posts: 60
Joined: Sun Oct 04, 2009 10:33 am

Post by m4dbra1n »

Yes, I've used CCleaner to delete all the temporary internet files, cookies, saved forms data, from all the browsers.

From your demo it goes straight, without a problem; on mine not, but ? haven't changed a thing of the code, just adjusted some graphics and reordered some text, that's all.

And those mods are taken from the old files of my 2.1 installation, which worked fine...

:?:
Klemen
Site Admin
Posts: 10145
Joined: Fri Feb 11, 2005 4:04 pm

Post by Klemen »

Any chance you can give me access to your admin panel?
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
m4dbra1n
Posts: 60
Joined: Sun Oct 04, 2009 10:33 am

Post by m4dbra1n »

Sorry Klemen, I'm using it in local with XAMPP :(

This evening I will install it on my site and gave you username and password to let you check it.

Thanks :D
Klemen
Site Admin
Posts: 10145
Joined: Fri Feb 11, 2005 4:04 pm

Post by Klemen »

In that case tell me if that error is the only one you see in the Error console? Are there any other error messages (even if they seem unrelated to hesk)? Can you post a screenshot of the Error console?
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
m4dbra1n
Posts: 60
Joined: Sun Oct 04, 2009 10:33 am

Post by m4dbra1n »

Another error in the settings page: if I click on the TEST LANGUAGE FOLDER link, nothing happen, just like if I click on the OPTION button of the custom fields.

The Error Console of Firefox spit this out:

Error: hesk_testLanguage is not defined
Source file: http://localhost/hesk/admin/admin_settings.php
Row: 1

Another one not defined: but why?

That's different:

Error: missing ) after argument list
Source file: http://localhost/hesk/admin/admin_settings.php
Row: 84, Column: 48
Code:
if (d.s_site_url.value=='') {alert('Inserisci l'URL. Assicurati che sia valido (inizia con http:// o https://)'); return false;}

:?:
Klemen
Site Admin
Posts: 10145
Joined: Fri Feb 11, 2005 4:04 pm

Post by Klemen »

OK, so now I know why it doesn't work 8)

There is an error in the hesk_javascript file that you translated - the single quote in

Code: Select all

'Inserisci l'URL. 
is breaking Javascript code so none of the Javascript works. Change

Code: Select all

l'URL
to

Code: Select all

l\'URL
then clear cache, reload page and it should start working.
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
m4dbra1n
Posts: 60
Joined: Sun Oct 04, 2009 10:33 am

Post by m4dbra1n »

Klemen wrote:OK, so now I know why it doesn't work 8)

There is an error in the hesk_javascript file that you translated - the single quote in

Code: Select all

'Inserisci l'URL. 
is breaking Javascript code so none of the Javascript works. Change

Code: Select all

l'URL
to

Code: Select all

l\'URL
then clear cache, reload page and it should start working.
Sorry Klemen, I have to correct you, as it's not my fault in translating from english; that's the line you are saying to correct as it's translated by me:

Code: Select all

$hesklang['err_surl']='Inserisci l\'URL. Assicurati che sia valido (inizia con http:// o https://)';
Is it right?

And just to let you know, even deleting my modded admin_settings page and using the original version, gives me the same javascript problems...
m4dbra1n
Posts: 60
Joined: Sun Oct 04, 2009 10:33 am

Post by m4dbra1n »

That's the Error Console from the Dev Tools of Chrome:

Image

And this are the 2 files that I'm currently using, maybe you can give a look to them:

http://just2learn.altervista.org/_alter ... ttings.php
http://just2learn.altervista.org/_alter ... t/text.php

I'm not finding any solution by myself and I don't understand if and where I made some mistakes...
Klemen
Site Admin
Posts: 10145
Joined: Fri Feb 11, 2005 4:04 pm

Post by Klemen »

It's the ' problem for sure. But it's not the problem in the text.php file, it's the problem in the Javascript.

In admin_settings.php try changing

Code: Select all

$hesklang['err_hurl'];
to

Code: Select all

addslashes($hesklang['err_hurl']);
to fix it on-the-fly.
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
m4dbra1n
Posts: 60
Joined: Sun Oct 04, 2009 10:33 am

Post by m4dbra1n »

Even with your suggested mod, the problem remains, even if I delete all the temp fiels, cookies, etc from both Firefox and Chrome...

Between this evening and tomorrow I will try to made a fresh install with my modded pages and see on my site if that happens anyway...
Klemen
Site Admin
Posts: 10145
Joined: Fri Feb 11, 2005 4:04 pm

Post by Klemen »

Then I will really need access to your (working) help desk to be able to help.
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
Post Reply