How I link external JavaScript sheet?

Editor
Apr 15, 2012 at 9:06 PM
Edited Aug 30, 2014 at 8:21 PM
How do I link a external JavaScript sheet?   Like this:     <script src="~/rcLayouts/example/Scripts/script.js" type="text/javascript"></script> or like this: <script src="src="@Href("~/rcLayouts/example/Scripts/script.js")" type="text/javascript"></script>   I can't get my Javascript to work from external sheet....
Coordinator
Apr 16, 2012 at 2:22 PM

2nd one looks good

1st one - i belive you will be able to use it like that in asp.net web pages/razor/ v 2

Editor
Apr 16, 2012 at 2:57 PM
razorc wrote:

2nd one looks good

1st one - i belive you will be able to use it like that in asp.net web pages/razor/ v 2

It does not work I tried both and my Javascript code does not work, if I put the code in the document then it will work, external link to js sheet will not work.

Coordinator
Apr 16, 2012 at 5:57 PM

I don't see your code , so don't want to guess why it doesn't work....

I have sites where i do this that way and it works just fine - take a look at www.razorc.net - i load jquery and js for slider that way...

btw where do you add this code ??? in layout page ?

Editor
Apr 16, 2012 at 6:44 PM
Edited Aug 30, 2014 at 8:24 PM
razorc wrote: I don't see your code , so don't want to guess why it doesn't work.... I have sites where i do this that way and it works just fine - take a look at www.razorc.net - i load jquery and js for slider that way... btw where do you add this code ??? in layout page ?
Yes it is in the layout page. Which way do you do it? Second way?   Show example please.   Btw are you using RazorC? Which other websites you built of the razorC CMS?   I am asking because my website is loading extremely slow very slow, it takes 3 seconds for me and if your in US then  it takes longer around 8-9. Hosting is provided by Godaddy.
Coordinator
Apr 16, 2012 at 6:57 PM

1) like this <script src="@Href("~/rcLayouts/thecodingguys/Scripts/script.js")" type="text/javascript"></script>

2) i saw that, site is VERY slow , Sorry to say but i would NOT recommend GoDaddy as host

Here you have few examples:

http://www.advancedbodylaser.com/

http://www.quoteauto-insurance.com/

http://www.ampmtruckrepairs.com/

http://www.nadiaart.com/

http://www.orylphoto.com/

Editor
Apr 16, 2012 at 7:02 PM
razorc wrote:

1) like this <script src="@Href("~/rcLayouts/thecodingguys/Scripts/script.js")" type="text/javascript"></script>

2) i saw that, site is VERY slow , Sorry to say but i would NOT recommend GoDaddy as host

Here you have few examples:

http://www.advancedbodylaser.com/

http://www.quoteauto-insurance.com/

http://www.ampmtruckrepairs.com/

http://www.nadiaart.com/

http://www.orylphoto.com/

Yeah they are really slow...Who you hosted with? Arvixe? the main razorC website.

Coordinator
Apr 16, 2012 at 7:06 PM

Yes, the razorc.net is hosted with Arvixe 

The examples i sent you some with arvixe some with other providers.

Editor
Apr 16, 2012 at 7:09 PM
razorc wrote:

Yes, the razorc.net is hosted with Arvixe 

The examples i sent you some with arvixe some with other providers.

I'll just have to wait. btw that contact addon you made, is there a way to get that to appear in the middle of a page?

Coordinator
Apr 16, 2012 at 7:18 PM

It is available as widget, so you can insert it to any section you want.

Ex. you can render body of page , then in the section that is below that add contact form and then add another widget below that (it can be HTML widget so you can put there whatever you want) - the final result will be:

body text here
contact form
some text from HTML widget

or you can select that you don't want to render BODY part of the page (there is a option for that when you edit page)  and use only widgets...