locked
DefaultClientScript property does not exist RRS feed

  • Question

  • The book I'm using says, "view the properties explorer and select DOCUMENT from the combo box. Find the defaultClientScript property and set it to VBScript."

     

    I do not have any such property in the Properties Window (there is no explorer). My computer says I have Visual Studio 2005. The book is labled Visual Basic 2005.

     

    My Help echoes what the book says about my nonexistant defaultClientScript property.

     

    The script defauths to Javascript and I have to change the code.

     

    What is going on?

    Tuesday, July 10, 2007 10:13 PM

Answers

  • Robert3512,

     

    Actually you can take a look at the DefaultClientScript property in MSDN to help you to understand why the book mention this property to the readers. Please pay more attention to the part or say chapter on the issue, too.

     

    DefaultClientScript Property: The defaultClientScript property of an HTML document sets the default scripting language used by client-side <SCRIPT> elements.

     

    You can set the defaultClientScript property either from the Properties window or from the DOCUMENT Property Pages dialog box.

     

    http://msdn2.microsoft.com/en-us/library/7y9x7bh2(vs.71).aspx

     

    Setting the defaultClientScript Property of an HTML Document

     

    http://msdn2.microsoft.com/en-us/library/5y06x9d7(VS.71).aspx 

     

    Hope that can help you.

    Friday, July 13, 2007 6:17 AM

All replies

  • Robert3512,

     

    Actually you can take a look at the DefaultClientScript property in MSDN to help you to understand why the book mention this property to the readers. Please pay more attention to the part or say chapter on the issue, too.

     

    DefaultClientScript Property: The defaultClientScript property of an HTML document sets the default scripting language used by client-side <SCRIPT> elements.

     

    You can set the defaultClientScript property either from the Properties window or from the DOCUMENT Property Pages dialog box.

     

    http://msdn2.microsoft.com/en-us/library/7y9x7bh2(vs.71).aspx

     

    Setting the defaultClientScript Property of an HTML Document

     

    http://msdn2.microsoft.com/en-us/library/5y06x9d7(VS.71).aspx 

     

    Hope that can help you.

    Friday, July 13, 2007 6:17 AM
  • I have the same problem as Robert3512.  Using Visual Web Developer 2008 Express, working through the examples in Wrox publication "Beginning Visual Basic 2005", Ch. 17, p.558.

    The default scripting language is stuck on javascript.  The property"DefaultClientScript" is not listed in the Properties window for DOCUMENT, so I cannot change it.

    Even if I manually set the <SCRIPT> tags to VBScript, as in the MSDN articles referred to, when I double-click on a button in the Design window, I get an inserted Javascript "onclick" function template instead of a VBScript Sub template.  Same happens if I select the button from the combo box in the Design screen then select onClick in the second combo box.  I always get the following inserted:

    <script language="javascript" type="text/javascript">
    // <!CDATA[
    function btnClient_onclick() {
    }
    // ]]>
    </script>

    If I manually insert a VBScript function, when the page is rendered the button does not function.

    regards,
    Frank
    080907 17:00 BST

    Sunday, September 7, 2008 4:01 PM