4.5.4 Jquery oddity

Post any questions you have about using the Verj.io Studio, including client and server-side programming with Javascript or FPL, and integration with databases, web services etc.

Moderators: Dave, Jon, Steve, Ian

eddparsons
Ebase User
Posts: 47
Joined: Wed Jan 02, 2013 4:23 pm
Location: Lyndhurst, Hampshire
Contact:

4.5.4 Jquery oddity

#1

Postby eddparsons » Fri Sep 27, 2019 11:40 am

I'm trying to find a problem with an Ebase form which was developed by a colleague who has now left. The form makes extensive use of Jquery rather than Ebase scripts which is making it difficult for me to debug as I'm not very familiar with this. The issue is an update dialog box which should list fields but is appearing blank when run outside the designer.

The thing I don't understand is that the dialog displays correctly when run from the Designer (or externally using the Ebase port), but not when running using IIS redirection (on the same server). This is on a newly setup server - on the old server it runs fine in both cases. The form and all elements are the same. It refers to Jquery and JqueryUI client scripts which I have ensured are identical on both servers. Any ideas what else I could check?

Both servers running Ebase 4.5.4

Code for the update dialog below.

//Update Dialog
var status = $("#statselect").val();


setTimeout(function(){
$("#selup").dialog({height: "auto", width: "auto", create: function(e, ui) {
$(this).parent().find('.ui-dialog-title').addClass('updat');
$(this).parent().find('.ui-dialog-title').text($("#Road").val()+', '+$("#Pcode").val());

if (status == "Pending"){
$(this).parent().find('.ui-dialog-title').css("color","rgb(250,0,0)");
}
else {
$(this).parent().find('.ui-dialog-title').css("color","rgb(255,140,0)");
};
},
buttons: {
'Submit': okHandler,
'Cancel': closeHandler,},
show: {
effect: 'fadeIn',
duration: 600 },
hide: {
effect: 'hide',
duration: 100},
modal : true,});
var name = $("#Cref").val();
$("ui-dialog-title").text(name);
$("#selup").dialog('open');
}, 300);

//$("#title").focus();

function okHandler(){
$("#Stat_").val($("#Stat").val());
$("#Desc_").val($("#Desc").val());
$("#statust").val($("#Stat").val());
$("#updatebtn").click();
$("#statust").change();
$("#selup").dialog('close');

};
function closeHandler(){
$("#selup").dialog('close');
};
0 x

Steve
Moderator
Moderator
Posts: 341
Joined: Fri Sep 07, 2007 3:44 pm
Location: Sandy, UK
Contact:

Re: 4.5.4 Jquery oddity

#2

Postby Steve » Fri Sep 27, 2019 2:20 pm

Hi Edd,

As this is client side code you need to enable the developer tools in the web browser.

If you run the form in a browser and press F12... this will open the developer tools.

If you look at the network tab you should be able to see (You'll probably need to reload the page with Control-F5) and see if all the files are laded correctly. My guess is that the JQuery is not being loaded through IIS... you might see an error status of 404. You should see if the JQuery Javascript file is loaded correctly.

Another thing to check is the error console in the developer tools. This should show you any errors.

Kind regards

Steve Upton
0 x

eddparsons
Ebase User
Posts: 47
Joined: Wed Jan 02, 2013 4:23 pm
Location: Lyndhurst, Hampshire
Contact:

Re: 4.5.4 Jquery oddity

#3

Postby eddparsons » Mon Sep 30, 2019 12:54 pm

Thanks Steve.

No 404's in developer tools. I can see at 200 OK result for JQueryEventRegistration. No error in the console when loading the dialog box. I do get an error when closing the box (SCRIPT5022: cannot call methods on dialog prior to initialization; attempted to call method 'close') but I'm not sure has never worked.

It's not functionally a very complicated form, I'm thinking it might be easier to just rebuild it from scratch at this point.

Regards,
Edd
0 x

Steve
Moderator
Moderator
Posts: 341
Joined: Fri Sep 07, 2007 3:44 pm
Location: Sandy, UK
Contact:

Re: 4.5.4 Jquery oddity

#4

Postby Steve » Tue Oct 01, 2019 4:20 pm

If you would like to export the form and all its associations I can have a look for you.

Email to support@ebasetech.com

Kind regards

Steve Upton
0 x


Who is online

Users browsing this forum: No registered users and 4 guests