Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

problem with code

Status
Not open for further replies.

richardharmer

Programmer
Joined
Oct 2, 2002
Messages
9
Location
GB
The following code doesn't work as intended. the first two links open correctly, but the second two don't open and you get a constant error..any clues?

<SCRIPT LANGUAGE=&quot;JavaScript&quot;>

function twin01() {
var newWindow01 = open(&quot;images/Redon03_01.jpg&quot;, &quot;Redon03_01&quot;, &quot;toolbar=no,status=no,location=no,menubar=no,directories=no,width=640,height=480,top=50,left=100&quot;);
}

function twin02() {
var newWindow02 = open(&quot;images/Redon03_02.jpg&quot;, &quot;Redon03_02&quot;, &quot;toolbar=no,status=no,location=no,menubar=no,directories=no,width=640,height=480,top=50,left=100&quot;);

}

</SCRIPT>
<SCRIPT LANGUAGE=&quot;JavaScript&quot;>

function twin03() {
var newWindow03 = open(&quot;images/Redon03_03.jpg&quot;, &quot;Redon03_03&quot;, &quot;toolbar=no,status=no,location=no,menubar=no,directories=no,width=640,height=480&quot;,top=50,left=100&quot;);

}
function twin04() {
var newWindow04 = open(&quot;images/Redon03_04.jpg&quot;, &quot;Redon03_04&quot;, &quot;toolbar=no,status=no,location=no,menubar=no,directories=no,width=640,height=480&quot;,top=50,left=100&quot;);
}

</SCRIPT>

<FORM>
<INPUT TYPE=&quot;Image&quot; SRC=&quot;images/Redon04_01.jpg&quot; onClick=&quot;twin01()&quot; ALT=&quot;Redon Image 1&quot;>
<INPUT TYPE=&quot;Image&quot; SRC=&quot;images/Redon04_02.jpg&quot; onClick=&quot;twin02()&quot; ALT=&quot;Redon Image 2&quot;>
<INPUT TYPE=&quot;Image&quot; SRC=&quot;images/Redon04_03.jpg&quot; onClick=&quot;twin03()&quot; ALT=&quot;Redon Image 3&quot;>
<INPUT TYPE=&quot;Image&quot; SRC=&quot;images/Redon04_04.jpg&quot; onClick=&quot;twin04()&quot; ALT=&quot;Redon Image 4&quot;>
</FORM>
 
Extra quotes after height=480&quot; in these two...

function twin03() {
var newWindow03 = open(&quot;images/Redon03_03.jpg&quot;, &quot;Redon03_03&quot;, &quot;toolbar=no,status=no,location=no,menubar=no,directories=no,width=640,height=480&quot;,top=50,left=100&quot;);

}
function twin04() {
var newWindow04 = open(&quot;images/Redon03_04.jpg&quot;, &quot;Redon03_04&quot;, &quot;toolbar=no,status=no,location=no,menubar=no,directories=no,width=640,height=480&quot;,top=50,left=100&quot;);

Programming today is a race between software engineers striving to build better and bigger idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. - Rick Cook (No, I'm not Rick)

fart.gif
 
Also, I'd pull out the </SCRIPT>
<SCRIPT LANGUAGE=&quot;JavaScript&quot;>[\b] between twin02() and twin03()

There's always a better way. The fun is trying to find it!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top