Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 954441
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T00:13:01+00:00 2026-05-16T00:13:01+00:00

<script type=text/javascript> $(document).ready(function() { alert(Hello jQuery.); }); </script> This works the first time I

  • 0
<script type="text/javascript">
$(document).ready(function() {
     alert("Hello jQuery.");
});
</script>

This works the first time I request /Home/Index, but if I navigate to eg /Account/Login then back to /Home/Index it doesn’t work. Doing the same thing using a webforms project works every time. What am I missing? Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T00:13:01+00:00Added an answer on May 16, 2026 at 12:13 am

    Thanks for the replies. The answer, and a question: The relative reference to the .js files was OK for http: //localhost:12345/ but not http: //localhost:12345/Home/Index – effectively they’re the same resource, but not internally for mvc, despite the fact the mvc “paths” are logical not physical – so why does mvc make .js references relative to a logical path?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

#!/usr/bin/perl print Content-type: text/html \n\n; print qq(<html> <head> <script type=text/javascript src=/jquery.js></script> <script> jQuery(document).ready(function(){ jQuery(#form_lang).submit(function(e){
I have this code <html> <head> <script src=jquery-1.7.2.min.js type=text/javascript></script> <script src=jquery-ui-1.8.20.custom.min.js type=text/javascript></script> <script type
I got this script which works perfect when i am not using jquery's alert
Here is fragments of my HAML view: %script{:type => text/javascript, :src => assets/application.js} :javascript
I have a jQuery script: $.ajax({ url: /scripts/secure/development/ajax.asp, type: POST, dataType: text, data: cmd=addresses,
I have this jQuery script var dataString = class_id=+class_id; $.ajax({ type: POST, url: page.php,
function(a){return f.nodeName(a,iframe)?a.contentDocument||a.contentWindow.document:f.makeArray(a.childNodes) This is the offending line from IE9 script debugging I am using
I'm just starting out with jQuery and want to use $(document).ready() to dynamically generate
I'm attempting to select all <script type=text/html> tags in a page. I use <script>
Getting started with jquery and having trouble getting hello world type example going for

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.