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
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

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.