The problem is not exactly that ...

I am developing a MVC application ... for example, PostController has
views: Create, Destroy and Edit.

All views have a form named Create, Destroy and Edit.

Most forms have common JQuery scripts: ToolTip, FileStyle, etc ...

However, in some cases they differ ... So to differentiate these cases
I include the form id. Does this make any sense?

I am using a single file named Post.js ... Yes, I could and I have
used 1 file per view ...

However, consider I have 20 controllers having an average of 4
views ... that gives me 80 js files ... hard do mantain.

So I am creating a single js file for each controller associated to
all its views ...

Does this make any sense?

Thanks,
Miguel

On Sep 12, 4:42 pm, MorningZ <[EMAIL PROTECTED]> wrote:
> $("#StartDate, #FinishDate", "form#Create").each(function() {
>     $(this).mask("9999-99-99 99:99:99");
>   });
>
> but to note, ID's should be unique in the page, so having
>
> <html>
> <body>
>
> <form id="Form1">
>     <input type="text" id="StartDate" />
>     <input type="text" id="EndDate" />
> </form>
>
> <form id="Create">
>     <input type="text" id="StartDate" />
>     <input type="text" id="EndDate" />
> </form>
>
> </body>
> </html>
>
> doesn't semantically make sense (and isn't 'valid HTML' to boot)
>
> Why not just use a css class to denote which you want to "mask"?

Reply via email to