Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HTML tag redirect blocking

Tags:

html

I'm using following code for just dialog box, Its working fine.. But how can I stop from redirecting the same page while clicking?

<a href="" title = "this is some text">[?]</a>

Thanks in advance...

like image 341
m2j Avatar asked Mar 15 '15 19:03

m2j


People also ask

How do I stop a redirect in HTML?

From the drop-down menu select Settings then scroll down and click Advanced. In the Privacy & security section choose Content settings > Pop-ups and redirects then ensure that the Allowed option is turned off.

How do I create a redirect in HTML?

To redirect one HTML page to another page, you need to add a <meta> tag inside the <head> section of the old HTML page. The <head> section of an HTML document contains metadata that is useful for the browser, but invisible to users viewing the page.

How do I stop URL redirects?

You can prevent redirects to other domains by checking the URL being passed to the redirect function. Make sure all redirect URLs are relative paths – i.e. they start with a single / character.

How do I redirect to another link in HTML?

The simplest way to redirect to another URL is to use an HTML <meta> tag with the http-equiv parameter set to “refresh”. The content attribute sets the delay before the browser redirects the user to the new web page. To redirect immediately, set this parameter to “0” seconds for the content attribute.


1 Answers

add the # like so :

<a href="#" title = "this is some text">[?]</a>

or remove href of link and set url in some custom attribute

onclick event of link, read url from custom attribute

<a href="#" onclick="JSFunction()" id="someid" data-url="some url">text</a>
like image 72
ZEE Avatar answered Sep 23 '22 00:09

ZEE