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 7560959
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T13:02:34+00:00 2026-05-30T13:02:34+00:00

Hello wonderful stackoverflow users. I have a question about url loading. In many browsers

  • 0

Hello wonderful stackoverflow users.

I have a question about url loading.

In many browsers and web viewers, there is the functionality to load a url to a website, but also a url to execute javascript.

Load a website: http://www.google.com
Load a script: javascript:alert("Hello!");

My question is, is there a way to load an http request as well as a javascript.

The answer is most likely no, but I want to confirm because I can’t find any resources that describe this.

I was thinking it would be something like:

http://www.google.com&&javascript:alert("Hello!");

but the problem is, of course, this is not correct.

The reason why I am doing this is to provide a url that once it is clicked, it will also execute a certain javascript function. This will be in Android.

I appreciate any response, and understand that the answer may be no.

  • 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-30T13:02:36+00:00Added an answer on May 30, 2026 at 1:02 pm

    It all depends on whether you have control of the page being linked to. If you cannot modify the source of the linked page, then the answer is quite simply, no.

    But, if it is your page, you can pass arguments in the hash, and then read the hash when the page loads and execute script accordingly.

    window.onload = function () {
        if (location.hash.indexOf("doSomething") > -1) {
            // do something
        }
    };
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hello wonderful people of stackoverflow! I have a problem. I am working on an
Hello ever one I want to ask a question about file opening.I want to
Hello wonderful stackoverflowers! I hope this question is within the scope of this site.
Hello i have tableview with many objects in it. If i want to add
hello I have a small question in objective-C memory management. I know that if
Hello I have the following error by git-fsck, which cannot be cleaned by git-gc
Hello again ladies and gents! OK, following on from my other question on ASP.NET
Hello all you helpful folks @ stackoverflow! Best resources for Java GUI's? Looking at
Hello there and Merry Christmas !!! I am new to WPF and I am
Hello we have an SQL server application running over a low bandwith connection. We

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.