![]() |
| ||
| IE7 document.getElementById problem Hi, I would like to make a blok of text appear when the user clicks a hyperlink. Therefor I created a test file in html: <html> Which works fine in bouth Firefox and IE7. So I placed the code form the test file above into my php code. This php shows a calendar and highlights special dates. Here are pieces that are the most impotand for this probem: // Add an event // Set day as either plain text or event link This code was also tested before I added the onclick() event that shoud trigger the JS function to show the block of text. Now I have this page that holds the calendar, the special days and the javascript // JavaScript This does as it is supposed to do in firefox BUT in IE7 it does not. when I click a special day in IE7 it does not show any blok of text and gives me the following error: "error: unkown runtime error" that points to the 3e line of this code: <script type="text/javascript"> This is realy wierd to me there is nothing wrong with this: document.getElementById("infoOut").innerHTML = makeEvent(t1); Please can anyone tell me how to solve this? Or tel me where I can find some sort of solution/explenation. AbberLine |
| ||
| Re: IE7 document.getElementById problem i have found that is the field is visible = false javascript can not find it in IE7. if you have it set to that then make it visable and see if that works. |
| ||
| Re: IE7 document.getElementById problem i'm not sure what you mean but i'll try and see what I get. Thank you for helping. |
| ||
| Re: IE7 document.getElementById problem Found a solution, for those who would like to know: The tags in the return value of my second javascript function seemed to be the problem The WRONG code: function writeEvent(txt){After reading what sqlchopper posted I went looking for something about visible/invisible and bumbed into this: the opposite for style.display='none' . The last post there inspired me for this solution: The solution: Do NOT put strings/tags into the return value, use document.getElementById("id").style <script type="text/javascript"> This also has his limitations and problems fitting for bouth IE and FF but its good enough for what I want to do. AbberLine |
| All times are GMT -4. The time now is 6:12 am. |
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC