Jump to content

Script doesn't work in IE


snipesh0tz

Recommended Posts

Hello,

 

I have this little script on my website. What it does is when a user clicks on the Name it will show information, if they click again it will hide again. But now after a couple weeks a friend of mine told me it didn't work in IE8 and I only use Chrome and Firefox so I didn't know

 

This is what on the page:

 

<h2 style="cursor: pointer;" onclick="changeInfo_0()">Click here</h2>

<p id="information0"></p>

 

And this is the javascript

link_0 = 0;
function changeInfo_0()
{
if(link_0 == 0)
{
document.getElementById('information0').innerHTML = 'If you click this will come';
link_0 = 1;
}else if(link_0 == 1){
document.getElementById('information0').innerHTML = '';
link_0 = 0;}
};

 

Can anyone tell me how to get this working on IE?

 

Link to comment
https://forums.phpfreaks.com/topic/202128-script-doesnt-work-in-ie/
Share on other sites

I use it on wordpress pages. I put the following in my page

 

<h2 style="cursor: pointer;" onclick="changeInfo_0()">Click here</h2>

<p id="information0"></p>

 

And the other script in my header.php

 

So afaik it doesn't deal with tables

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.