You're kidding, right?
ASP.Net is a technology for programming web applications. A web application
is a rather complex animal that creates an interactive web site using
server-side object-oriented programming with the .Net framework, which
renders client-side HTML, CSS, JavaScript, Cookies, Images, and the whole
gamut of those client-side web technologies that make up what is commonly
known as a web page. So, in order to write an application that renders HTML,
CSS, JavaScript, Cookies, Images, and the whole gamut of those client-side
web technologies, it would be logical to assume that one would have at least
a smattering of knowledge about those technologies. It sounds to me like
you're trying to perform calculus without having studied multiplication
first. It might be a good idea to back up a little. Eating an entire
elephant at one sitting is difficult, to say the least.
In answer to your question, which concerns adding a div that has a CSS style
which calls a JavaScript behavior to a page, I might first point out that
the div in question has an external dependency on a JavaScript behavior. Do
you know anything about where that behavior might be found? Well, we can
deal with that tusk later.
You say you "need to use frames." Well, you really *are* a masochist, aren't
you? I hope you realize how frames and framesets in an ASP.Net application
add to the complexity and difficulty of writing one. But I'm not really
concerned about that. It is just another nail in the proverbial coffin in
this case. So, you want to use a frameset. Now, a frameset is an HTML
construct. It is an HTML document which, when loaded into a browser
instance, enables that browser instance to load multiple *other* HTML
documents into multiple windows (frames) defined in the frameset document.
This means that all a frameset renders is a bunch of frames. That's it. End
of story. Now, a div is an interface element which renders a box. As a div
is not a frame, it isn't going to appear anywhere in the frameset. No amount
of coaxing will change this. And as the <head> of an HTML document has
absolutely no interface in the document, well, fill in the rest. However, as
a frameset *contains* other HTML documents, one in each frame, the div can
be placed into one of these other documents.
Now, as to "so the browser will execute it," well, a browser doesn't execute
a div. It *can* execute a JavaScript behavior. That is, if you set up the
behavior correctly.
Still, if I were you, I would stop right now, before you go any further. You
are attempting to build a skyscraper, and you don't know what a brick is. I
think maybe a few bird-houses would be a better place to start. Work your
way up from there. It will be much less frustrating.
"Jarod" <bl*****@NOSPAM.gazeta.pl> wrote in message
news:uP**************@TK2MSFTNGP14.phx.gbl...
Hey
I need to put div like this :
<div id="ws" style="behavior:url(webservice.htc)"/>
but I can't put in body because I need to use frames. And even if I create
a body tag this div doesn't execute. It can execute even in some .js files
if you now the way ? But the main question is where to put it so browser
will execute it ? Because if I have it in my header it doesn't work ;(
Jarod