Preheat the grill and heat a large non-stick frying pan. Add a knob of the butter to the pan and cook the onion for 4-5 minutes until softened but not coloured. Stir in the spinach and cook for a few minutes until wilted. Turn the mixture into a sieve and press well with a wooden spoon to squeeze out all of the excess liquid. Then place the spinach on a board and roughly chop.
Lightly beat the eggs in a large bowl, then fold in the spinach mixture with the cooked ham or bacon and most of the cheese. Keep about 2 tablespoons aside to use later. Season with salt and pepper.
Wipe out the frying pan and then return it to the heat and add the oil. Swirl to coat the sides of the pan evenly, then pour in the egg mixture and cook for about 5 minutes over a low heat to set the bottom and sides. Scatter over the remaining cheese and cook gently for another couple of minutes, then flash under the grill for 4-5 minutes until lightly golden and set. Leave to settle in the pan for a few minutes before cutting into wedges and arranging on plates with the salad and potatoes.