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

  • Home
  • SEARCH
  • 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 8064453
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T11:22:07+00:00 2026-06-05T11:22:07+00:00

following is my code working well in chrome. <body> <a href=javascript: sam.save();>hehe</a> <script> var

  • 0

following is my code working well in chrome.

<body>

<a href="javascript: sam.save();">hehe</a>

<script>

var sam = {
    save : function()
    {
        alert("here")
            return false;       
    }
}
</script>

when in run in firefox the page redirects and false is displayed on the screen with the adress bar content like in the picture

enter image description here

firefox version is 9.0.1

suggestions and circumvents please…

  • 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-06-05T11:22:08+00:00Added an answer on June 5, 2026 at 11:22 am

    The code you cite can’t possibly produce the behavior you observe. The observed behavior would only happen if sam.save() returned false, whereas the quoted code returns undefined. What does your actual complete code look like?

    Edit: The useful answer was in a comment. I put it here to make it easier to find.

    Oh, I missed the “return false” after the alert. In that case, the behavior you see is correct: if the javascript: execution returns a value other than undefined that value is treated as a string of HTML and rendered. At least in most browsers. – Boris Zbarsky Jun 11 at 15:25

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

Sidebar

Related Questions

can anybody tell me why is the following code not working? <script type=text/javascript src=../../Scripts/jquery.js></script>
In the following (working) code example, the templated register_enum() function is used to iterate
The following code was working very well. Suddenly, the Edit button click stopped working.
Javascript objects can be used as maps. The following all is valid code: var
I have the following sample code in WPF. It is working well when I
The following code is working well to scroll down the complete page. But I
I found the following code which is working well for a time sheet calculator
We have the following code working for a complex rails form with checkboxes. I'm
Right now I have the following code working: @UiHandler(usernameTextBox) void onUsernameTextBoxKeyPress(KeyPressEvent event) { keyPress(event);
The following code is working great in a normal console application: private void button1_Click(object

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.