There are a lot of things in your code that don't make sense.
For starters, the only place you actually ever even *ATTEMPT* to change an <img> is here:
img.src = "weba.jpg";
so you are only (trying!) to affect an image for player 1 and then only when the card is a Jack.
And then, as you wrote
they just come out on the page like 1-k, 1-4 and so on.
Well, yeah. But that's what you asked for.
You are doing
document.getElementById("sometext2").innerHTML = cardname2;
Why would you expect that to affect the appearance of some <img>? ESPECIALLY when you don't even *HAVE* any <img>
tag(s) on the page, at all!