JavaScript Error

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • SDyke
    New Member
    • Aug 2006
    • 17

    JavaScript Error

    The following code returns an error at the javascript line:

    Code:
     
    </TABLE>
    <P><B><FONT size="+1" color="red"></FONT></B></P>
    <P></P><FORM target="_blank" action="/DrawingInquiry/ViewDrawing" name="myForm1" method="get"><INPUT type="submit" value="View Drawing"></FORM>
    <FORM action="/DrawingInquiry/ViewDrawing2"><INPUT type="submit" value="View Drawing 2"></FORM>
    <FORM action="/DrawingInquiry/GetMainPageServlet"><INPUT type="submit" name="anotherDrawing" value="Look Up Another Drawing"></FORM>
    <FORM action="/DrawingInquiry/DrawingInquiryBaseServlet" name="testthis"><INPUT
    	type="submit" name="anotherDrawing0" value="Look Up Another Drawing"><INPUT
    	type="text" name="dwgnobase" size="25">
    	<jsp:useBean id="dwgnoget" scope="session" type="com.ibm.drawinginquiry.rational.Drawing"></jsp:useBean><jsp:getProperty
    	name="dwgnoget" property="dwgName" /></FORM>
     
    	<script type="text/javascript"><!--
     
    	document.testthis.dwgnobase.value = document.testthis.dwgnoget.dwgName;
    	//--></script>
     
    </BODY>
    How can I qualify the dynamic value portion?

    Message was edited by:
    SLDyke
  • dmjpro
    Top Contributor
    • Jan 2007
    • 2476

    #2
    i never did jsp:usebean or jsp:property like these things ......

    i don't know if these tags r used then are they added to JS-DOM..??????

    plz varify it......best of luck

    Comment

    • acoder
      Recognized Expert MVP
      • Nov 2006
      • 16032

      #3
      I'm not too familiar with JSP. How does this turn out in HTML?

      Comment

      • ssh
        New Member
        • Mar 2007
        • 6

        #4
        Originally posted by SDyke
        The following code returns an error at the javascript line:

        Code:
         
        </TABLE>
        <P><B><FONT size="+1" color="red"></FONT></B></P>
        <P></P><FORM target="_blank" action="/DrawingInquiry/ViewDrawing" name="myForm1" method="get"><INPUT type="submit" value="View Drawing"></FORM>
        <FORM action="/DrawingInquiry/ViewDrawing2"><INPUT type="submit" value="View Drawing 2"></FORM>
        <FORM action="/DrawingInquiry/GetMainPageServlet"><INPUT type="submit" name="anotherDrawing" value="Look Up Another Drawing"></FORM>
        <FORM action="/DrawingInquiry/DrawingInquiryBaseServlet" name="testthis"><INPUT
        	type="submit" name="anotherDrawing0" value="Look Up Another Drawing"><INPUT
        	type="text" name="dwgnobase" size="25">
        	<jsp:useBean id="dwgnoget" scope="session" type="com.ibm.drawinginquiry.rational.Drawing"></jsp:useBean><jsp:getProperty
        	name="dwgnoget" property="dwgName" /></FORM>
         
        	<script type="text/javascript"><!--
         
        	document.testthis.dwgnobase.value = document.testthis.dwgnoget.dwgName;
        	//--></script>
         
        </BODY>
        How can I qualify the dynamic value portion?

        Message was edited by:
        SLDyke
        hi!

        Just check the code,
        <script type="text/javascript"><!--

        document.testth is.dwgnobase.va lue = document.testth is.dwgnoget.dwg Name;
        //--></script>

        remove it (since it is commented already), or use <script type="text/javascript"></script>


        Regards,
        ssh
        Last edited by ssh; Mar 24 '07, 04:42 PM. Reason: add one more reason

        Comment

        • acoder
          Recognized Expert MVP
          • Nov 2006
          • 16032

          #5
          Originally posted by ssh
          hi!

          Just check the code,
          <script type="text/javascript"><!--

          document.testth is.dwgnobase.va lue = document.testth is.dwgnoget.dwg Name;
          //--></script>

          remove it (since it is commented already), or use <script type="text/javascript"></script>


          Regards,
          ssh
          Doesn't that render it useless? I think that line is needed although the code should be re-written as:
          [HTML]<script type="text/javascript">
          <!--
          document.testth is.dwgnobase.va lue = document.testth is.dwgnoget.dwg Name;
          //-->
          </script>[/HTML] Those comment lines are only there to provide support for older browsers that are no longer (or hardly) used.

          Comment

          Working...