This topic is locked

DetailsPreview and Dependent Dropdowns

1/8/2008 3:45:57 AM
PHPRunner General questions
G
giles author

Hi,

I have an interesting problem with one client on a phprunner site. His browser does not display detailpreviews and dependent dropdowns do not work.
Both functions work fine in my browser and in other clients' browsers.
I suspect the two are related.
Browser version are the same, (IE7.0.5730.13), Java is on the same update, IE security settings are identical, pop-ups have been enabled, his browser runs other javascript in the same project.... It all looks the same. Except his won't run detailpreviews and dependent dropdowns. <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=question&id=7222&image=1&table=forumtopics' class='bbc_emoticon' alt=':(' />
Anybody got any suggestions?
Giles
Later addition with some more info...

The dependent dropdown is processed by the following code in ajaxsuggest.js
function loadSelectContent(main_field, dependent_field, record_id)

{

alert("Start")

if(record_id!="")

recordid=""+record_id

$.get(AUTOCOMPLETE_TABLE,

{

field: myEncode( dependentfield ),

value: myEncode( $('#value
'+main_field+recordid).val() ),

type: $('#value
'+dependent_field+recordid)[0].tagName

},

function(txt){

alert("executing function") // This footprint not executed by client's browser but is executed by my mine...

if($('#value
'+dependent_field+recordid)[0].tagName=='SELECT')

{

$('#value
'+dependent_field+record_id).html('<option
value="">'+TEXT_PLEASESELECT+'</option>');

var str = txt.split('\n');

for(i=0,j=0; i < str.length - 1; i=i+2, j++) {

$('#value
'+dependent_field+recordid).get(0).options[j+1]=new Option(unescape(str
[i+1]),unescape(str[i]));

}

$('#value
'+dependent_field+recordid).get(0).selectedIndex = 0;

if ( j == 1 ) { $('#value
'+dependent_field+recordid).get(0).selectedIndex = 1; }

$('#value
'+dependent_field+recordid)[0].onchange();

}

else

{

$('#value
'+dependent_field+record_id).val("");

$('#displayvalue'+dependent_field+recordid).val("");

if(txt.length)

{

var str = txt.split('\n');

if(str.length==3)

{

$('#value
'+dependent_field+record_id).val(unescape(str[0]));

$('#displayvalue'+dependent_field+record_id).val(unescape(str[1]));

}

}

}

});

}
I put some footprints in the javascript and in the client's browser the code executes the first two myEncode's but does not execute a footprint in code block of function(txt).
Hope this helps point out the problem....
Thanks in advance,
Giles

J
Jane 1/9/2008

Giles,
it's difficult to tell you what's happening.

Try to play with ActiveX settings (Security settings in your browser).
Also you can turn off Ajax in the generated include/dbcommon.php file:

$useAJAX = false;

G
giles author 1/11/2008

Hi Jane,

Yes, this is a bit unnusual. Every other PC I've tried does not have this problem.
I have lined up browser security settings exactly the same as the other PCs (ActiveX enabled as required), disabled any caching, etc. Still no joy.
I can't disable Ajax as I have used it extensively in the project.
One thing that is common with the two non-working functions (Dependent Dropdowns and Details Preview) is that both use JQuery. And that's the line in the script above beyond which it does not process.
I've tried using the uncompressed version of jquery.js but that made no difference.
Searched through the jquery faqs but could not find any posts on the matter.
Let me know if any bright ideas occur.
Thanks,
Giles