Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Setting .innerText works fine locally, but not on hosted site...

Status
Not open for further replies.

BigTeeJay

Technical User
Jun 13, 2001
106
0
0
US
Greetings,
I've got an odd problem, if you look here...

...you will see the test page I put up, when you
click on one of the links, they are supposed to populate
the textarea control in the opened page. But its not
working, the page seems to open fine, but text control
is blank.

But, if you download this zip file...

...and extract the contents (essentially the same
files as are on the website), it works fine. Anyone
have an idea of whats going on?

This was written using IE5.5+ on Win2K pro, and it is
driving me crazy :)

Any help would be greatly appreciated.

Regards,
Tj
 
It seems to be working fine for me though [bigcheeks]. When ever you click on either of three link it seems to post data into textbox area. However i will suggest that you remove the browser cache and try it once again.
My Browser details are
IE 5.50.4807.2300 , SP2
Experience teaches slowly and at the cost of mistakes [pipe]
 
Its working on the copy that is running on the brinkster
site!?

I just tried it and I am getting the following error
msg...

Line: 26
Char: 5
Error: 'objTryIt.edit.usrCode' is null or not an object
Code:0
URL:
...which is the error message I was getting when the code
would try to run before the popup had completed (so I tried
to put some code in that should check to see if the edit
frame was loaded before trying to place text in the text
control).

But again, on a local copy... it works just fine.

Tj
 
Ah, I finally fixed it, doing the following two things...

I changed my caching settings to pull everytime (vs the
default of auto/when needed). I think this solved an
odd caching problem (since it fixed another problem right
away that shouldnt have been happening). Thanks for the
idea Raxg!

I also changed my window hunter/test placing function to
the following...

Code:
function updtTryIt() {
  if (objTryIt.edit) {  // if we can id the parent frame...
    if (objTryIt.edit.usrCode) {
        objTryIt.edit.usrCode.innerText = strMsg;
        return;
    }
  }
  else if (attmpts > 100) { // if we've already tried 100 times, give up
    alert("Unable to locate the text area to place the text");
    return; // unable to load window fully, die quietly
  }

    setTimeout('updtTryIt()',60);
    attmpts++; // inc attempt count
}
[code]

I had tried the "objTryIt.edit.usrCode" test before, but
was getting a permission denied (which seemed odd, since I
could test for "objTryIt.edit").  I figured this was because
I was trying run the sample_tryit.html locally, and call the
other windows from the server (does this sound right?)

But I just added it with it all running on the server, and
it works like a charm.  I also put in a alert to tell when
the function was unable to place the text (I figured I was
giving it plenty of time before, so I assumed it wouldnt
ever really be needed).

I increased the number of times to check , but lowered the
frequency for the time it checks, which essentially solved
the problem.  It appears it really was just taking too long
to load (I dont want to have it loop for ever in case 
someone gets a 404, it would loop forever since the page 
would never actually load).

Tj
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top