0

I'm building a webpage for a basic voting system for a nearby motorbike club and meet.

Everything was going fine until only one device displayed the alert text in a strange format. In iOS with a large font it overlaps the text and fades the edges of the alert. Can't post image without ten reputation but if you can find a way for me to show I will.

What I'm looking for is a solution so those on the day who have the same setup can view the page correctly.

The code for the alertbox is simple.

OnSubmit="return validate(this);"

And in the header

Function validate(form){ Return confirm("text here"); }

This was typed on a mobile device so forgive any typos or mistakes. Any helps appreciated.

Jeff
  • 688
  • 1
  • 13
  • 30

1 Answers1

0

The problem is the confirm() box that renders differently depending on device and browser.

Here's another thread dealing with the same issue: Alternative to Javascript prompt box

If you prefer a drop-in solution you can use this library here: http://bootboxjs.com/

Community
  • 1
  • 1
bjornl
  • 1,757
  • 3
  • 17
  • 29
  • Is there anyway to make the default box render correctly – Jesse Hayward Mar 01 '17 at 07:03
  • You can't really control it, since the browser and device determines what it looks like. If you want control over its appearance, you'll have to use a library such as the one above, or this one http://github.hubspot.com/vex/ (which is very easy to use) – bjornl Mar 02 '17 at 05:55