Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
Javascript General Javascript discussions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 22nd, 2005, 01:35 PM
Registered User
 
Join Date: Jun 2005
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default object expected line 0

Getting an 'object expected line 0' error, not sure why?

the code:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>VIS Web Conferencing Self-Paced Learning</title>

<script language="javascript">

    viewletName = new Array();
    viewletName[0] = "WC_intro";
    viewletName[1] = "WC_0_overview";
    viewletName[2] = "WC_3_roles";
    viewletName[3] = "WC_2_scheduled";
    viewletName[4] = "WC_5_host_presenter";
    viewletName[5] = "WC_4_attendee";
    viewletName[6] = "WC_1_instant";
    viewletName[7] = "WC_6_gotchas";

    function toggleButton(i, updown)
        {
        // updown will be "down" or "up"
        var buttonName = "button" + i;
        var tempImg = new Image();
        tempImg.src = "images/" + updown + "_lesson_" + i + ".png";
        if(document.images)
            document.images[buttonName].src = tempImg.src;
        }

    function gotoViewlet(i)
        {
        try {alert("HERE!")}
        catch {
        sThisViewlet = "flash/" + viewletName[i] + ".swf";

        var b = '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="https://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="880" height="660" ><param name="movie" value="' + sThisViewlet + '" /><param name="quality" value="high" /><param name="bgcolor" value="#B9BB9F " /><embed src="' + sThisViewlet + '" quality="high" bgcolor="#B9BB9F " width="880" height="660" align="middle" allowscriptaccess="sameDomain" type="application/x-shockwave-flash" pluginspage="https://www.macromedia.com/go/getflashplayer" /></object>';
        window.movieframe.document.getElementById("viewlet Object").innerHTML = b;
        }
        }
</script>

<style>
    body {
    background-image: url(images/background.png);
    }
</style>

</head>

<body>
<div style="left:10px; top:0px; position:absolute; z-index:0"><img src="images/ALTESS_training.png"></div>
<div style="left:920px; top:0px; position:absolute; z-index:0"><img src="images/ALTESS_logo.png"></div>
<div style="left:0px; top:36px; position:absolute; z-index:0"><img src="images/viewlet.png"></div>

<iframe
    name="movieframe" scrolling="no"
    id="movieframe" frameborder="0" marginheight="0px" marginwidth="0px"
    style="left:25px; top: 65px; height: 660px; width: 880px; position: absolute; z-index: 1;"
    src="play_viewlet.htm">
</iframe>

<div style="left: 935px; top: 65px; position: absolute; z-index: 2; float:none">

<!---
----- BUTTONS GO HERE -----
--->

            <img name="button0"
                onClick="gotoViewlet(0)"
                onMouseOver="toggleButton(0, 'down')"
                onMouseOut="toggleButton(0, 'up')"
                src="images/up_lesson_0.png">

            <br>
            <img name="button1"
                onClick="gotoViewlet(1)"
                onMouseOver="toggleButton(1, 'down')"
                onMouseOut="toggleButton(1, 'up')"
                src="images/up_lesson_1.png">

            <br>
            <img name="button2"
                onClick="gotoViewlet(2)"
                onMouseOver="toggleButton(2, 'down')"
                onMouseOut="toggleButton(2, 'up')"
                src="images/up_lesson_2.png">

            <br>
            <img name="button3"
                onClick="gotoViewlet(3)"
                onMouseOver="toggleButton(3, 'down')"
                onMouseOut="toggleButton(3, 'up')"
                src="images/up_lesson_3.png">

            <br>
            <img name="button4"
                onClick="gotoViewlet(4)"
                onMouseOver="toggleButton(4, 'down')"
                onMouseOut="toggleButton(4, 'up')"
                src="images/up_lesson_4.png">

            <br>
            <img name="button5"
                onClick="gotoViewlet(5)"
                onMouseOver="toggleButton(5, 'down')"
                onMouseOut="toggleButton(5, 'up')"
                src="images/up_lesson_5.png">

            <br>
            <img name="button6"
                onClick="gotoViewlet(6)"
                onMouseOver="toggleButton(6, 'down')"
                onMouseOut="toggleButton(6, 'up')"
                src="images/up_lesson_6.png">

            <br>
            <img name="button7"
                onClick="gotoViewlet(7)"
                onMouseOver="toggleButton(7, 'down')"
                onMouseOut="toggleButton(7, 'up')"
                src="images/up_lesson_7.png">

            <br>

</div>

</body>
</html>






Similar Threads
Thread Thread Starter Forum Replies Last Post
Expected Expression before')' token page 212 line martyds BOOK Beginning Linux Programming, 3rd Edition 0 November 9th, 2008 04:44 PM
Object expected darkhalf Javascript 1 September 28th, 2006 05:32 PM
object expected crmpicco Javascript 3 April 19th, 2006 09:07 AM
object expected shoakat Classic ASP Databases 3 September 20th, 2004 08:12 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.