Form submitted twice with one click

I’m not familiar with Safari web dev tools but it looks like the GET is something trying to load an image an image. The question mark image in the preview for sure looks like a failed image load. So indeed it could be favicon or something similar. What happens if you explicitly set your favicon in your HTML header? See this link for more details. Basically, something in your header like this:

<head>
<link rel="icon"
      type="image/x-icon"
      href="/favicon.ico">
<!-- Other header items -->
</head>

It could maybe be from that style.css too. Where is that stylesheet coming from and what’s in it?

OK, thanks, I implemented the favicon and it does show up next to the title of the page. I have just one style sheet shared by all of my pages, I currently have 14 of them. It’s pretty big and not very organized. But in my attempt to stop the double submitting, I stripped down the HTML page to the bare minimum, no style sheet and no javascript. Anyway, I’ll have to see if the get requests stop now. It has not been consistent lately.
I’m going to move on to my next issue. I’ll make a new post. Thanks again.

OK, I solved my other issue. I was creating a Javascript variable inside a template range and caused a duplicate variable error. Got rid of the variable and set the value directly thus:

document.querySelector("#thumbNail_image{{.ID}}")
.style.backgroundImage = `url({{.ThumbNailString64}})`;

Have a great day.

Glad to hear it! Sounds like you’re in good shape. Don’t hesitate to stop back by the forum if you need help with anything else.

Only other thing I can think of regarding pages doing a GET: if you just type some url like localhost:1234/generalLedger in your address bar and press enter (or hit a bookmark for that page for example), your browser will do a GET at that address. I figured you knew that but if you’re REALLY new to web stuff you might not.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.