![]() |
Fields not updating correctly.
Sorry my first post is a question, but I am in quite a pickle and could use a fast response, normally I like to help people out on a new forum before asking my own stuff!
I have been handed a project to work on that was only half completed by my predecessor - I say half completed because they only tested their solution in Safari. I am sure you can take a fairly good guess at what my problem relates to; the code works fine in Firefox, Safari and Opera, but does not work in Internet Explorer. I haven't looked at JavaScript in years properly and have never attempted anything ajax like before, so this is pitched way above my head - hopefully with some guidance here I will be able to work through it! My problem seems to be that once one form auto completes, the code doesn't want to let other forms do the same. Each form will separately work and do what it needs to do, but as soon as one field is filled in automatically, no others will work. Because the problem is so wide spread and encompasses a lot of code, I thought it best to ask if there are any common problems I should be checking into as opposed to posting huge chunks of code for just one example. |
Quick update - I downloaded Fiddler and used to to make sure the requests were getting through ok, and they are.
The information that gets sent, and that gets recieved the first time you do it compared to the time you do it after something has already been updated is the exact same. But the first time the new information will get displayed, and the second time it will not. |
Welcome to CF!
sounds frustrating. Without see a line of code, all we can do is guess. here are some pitch-black stabs: 1. you are adding an element the first time using .innerHTML that duplicates an element id. 2. the ajax call is caching, and uses the old data to redraw; thus nothing appears to change. 3. there is an issue with the form elements name causing ambiguity in the auto-complete code. if you could post the part of your code that applies the auto complete from the ajax response, i can likely be a lot more helpful. or you can just wait until IE8 comes out next year, and hope your problem is one of the 8000 things they have fixed so far... |
Hey rnd me,
Cheers for the welcome, and the help - unfortunately this project needs to be completed way before MS pull their finger out! I have found two references to .innerHTML in my code Code:
function applyPerson ( ){ // [l] fill fields with result |
EDIT:
I have since changed the code to... Code:
... |
Here is my code, sorry there is so much of it, but I don't want to guess at what is 100% working correctly and then miss something out.
Basically this code when initiated should open up a window containing users, once a user is clicked, their details should be automatically fed into the previous form. The link that starts it all off.. Code:
<a href="javascript:newChangePerson(1)" id="findperson" >Code:
function newChangePerson (mode, witness){ Code:
TS.person = function( ind, accid, mode, dstField ){Once you select the user you want, these are the next two methods that get used. Code:
function Person_callback ( ){ // [l] responder to above |
I think I can condense this some...
I have been firing in alerts by way of a test to see where IE is falling short, and it never actually gets into the method to update the fields. The call to the function (Person_callback()) is made from the following bit of code. Code:
function goFindPerson (obj){ // [l] AJAJ person lookup |
It seems like you've run in to the "IE caching" problem.
When using the GET method only, IE will use the cached document, unless something is different in the query string. Several approaches fix the problem. But see, this for what is probably the best solution, setting headers: http://codingforums.com/showthread.p...ighlight=works |
You are a complete legend, thank you!
|
| All times are GMT +1. The time now is 01:19 PM. |
Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.