IPB

Welcome Guest ( Log In | Register )


> Javascript help, i'm an idiot somewhere
woody
post Jul 27 2006, 11:39 PM
Post #1





Group: Moderators
Posts: 2,499
Joined: 23-February 06
From: El Paso Texas
Member No.: 32



i got this toggle JS code that works in IE but not Firefox

java script:
QUOTE
<script language="javascript">
<!--
function toggle(targetId)
{
    target = document.all(targetId);
    if (target.style.display == "none")
      {
        target.style.display="";
      }
    else
      {
        target.style.display="none";
      }
}
//-->
</script>


And when i call it:
QUOTE
<a href="java script:toggle('Name')">Click Here Thingie</a> <br />
  <div id="Name" style="display:none">
    <div alighn="justify">
        <font color="#000000" size="1"><? include('name.php');?></font>
    </div>
  </div>


any ideas?


--------------------
Go to the top of the page
 
+Quote Post
 
Start new topic
Replies
woody
post Jul 30 2006, 04:13 PM
Post #2





Group: Moderators
Posts: 2,499
Joined: 23-February 06
From: El Paso Texas
Member No.: 32



QUOTE (Hartmann @ Jul 28 2006, 11:38 AM)
This works fine for me in Firefox. Do you have the Javascript in the head section of your HTML? What is in your name.php file?

javascript is int he head

the php file is just a paragraph of text


--------------------
Go to the top of the page
 
+Quote Post

Posts in this topic


Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



Lo-Fi Version Time is now: 11th June 2026 - 01:11 AM
Skin made by: skeedio.com