Ask a Question related to Macromedia Exchange Dreamweaver Extensions, Design and Development.
-
buddyq #1
Inserting code into <head> of document
Hi all,
It seems that devforums.macromedia.com no longer exists or at least I can't
connect to it. I have built some easy commands that insert code blocks before
and made them into extensions but this time I am going to need to write code
into the head of the document much like doing the "jumpMenu" would. I cannot
find the command that will do this and I have even tried to pick apart the
javascript and find where it does this for the actual "jumpMenu" to see how it
is done but cant.
Can anyone point me to a good resource or tell me the functions that can do
this? Thanks in advance.
Buddy
buddyq Guest
-
Add JavaScript Code to head
We use a customized button for submitting forms or links at work. The code combines DHTML elements for the look and functionality of the button. ... -
add some code to the page <HEAD>
Is it possible that my user control can add code to the HEAD of the parent page that hosts the control? -
Insert Code Into Head
Hi, I just started creating my own extensions. I'm just wondering how I can make an object extension insert code into multiplae areas of the... -
Code into head tag
Here's a way to get a Title into the Head section using code behind: How do I set the title of an aspx page programmatically... -
Injecting code into the <head></head> section
Hi All, I have a web user control that, among other things, provides Print this page, and Email this page functionality I have this script that... -
Phil #2
Re: Inserting code into <head> of document
> Can anyone point me to a good resource or tell me the functions that can do
I'm not aware of such a function, but you can still rewrite the whole content of> this? Thanks in advance.
the head tag using innerHTML
Phil Guest
-
buddyq #3
Re: Inserting code into <head> of document
Okay that sounds like a plan. I didn't think of that. Thanks. The more I get
into this simple thing i'm going to try to make, the more things I realize I
have to know.
I am trying to make an extension for dependant dropdown menus. I have one for
dynamic dependant but this one should be all javascript based for non-dynamic
situations. If anyone wants to help I'd love to do this with someone. I know it
would be very easy for the right person but also very very popular.
Buddy
Buddy
buddyq Guest
-
envision3d #4
Re: Inserting code into <head> of document
I can do this with 2 lines of code if you are still interested.
envision3d Guest
-
kscap #5
Re: Inserting code into <head> of document
[q]Originally posted by: Newsgroup User
I'm not aware of such a function, but you can still rewrite the whole content> Can anyone point me to a good resource or tell me the functions that can do
> this? Thanks in advance.
of
the head tag using innerHTML
[/q]
I would be interested is seeing a simple example on how you would do something
like this? with a document open, re-write the contents of the head tag. Also,
what if a head tag wasn't present in the file?
thanks
kscap
kscap Guest
-
envision3d #6
Re: Inserting code into <head> of document
Well, I don't rewrite the contents of the head tag. I just place my code within it.
envision3d Guest
-
kscap #7
Re: Inserting code into <head> of document
[q]Originally posted by: envision3d
Well, I don't rewrite the contents of the head tag. I just place my code
within it.[/q]
would you be able to provide an example on how you do this?
kscap Guest
-
envision3d #8
Re: Inserting code into <head> of document
This will get the head tag in the current document and add it to the
@@head__tag@@ param
var heads = dw.getDocumentDOM().getElementsByTagName("head");
paramObj.head__tag = heads[0];
You can use this method to find any tag such as the body. This will eliminate
the need for that annoying tag menu in the extension UI.
envision3d Guest
-
-
kscap #10
Re: Inserting code into <head> of document
[q]Originally posted by: envision3d
This will get the head tag in the current document and add it to the
@@head__tag@@ param
var heads = dw.getDocumentDOM().getElementsByTagName("head");
paramObj.head__tag = heads[0];
You can use this method to find any tag such as the body. This will eliminate
the need for that annoying tag menu in the extension UI.[/q]
how would you rewrite this to the document in the proper place?
kscap Guest
-
envision3d #11
Re: Inserting code into <head> of document
What do you mean? This code goes in the javascript function applyServerBahavior().
envision3d Guest
-
kscap #12
Re: Inserting code into <head> of document
[q]Originally posted by: envision3d
What do you mean? This code goes in the javascript function
applyServerBahavior().[/q]
well, what i was looking to do was inside DW when a user executes a custom
command, it would inject some code, say a CSS link or some style info into the
header of the currently open document. Or something to attach a CSS to a
document. The purpose is to have the least amount of user interaction, maybe
just a simple shortcut key and this would execute the code to do what i
mentioned.
kscap Guest
-
envision3d #13
Re: Inserting code into <head> of document
Well then you would place that inside the applyCommand() function. And don't
forget: When you start including links to files like .css you must keep track
of the file relative to the document they are working on. The ol' ../../
stuff. If they are working on a page that is 5 folders down from where the .cc
file is, you would have to have ../../../../../ placed in front of you .css
file. It gets very tricky.
envision3d Guest
-



Reply With Quote

