Jquery in edit_post.php not working.

Everything related to Hesk - helpdesk software

Moderator: mkoch227

Post Reply
Tinydan
Posts: 29
Joined: Wed Nov 06, 2013 2:09 pm

Jquery in edit_post.php not working.

Post by Tinydan »

For some reason jquery doesn't seem to activate on the edit_post.php page. it includes the footer.inc.php file in the same was as the admins new_ticket.php page so I don't believe it has something to do with the way the jquery files are accessed. I've got all the classes correct as well so I'm really not sure what the problem is. its not the biggest problem, it being a page end users will hopefully never see but it'd still be nice to have jquery working there too. Is this a problem anyone else has experienced or is it just me?
Klemen
Site Admin
Posts: 10135
Joined: Fri Feb 11, 2005 4:04 pm

Re: Jquery in edit_post.php not working.

Post by Klemen »

HESK doesn't use Jquery, is this something you added?
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
Tinydan
Posts: 29
Joined: Wed Nov 06, 2013 2:09 pm

Re: Jquery in edit_post.php not working.

Post by Tinydan »

Yeah, quite simple to get it integrated too. Its allowed me to have some pretty fancy controls its just the JavaScript that activate those controls doesn't seem to want to fire on the edit_post page.
Tinydan
Posts: 29
Joined: Wed Nov 06, 2013 2:09 pm

Re: Jquery in edit_post.php not working.

Post by Tinydan »

I had thought perhaps the page includes the footer.txt file differently but its no different to how the other pages that use it include it.
Klemen
Site Admin
Posts: 10135
Joined: Fri Feb 11, 2005 4:04 pm

Re: Jquery in edit_post.php not working.

Post by Klemen »

Correct, the footer.txt is included the same way in all pages.

If you look at the source code the JS is not there on the edit_post.php file?
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
Tinydan
Posts: 29
Joined: Wed Nov 06, 2013 2:09 pm

Re: Jquery in edit_post.php not working.

Post by Tinydan »

That's odd. The page calls footer.inc.php in the same way and that obviously works as the License is included in there. for some reason the script that I have in there aren't being called. I tried placing this code in the edit_post page

Code: Select all

<script type="text/javascript" src="/inc/script/chosen/jquery.min.js"></script>
<script type="text/javascript" src="/inc/script/chosen/chosen.jquery.js"></script>
<script type="text/javascript">$(".chzn-select").chosen({disable_search_threshold: 10, width:"200px", placeholder_text_single:" ", search_contains: true, allow_single_deselect: true });</script>

Now the controls are all working. It just doesn't make sense that they wouldn't work in the one page while working in all the others. This makes me think that edit_post.php is just not getting to the javascript in the footer.inc.php file.
Tinydan
Posts: 29
Joined: Wed Nov 06, 2013 2:09 pm

Re: Jquery in edit_post.php not working.

Post by Tinydan »

Oh i don't know anymore. I've just tried putting the code into footer.txt again and its all working fine now. :oops:

I've been working with Hesk for a couple of weeks and I'm still getting comfortable with the source. When i was first trying to integrate JQuery I found that including the code in the footer.inc file was working so I kept it even after I started using footer.txt for some scripts.

Well its all working now so thanks for being about to throw some ideas at Kelmen you've made a very impressive system here and I'm enjoying using it and modifying it.
Post Reply