vbnetcoder
asked on
add js file to asp.net web app
I have a .js file how would i add it to my asp.net web app?
ASKER
The third part control told me to do this
src="insertYourPath/tinymc e/jscripts /tiny_mce/ tiny_mce.j s" ></script>
I inserted my path but it tells me that it can not be found.....
Are the slashes supposed to go like this / ?
src="insertYourPath/tinymc
I inserted my path but it tells me that it can not be found.....
Are the slashes supposed to go like this / ?
ASKER
It works when i do it in textpad like this:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr">
<head>
<script type="text/javascript" src="C:\Users\Troy\Documen ts\Visual Studio Projects\icocentre\tinymce \jscripts\ tiny_mce\t iny_mce.js " ></script >
<script type="text/javascript">
tinyMCE.init({
mode : "textareas",
theme : "advanced",
plugins : "emotions,spellchecker,adv hr,insertd atetime,pr eview",
// Theme options - button# indicated the row# only
theme_advanced_buttons1 : "newdocument,|,bold,italic ,underline ,|,justify left,justi fycenter,j ustifyrigh t,fontsele ct,fontsiz eselect,fo rmatselect ",
theme_advanced_buttons2 : "cut,copy,paste,|,bullist, numlist,|, outdent,in dent,|,und o,redo,|,l ink,unlink ,anchor,im age,|,code ,preview,| ,forecolor ,backcolor ",
theme_advanced_buttons3 : "insertdate,inserttime,|,s pellchecke r,advhr,,r emoveforma t,|,sub,su p,|,charma p,emotions ",
theme_advanced_toolbar_loc ation : "top",
theme_advanced_toolbar_ali gn : "left",
theme_advanced_statusbar_l ocation : "bottom",
theme_advanced_resizing : true
});
</script>
</head>
<body>
<form>
<textarea name="content" cols="50" rows="15" >
This is some content that will be editable with TinyMCE.
</textarea>
</form>
</body>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr">
<head>
<script type="text/javascript" src="C:\Users\Troy\Documen
<script type="text/javascript">
tinyMCE.init({
mode : "textareas",
theme : "advanced",
plugins : "emotions,spellchecker,adv
// Theme options - button# indicated the row# only
theme_advanced_buttons1 : "newdocument,|,bold,italic
theme_advanced_buttons2 : "cut,copy,paste,|,bullist,
theme_advanced_buttons3 : "insertdate,inserttime,|,s
theme_advanced_toolbar_loc
theme_advanced_toolbar_ali
theme_advanced_statusbar_l
theme_advanced_resizing : true
});
</script>
</head>
<body>
<form>
<textarea name="content" cols="50" rows="15" >
This is some content that will be editable with TinyMCE.
</textarea>
</form>
</body>
ASKER
But it does not work in asp.net like this:
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="TEST.aspx.vb" Inherits="TEST" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<script type="text/javascript" src="C:\Users\Troy\Documen ts\Visual Studio Projects\icocentre\tinymce \jscripts\ tiny_mce\t iny_mce.js " ></script >
<script type="text/javascript">
tinyMCE.init({
mode : "textareas",
theme : "advanced",
plugins : "emotions,spellchecker,adv hr,insertd atetime,pr eview",
// Theme options - button# indicated the row# only
theme_advanced_buttons1 : "newdocument,|,bold,italic ,underline ,|,justify left,justi fycenter,j ustifyrigh t,fontsele ct,fontsiz eselect,fo rmatselect ",
theme_advanced_buttons2 : "cut,copy,paste,|,bullist, numlist,|, outdent,in dent,|,und o,redo,|,l ink,unlink ,anchor,im age,|,code ,preview,| ,forecolor ,backcolor ",
theme_advanced_buttons3 : "insertdate,inserttime,|,s pellchecke r,advhr,,r emoveforma t,|,sub,su p,|,charma p,emotions ",
theme_advanced_toolbar_loc ation : "top",
theme_advanced_toolbar_ali gn : "left",
theme_advanced_statusbar_l ocation : "bottom",
theme_advanced_resizing : true
});
</script>
<title>TEST</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<textarea name="content" cols="50" rows="15" >
This is some content that will be editable with TinyMCE.
</textarea>
</div>
</form>
</body>
</html>
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="TEST.aspx.vb" Inherits="TEST" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<script type="text/javascript" src="C:\Users\Troy\Documen
<script type="text/javascript">
tinyMCE.init({
mode : "textareas",
theme : "advanced",
plugins : "emotions,spellchecker,adv
// Theme options - button# indicated the row# only
theme_advanced_buttons1 : "newdocument,|,bold,italic
theme_advanced_buttons2 : "cut,copy,paste,|,bullist,
theme_advanced_buttons3 : "insertdate,inserttime,|,s
theme_advanced_toolbar_loc
theme_advanced_toolbar_ali
theme_advanced_statusbar_l
theme_advanced_resizing : true
});
</script>
<title>TEST</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<textarea name="content" cols="50" rows="15" >
This is some content that will be editable with TinyMCE.
</textarea>
</div>
</form>
</body>
</html>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
ty
http://msdn.microsoft.com/en-us/library/bb398930.aspx
or
<script type="text/javascript" src="../.js">