Object tag is not supported Problem in asp RRS feed

  • Question

  • User-33144848 posted

    I insert an activex control (Circle gauge) in my asp page.. but <Object ....> always has a red underline and
    keep saying <Object > can not be nested within <p> , I delete <p> then keep saying < can't be nested within <body>..

    Does anyone have any idea why? I would appreciate for any tip or idea.

    Tuesday, November 15, 2005 2:17 PM

All replies

  • User-823196590 posted
    Not really an ASP isse, that's client-side code.  What editor are you using?
    Tuesday, November 15, 2005 4:41 PM
  • User-33144848 posted

    I use Microsoft Visual Basic.NET.  Do you think this is the problem?  How do I fix it?

    Thanks for helping,

    Tuesday, November 15, 2005 6:32 PM
  • User-823196590 posted
    Please show all of your code for the page.
    Wednesday, November 16, 2005 9:44 AM
  • User-33144848 posted
    Here is my code: ( I don't know why codes seem to not shown in here after I posted it..let me know if you can't view it..and let me know what the best way to post my codes)

    <%@ Language=VBScript%>' <script language=VBscript id=clientEventHandlersJS runat="server"> <!-- private sub CircleGauge1_Click() 'msgbox("Click") call CircleGauge1.SetScaleRangeColor(0, 0, 30, &H0000FFFF&) call CircleGauge1.SetScaleRangeColor(1, 30, 50, &HFF00FF&) end sub //--> </script> <script language=VBscript event=Click for=CircleGauge1 runat="server"> <!-- CircleGauge1_Click() //--> </script>  

      ' <OBJECT id=Circlegauge1 height=250 width=300 classid=clsid:39B42F8E-60A4-11D4-9D37-C844D961244F VIEWASTEXT><PARAM NAME="_cx" VALUE="7938"><PARAM NAME="_cy" VALUE="6615"><PARAM NAME="BkColor" VALUE="16744576"><PARAM NAME="ForeColor" VALUE="49152"><PARAM NAME="InverseDirection" VALUE="0"><PARAM NAME="MaxVal" VALUE="100"><PARAM NAME="MinVal" VALUE="0"><PARAM NAME="TickerNum" VALUE="6"><PARAM NAME="SubTickerNum" VALUE="10"><PARAM NAME="TextColor" VALUE="255"><PARAM NAME="CntlBkColor" VALUE="16777215"><PARAM NAME="ScaleSideChanged" VALUE="0"><PARAM NAME="PointerColor" VALUE="16711935"><PARAM NAME="GaugeName" VALUE="GaugeName"><PARAM NAME="UnitName" VALUE="Unit"><PARAM NAME="BorderType" VALUE="0"><PARAM NAME="DecimalNum" VALUE="1"><PARAM NAME="CircleColor" VALUE="0"><PARAM NAME="NeedlePieAngle" VALUE="10"><PARAM NAME="NeedleType" VALUE="7"><PARAM NAME="OuterTextHeight" VALUE="20"><PARAM NAME="OuterTextLength" VALUE="20"><PARAM NAME="ScaleRingBorderType" VALUE="3"><PARAM NAME="ScaleTextPosStyle" VALUE="1"><PARAM NAME="TickerAlignment" VALUE="0"><PARAM NAME="TickerColor" VALUE="0"><PARAM NAME="Enabled" VALUE="-1"><PARAM NAME="Font" VALUE="Times New Roman"><PARAM NAME="Value" VALUE="50"><PARAM NAME="ValueTxtLen" VALUE="40"><PARAM NAME="PanelGradient" VALUE="-1"><PARAM NAME="mKey" VALUE="66370324"><PARAM NAME="mComputer" VALUE="66370324"></OBJECT>

    Wednesday, November 16, 2005 11:15 AM
  • User-823196590 posted
    Can't see it.  You should be able to paste plain text.
    Wednesday, November 16, 2005 2:41 PM
  • User-33144848 posted

    Can't see it.  You should be able to paste plain text.

    <% @Language=vbscript %>
      <SCRIPT ID="clientEventHandlersJS" LANGUAGE="VBscript"  runat="server">

    private sub CircleGauge1_Click()

     call CircleGauge1.SetScaleRangeColor(0, 0, 30, &H0000FFFF&)
     call CircleGauge1.SetScaleRangeColor(1, 30, 50, &HFF00FF&)
    end sub

      <SCRIPT LANGUAGE="VBscript" FOR="CircleGauge1" EVENT="Click" runat="server" >
     <BODY >
      <p >&nbsp;
       <OBJECT id="Circlegauge1" width=300 height=250 classid="clsid:39B42F8E-60A4-11D4-9D37-C844D961244F" VIEWASTEXT>
        <PARAM NAME="_cx" VALUE="7408">
        <PARAM NAME="_cy" VALUE="5503">
        <PARAM NAME="BkColor" VALUE="16744576">
        <PARAM NAME="ForeColor" VALUE="49152">
        <PARAM NAME="InverseDirection" VALUE="0">
        <PARAM NAME="MaxVal" VALUE="100">
        <PARAM NAME="MinVal" VALUE="0">
        <PARAM NAME="TickerNum" VALUE="6">
        <PARAM NAME="SubTickerNum" VALUE="10">
        <PARAM NAME="TextColor" VALUE="255">
        <PARAM NAME="CntlBkColor" VALUE="16777215">
        <PARAM NAME="ScaleSideChanged" VALUE="0">
        <PARAM NAME="PointerColor" VALUE="16711935">
        <PARAM NAME="GaugeName" VALUE="GaugeName">
        <PARAM NAME="UnitName" VALUE="Unit">
        <PARAM NAME="BorderType" VALUE="0">
        <PARAM NAME="DecimalNum" VALUE="1">
        <PARAM NAME="CircleColor" VALUE="0">
        <PARAM NAME="NeedlePieAngle" VALUE="10">
        <PARAM NAME="NeedleType" VALUE="7">
        <PARAM NAME="OuterTextHeight" VALUE="20">
        <PARAM NAME="OuterTextLength" VALUE="20">
        <PARAM NAME="ScaleRingBorderType" VALUE="3">
        <PARAM NAME="ScaleTextPosStyle" VALUE="1">
        <PARAM NAME="TickerAlignment" VALUE="0">
        <PARAM NAME="TickerColor" VALUE="0">
        <PARAM NAME="Enabled" VALUE="-1">
        <PARAM NAME="Font" VALUE="Times New Roman">
        <PARAM NAME="Value" VALUE="50">
        <PARAM NAME="ValueTxtLen" VALUE="40">
        <PARAM NAME="PanelGradient" VALUE="-1">
        <PARAM NAME="mKey" VALUE="3024">
        <PARAM NAME="mComputer" VALUE="758">

    Wednesday, November 16, 2005 4:45 PM
  • User-823196590 posted
    OK - it has to do with the schema used by Visual Studio to validate the HTML - I'm having trouble finding more info on how to control that.  You can basically ignore the message.
    Thursday, November 17, 2005 8:37 AM
  • User-33144848 posted

    But Do you know why <script> does not support FOR and EVENT attributes in my program also?

    <script language= "vbscript" FOR="CircleGauge1" EVENT="click">

    The program is supposed to change color when I click on the gauge, but it does not.

    Thanks for your time and help.


    Thursday, November 17, 2005 11:31 AM
  • User-33144848 posted
    I got it work now by taking off the 'runat="server" . Thanks a lot!
    Thursday, November 17, 2005 11:55 AM