p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   BOOK: ASP.NET MVC Website Programming Problem Design Solution ISBN: 9780470410950 (http://p2p.wrox.com/forumdisplay.php?f=472)
-   -   missing Class on p tag (http://p2p.wrox.com/showthread.php?t=77963)

tedr January 27th, 2010 12:01 PM

missing Class on p tag
 
A lot of reference to < class="field Input"> but in the code I'm using I get a warning and don't see this class in any of the .css files[:confused:]

midavis January 27th, 2010 02:03 PM

missing class on p tag
 
Take a look at the global.js file. There is a line of code that will hide all messages when there is not focus. I am not sure why the input class is there, but this is where the field class is being used.

// set gloal blur for all fields to hide message when not in focus anymore
$("form .field :input").blur(function () { HideMessage(this); });

tedr January 27th, 2010 02:58 PM

.js
 
So because it in the global.js file it's OK to have the warning on the page.[:(]

nberardi January 27th, 2010 03:07 PM

Quote:

Originally Posted by tedr (Post 252764)
A lot of reference to < class="field Input"> but in the code I'm using I get a warning and don't see this class in any of the .css files[:confused:]

It is used as a marker to help jQuery as previously mentioned by midavis.

Quote:

Originally Posted by tedr (Post 252774)
So because it in the global.js file it's OK to have the warning on the page.[:(]

To be honest this seems like a very petty and nit-picky point about the application. And you are suggesting that we incur extra and less efficient jQuery selections just so Visual Studio doesn't show a warning that it is plain wrong about?

Visual Studio doesn't understand how Web 2.0 and meta tagging works in relation to client side processing. If it really bothers you, there is always the option of disabling it under the settings. [;)]

midavis January 27th, 2010 03:30 PM

missing class in p tag
 
You could also add an empty style for each of those classes in the stylesheet :).

tedr January 27th, 2010 03:34 PM

<p tag
 
I not trying to nit pick here, trying to understand, the use of jqurrey is new for me so not sure of what's going on,

tedr January 27th, 2010 03:36 PM

<P
 
Can you give an example I tried this but still get the warning

.field input{

}

nberardi January 27th, 2010 03:36 PM

Quote:

Originally Posted by tedr (Post 252774)
So because it in the global.js file it's OK to have the warning on the page.[:(]

Well this statement doesn't give the impression that you are trying to understand anything.

midavis January 27th, 2010 04:01 PM

missing Class on p tag
 
you could try

.field, .input {}

If you are new to jQuery I would highly recommend getting familiar with it. There are a lot of cool things you can do with it and it makes a lot of javascript tasks much easier.

tedr January 27th, 2010 04:09 PM

I tried that, I agree with what I've seen so far, and this book is showing so many cool things, that I have a lot of things that an be done, it's these little things than put me in a spin, because it test things that don't make since to me, makes me ask Why????

The problem with css is that it can't see field input, but if replaced with field-input then makes since, the field and input I don't think are meant to be separete.[:confused:]


All times are GMT -4. The time now is 01:53 PM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.