title: change image use javascript DOM
body: <pre><code>&lt;html&gt;
  &lt;head&gt;
  &lt;script type="text/javascript"&gt;
  var curimage = "cottage_small.jpg";   
  var curtext = "View large image"; 
  function changeSrc() { 
      if (curtext == "View large image"||curimage == "cottage_small.jpg") { 
          document.getElementById("boldStuff").innerHTML = "View small image"; 
          curtext="View small image"; 
          document.getElementById("myImage")= "cottage_large.jpg"; 
          curimage = "cottage_large.jpg";
      } else { 
          document.getElementById("boldStuff").innerHTML = "View large image"; 
          curtext = "View large image"; 
          document.getElementById("myImage")= "cottage_small.jpg"; 
          curimage = "cottage_small.jpg"; 
      } 
  } 
  &lt;/script&gt; 
  &lt;/head&gt;
  &lt;body&gt; 
      &lt;!-- Your page here --&gt; 
      &lt;h1&gt; Pink Knoll Properties&lt;/h1&gt;
      &lt;h2&gt; Single Family Homes&lt;/h2&gt; 
      &lt;p&gt;
          Cottage:&lt;strong&gt;$149,000&lt;/strong&gt;&lt;br/&gt;
          2 bed, 1 bath, 1,189 square feet, 1.11 acres &lt;br/&gt;&lt;br/&gt; 
          &lt;a href="#" onclick="changeSrc()"&gt;&lt;b id="boldStuff" /&gt;View large image&lt;/a&gt;
      &lt;/p&gt;  
      &lt;p&gt;&lt;img id="myImage" src="cottage_small.jpg" alt="Photo of a cottage"  /&gt;&lt;/p&gt; 
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>This is my coding I need to change the image and text the same time when I click it.</p>
  
  <p>I use LTS, it shows the line <code>document.getElementById("myImage")= "cottage_large.jpg";</code></p>
  
  <p>is a wrong number of arquments or invalid property assigment.</p>
  
  <p>Dose someone can help?</p>
  
  <p>Bianca </p>