Skip navigation
Currently Being Moderated

.ASP: Changing Case of Variables in Form Inputs

Jan 26, 2013 4:42 PM

Tags: #code #lowercase #unintended_rewriting #variable_name

Not entirely sure this is an issue in Dreamweaver. It seems the most likely culprit, since it's the only program handling .ASP files I'm working with, beyond the FTP program that uploads them to a Windows Server 2003 server, and that server itself. I have a hard time believing the server would cause such issues, though I recall something once with weird issues when FTP moved files about.


Anyway, I am working in VBscript using a scripting dictionary object (so not strictly a "variable"), and several times now I've gone into a page (and so far, fortunately, only this one page) to find that the object name and its item parameter have become lowercased. I first noticed this because checkbox inputs on my page stopped working, even though new values entered on them were saved - they were just not being properly restored upon reload.

Oddly, this only happens for the object in relation to checkbox elements on the page, of which there are many.


Here's an example of the code:

<input type="checkbox" id="TaskDone" name="TaskDone" value="True" <% if "true" = lcase(objDataDict.Item("TaskDone")) then %>checked="checked"<% end if %> />


The underlined segment is what keeps getting lowercased.


I work on these files at both home and work. At work I have Dreamweaver from CS6 on Windows 7 Pro x64. At home I have Dreamweaver from CS5 on Windows 7 Home x64.

I haven't narrowed down whether it might be one or the other version.

I have the settings to "Never rewrite code" in .asp filetypes set in both instances.

I also have DW set to automatically lowercase tag attributes. I'm wondering whether this might be the source of a conflict. The checkbox elements happen to be the only time the dictionary object is handled somewhere within HTML outside a "value" attribute or a textarea.


Since they're in the ASP mode, one way or another, they should never be rewritten, correct?


I haven't seen any other clues to this behavior yet in searches. Is this at all a known or previously encountered behavior?

Are there other settings in DW for me to check that might cause this?

  • Currently Being Moderated
    Jan 26, 2013 8:34 PM   in reply to MJFarmgirl

    >lcase(objDataDict.Item("TaskDone")) then %>checked="checked"<% end if %> />


    >The underlined segment is what keeps getting lowercased.


    Bizarre - and strange that you happen have an lcase function wrapped around the affected attribute. I'm sure that's a coincidence but what happens if you remove that lcase()? Maybe DW is getting confused and rewriting the code because of that??


    >I also have DW set to automatically lowercase tag attributes.

    >I'm wondering whether this might be the source of a conflict.


    But then you would see other attribute affected too.


    OT: Can I ask why you are using the Dictionary object? Are you dealing with large arrays?

    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points