All Questions
74 questions
1
vote
4
answers
106
views
How to add both onclick and href both a in a button of a React page?
I have a button element in React page. With onclick event I called a function from my context. Now I want to add a href in that button.
Here is my code:
{ categoryData.map((item,index)=>{
...
1
vote
1
answer
35
views
Adding a HREF link is hard... Can I attach one link to Element ID or another
What I'm trying to do is have an HREF link to another link on the page. I want the first link "Link 2" to use the HREF in "Link 1". Link1 works but Link2 does not. Any solutions?
&...
0
votes
3
answers
5k
views
Display thank you message and redirect to another page
Currently, I managed to create alert pop-up "Thanks" after on-click event.
It works for 1 second and redirect to https://www.w3schools.com.
How to create not pop-up alert, but a kind of ...
1
vote
1
answer
2k
views
Is it possible to go to another page and call Javascript function after clicking button?
My first post here :)
Hello everyone,
I have two .htmls, first one is named a.html, and second one is named b.html. I want to go to b.html and call there a function after button on a.html is clicked. ...
0
votes
1
answer
507
views
How to select and attribute in span tag when call window.open function
I have a span tag and I want to execute onclick function that call two window.open :
<span data-href="https://clkde.tradedoubler.com/click?p=300883&a=3040124&g=24628776" class=&...
0
votes
1
answer
408
views
dynamic list in javascript how to call function from specific <li>
I get the message list from the API and create a dynamic array using javascript. I would like a new page with message details to be started when a specific row is pressed.
How do I implement a call to ...
0
votes
1
answer
141
views
JavaScript function on <a> tag is getting executed without calling and even I applied onClick event listener
I am trying to call a javaScript function on click tag. But the function is getting executed automatically when I didn't click on the link and I have also applied the onClick event listener for the ...
1
vote
2
answers
572
views
How can I add a self-referring onclick event to every <a>?
I have a single page app, for which I'd want to make sure link clicks don't get processed in the regular way, but are passed to my router instead. I therefore have the currently perfectly working menu ...
-1
votes
1
answer
33
views
Change <link href=""> by onclick .js
I would like to change the style of site by clicking the icon
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="styled.css" id="styles"&...
1
vote
3
answers
1k
views
The href in template and the Url are not working in Django
I am new to django. I have made a table cell clickable but when i click that cell, nothing happens.
template :
{% for each in object_list %}
<tr>
<td id="{{ each....
0
votes
2
answers
23
views
Javascript.void problem i want to see the page new adress when i click on a href link
it works, but i want to see the link adress so that people can bookmark the link, now they click on and they stil see the main link adress"http://hemsidan/start_media.php.
<a class="...
2
votes
3
answers
1k
views
Link to a JavaScript function via href
I'm struggling in linking an HTML link <a> with a JavaScript function using Google Apps Script. I tried the following, but it left me with this error message:
"Unsafe JavaScript attempt to ...
-2
votes
1
answer
737
views
JavaScript if condition isn't redirecting to another page
I have a button, that when you click it, it will start a function, the objective of the function is to see if a bunch of statements are true, and if they are it should send me to another page
<...
0
votes
2
answers
2k
views
make href call a method in reactjs
I would like to make the href attribute of my anchor tag to call a method instead of going to some url. I know that in plain js I can do this:
..href={"javascript: foo(value)">
So I've done the ...
-1
votes
1
answer
866
views
Which call faster href vs onclick
Hi~ i want to calling sequence about anchor tag href property and onclick proerty I have some test
<a href="https://stackoverflow.com" onclick="alert('asdf');">asdfasdf</a>
and click ...