Textbox SQL Driven Default Values cause Browser Errors
Last Post 11-08-2010 10:23 AM by Chad Nash. 3 Replies.
AddThis - Bookmarking and Sharing Button
Author Messages
Mark BuelsingUser is Offline
river guide
river guide
Posts:241
Avatar

--
11-05-2010 08:08 AM
    I have a text box with a default value derived from a SQL statement. The SQL Select statement checks out in the MS SQL Server Management Studio. It returns a single value as it should. The value does show in the form as well. That is all good. But as soon as I configured the textbox to use the SQL statement for the default value, I got a message at the lower-left corner of IE8 saying the page was "done but with errors".

    The SQL looks like this:
    SELECT Value AS DefaultValue FROM dbo.Lists WHERE Listname = 'RL100PriceEach'

    The IE8 errors look like this:

    Message: Expected ')'
    Line: 2084
    Char: 157
    Code: 0
    URI: http://MyDomainName.com/OrderForm.aspx

    The bigger problem this error causes is that my initial javascript statements stop processing. Here is the problem that prompts me to get this resolved. I need the initial javascript to work.

    When I configure the textbox to remove the SQL statement and enter the value myself, the error goes away and the initial javascript starts working again.

    I need default value to be looked up from my price table, so I need this SQL Driven default value to work. The SQL syntax is good. But I have tried using the parentheses like the error message suggests but I have had no success.

    Why does this error message appear? I'd like to clear that up so I have the correct default value and my initial javascript. - Thanks
    ChuckUser is Offline
    river guide
    river guide
    Posts:157
    Avatar

    --
    11-05-2010 10:12 AM
    Posted By Whetstone on 11/05/2010 10:08 AM
    I have a text box with a default value derived from a SQL statement. The SQL Select statement checks out in the MS SQL Server Management Studio. It returns a single value as it should. The value does show in the form as well. That is all good. But as soon as I configured the textbox to use the SQL statement for the default value, I got a message at the lower-left corner of IE8 saying the page was "done but with errors".

    The SQL looks like this:
    SELECT Value AS DefaultValue FROM dbo.Lists WHERE Listname = 'RL100PriceEach'

    The IE8 errors look like this:

    Message: Expected ')'
    Line: 2084
    Char: 157
    Code: 0
    URI: http://MyDomainName.com/OrderForm.aspx

    The bigger problem this error causes is that my initial javascript statements stop processing. Here is the problem that prompts me to get this resolved. I need the initial javascript to work.

    When I configure the textbox to remove the SQL statement and enter the value myself, the error goes away and the initial javascript starts working again.

    I need default value to be looked up from my price table, so I need this SQL Driven default value to work. The SQL syntax is good. But I have tried using the parentheses like the error message suggests but I have had no success.

    Why does this error message appear? I'd like to clear that up so I have the correct default value and my initial javascript. - Thanks

    I had this happen before and it was actually a javascript code somewhere that I added  was the problem, not the SQL driven value.
    Mark BuelsingUser is Offline
    river guide
    river guide
    Posts:241
    Avatar

    --
    11-05-2010 12:31 PM
    I wondered about that too. So I checked for that before posting my question by removing ALL the javascript that I could find before posting my question. There was no javascript in the module settings, initial javascript or any client side events.
    Chad NashUser is Offline
    Posts:5260
    Avatar

    --
    11-08-2010 10:23 AM
    Hi. Well, I don't think its related to the SQL Default at all... This is likely another skin/container/module causing the problem or maybe I have seen some other JavaScript the module uses that could be conflicting if you have some HTML or ' marks in our question labels. Its hard to know but you would need to install FireBug for FireFox and actually click on the error where the JavaScript is happening (or view the source and find that line number).

    I would start with a few other tests:
    1. Do you see the error if you have the exact same form on a page with a default skin/container?
    2. So you see the error if this is the only module on the page?
    3. If you start deleting the questions one at a time does the error eventually go away?

    You are correct though - If you have a JavaScript error on the page it will stop the initial JavaScript from ever getting executed.

    -Chad


    ---
  • film izle
  • 720 izle
  • film
  • sinema izle
  • film makinesi
  • T�rk�e dublaj film
  • film izle
  • film izle
  • baglan film izle
  • sinema izle
  • 1080 film izle
  • film mercegi