html – Identify what element got clicked on a form in JavaScript

I am trying to pass a ref to a function so that I know which html element was clicked. If I don’t pass the ‘this’ (and remove the ()’s from the html) it will always only hide the top TR. I need it to hide it’s own TR. BUT, and this is a big BUT, I will not know what row has the “click me” text so hard coding a unique id is not an option. They will all have the same ‘id’ (an array of IDs), or no ‘id’ at all (array of rows).

<!DOCTYPE html>
<html>
<body>
<table>
    <tr id="row()"><td>Hello 1</td></tr>
    <tr id="row()"><td>Hello 2</td></tr>
    <tr id="row()"><td><p onclick="myFunction(this)">Hide me.</p></td></tr>
    <tr id="row()"><td>Hello 1</td></tr>
    <tr id="row()"><td>Hello 2</td></tr>
</table>
<script>
function myFunction(elmnt) {
 document.getElementById("row(elmnt???)").style.display = 'none';
}
</script>
</body>
</html>

click – How can I make it more obvious that a radio button needs to be clicked?

Try being explicit with a set of buttons, and tie the (continue) button to the action.

Since users have two choose one of a set of available sessions, try disabling the CONTINUE button, so it’s apparent they can’t move forward.

Pair that with a set of buttons aligned above the next step, and experiment with a label that’s clear (you can test which text is the most straightforward).

You can also try renaming the step so that it emphasizes a singular choice. I removed the word ‘dates’ because it might imply selecting more than one.

enter image description here

When the selection is made, CONTINUE is enabled, showing them a path to move forward.

plugins – How to send link in email having unique number and track back whether user has clicked on it in contact form 7 in wordpress?

I have a requirement of verifying user’s email id without registration or signup.
When user will complete the CF7 form, on form submit he should receive a link with some unique number in the mail. And after clicking on that link he should be redirected to result page which displays his form data.

Also the click should be tracked back and update some flag in database.

I know WordPress but this requirement is completely new for me. Please suggest the solution on how I can achieve this in above mentioned or any other manner. Email verification is on priority.

TIA

malware – Accidentally clicked a phishing link, am I at risk?

You likely have nothing to worry about. Phishing relies on tricking you into entering sensitive credentials. It’s very rare for it to exploit you directly and if they did want to do that, they wouldn’t be showing you a password prompt. However, it is possible that merely typing in your account details sent data to them even if you did not press enter, so you should change your password. I don’t think that’s likely in this case, since I logged network activity while typing a dummy password into that phishing site and could only see it send it when I actually pressed enter, but it’s still a good idea to change those passwords.

It is possible that the page has attempted to use exploits against your browser regardless. Generally, these exploits will be against old browsers or outdated plugins. If you keep your browser up to date, it should not have public security issues that could be used to install malware via a drive-by download.

privacy – I clicked on a link that got my ip leaked

The good news is that this is probably not as big a deal as you think. There are a lot of articles (usually written by people selling VPN subscriptions) that make it sound super scary to leak you IP address. This article is a bit more neutral:

Exactly how much information can be learned from your IP address will depend on how your Internet Service Provider (ISP) has set up their network and how they buy and assign IP addresses to their users. The pictures in this article explain it nicely. Most home internet ISPs will assign a unique public IP to each home router, in which case your IP address is unique to you. But some ISPs will put multiple customers behind a NAT so that they all share one public IP address (in particular I think mobile carriers do this because the sheer number of mobile devices would quickly exhaust the 232 possible public IPs). So the first step is to check how your ISP assigns IP addresses.

Next, even if your IP address is unique to your house, that does not mean the attacker will be able to get your address from it. Attackers will look up your IP address in a GeoIP database such as this free one, which is a big lookup table of IP addresses to physical addresses. How does the GeoIP database know your address? It doesn’t. Usually they will know that, say Comcast has reserved a certain block of IPs for, say, customers in northern Atlanta, and so the GeoIP database will just have a pin somewhere in northern Atlanta. In my case, the GeoIP database I linked to has my location wrong by about 500 km.

TL;DR I wouldn’t worry too much about it.


About this:

I have already tried unplugging my router because I was told that my IP address would change.

Did it change? (You can see your IP address my typing “my ip” into google). If it did not change with a reboot, your router may have a very long lease time (sometimes weeks), but you could try logging into your router’s admin page and see if there’s a button to drop the ISP connection or reset your IP address.

GTK – Python Treeview Sorting Behavior (Column Header Need to be Clicked Twice)

I have a GTK3 GUI and a treeview on it. My code is written in Python 3.7.

I need to sort columns by clicking on them and this works. But I have to click on column header button twice to revert sorting (from descending to ascending). This happens both by mouse click and by using the code. Is this a bug and could this behavior be changed?

Here is the very simplified code:

import gi
gi.require_version('Gtk', '3.0')
from gi.repository import Gtk

builder = Gtk.Builder()
builder.add_from_file('test1.glade')
window1 = builder.get_object('window1')
treeview1 = builder.get_object('treeview1')

class Signals:
    def on_window1_destroy(self, widget):
        Gtk.main_quit()

file_data = (("a", 1),
             ("b", 2),
             ("c", 3),
             ("d", 4))

treestore1 = Gtk.TreeStore(str, int)
piter1 = treestore1.append(None, file_data(0))
piter2 = treestore1.append(None, file_data(1))
piter3 = treestore1.append(None, file_data(2))
piter4 = treestore1.append(None, file_data(3))

treeview1.set_model(treestore1)

for i, column_title in enumerate(("Column1", "Column2")):
    renderer = Gtk.CellRendererText()
    column = Gtk.TreeViewColumn(column_title, renderer, text=i)
    column.set_sort_column_id(i)
    treeview1.append_column(column)

# Sorting Code
treeview1.get_column(1).clicked()
treeview1.get_column(1).clicked()

builder.connect_signals(Signals())
window1.show_all()
Gtk.main()

Here is the Glade UI file:

<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.22.1 -->
<interface>
  <requires lib="gtk+" version="3.20"/>
  <object class="GtkWindow" id="window1">
    <property name="can_focus">False</property>
    <property name="default_width">300</property>
    <property name="default_height">300</property>
    <child>
      <placeholder/>
    </child>
    <child>
      <object class="GtkTreeView" id="treeview1">
        <property name="visible">True</property>
        <property name="can_focus">True</property>
        <child internal-child="selection">
          <object class="GtkTreeSelection"/>
        </child>
      </object>
    </child>
  </object>
</interface>

Prevent spam registration checking if the submit button is clicked

I am trying to achieve something on registration page. Using login_footer action hook I am adding following script:

<script>
const element = document.getElementById('wp-submit')
element.addEventListener("click", () => {
    alert('hello');
});
</script>

As you can see, this is checking if the submit button is clicked. Now, what I want is: if the submit button is clicked, it’s okay; otherwise registration form won’t be submitted.

How can I achieve that.
Thanks in advance.

c# – No ejecutar la accion del clicked en un radiobutton para una determinada condicion

Tengo dos radiobuttons en un panel que al hacer click en cada uno de ellos realizan una accion, el problema es que dicha acción solo se debe realizar si se da una condición previa.
He intentado buscar si existe algun metodo .Cancel() o similar que pueda usar si no se cumple la condición pero no lo encuentro, de tal forma que siempre que hace click, se marca el radiobutton como checked.
Agradeceria que alguien me dijera como puedo hacer para que al hacer click en el check de un radiobutton primero haga la comprobacion que necesito y en funcion del resultado de la misma pueda hacer un .Cancel() o similar que haga como si nunca se hubiese checkeado.
Un saludo