0

I added a custom alert in my web application based on the below suggestion for Alert issue. It works fine in iOS7 device, but on iOS8 device it displays the messages in bold font.

Is it possible to display the message font without BOLD?

Please find the attached screenshot for your reference.

Change JavaScript alert dialog title in iOS

Code snippet:

 function alert2(words){
        var iframe = document.createElement("IFRAME");
        iframe.setAttribute("src", 'data:text/plain,');
        document.documentElement.appendChild(iframe);
        window.frames[0].window.alert(words);
        iframe.parentNode.removeChild(iframe);
      }

      function takePicture() {
          alert2("Testing custom alert");
       }

enter image description here

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
Ramesh Sangili
  • 1,633
  • 3
  • 17
  • 31
  • you're just calling `alert(...)`? – Marc B Oct 06 '14 at 20:53
  • code snippet added. If I use just alert("Test"), then the header displays in bold and the message displays fine in iOS8.. I don't want header to be displayed on the screen – Ramesh Sangili Oct 06 '14 at 21:01
  • Marc B, any thoughts? – Ramesh Sangili Oct 07 '14 at 19:57
  • I'm guessing the alert overlay is part of the browser's built-in styles, and not something you can override at all. You could make your OWN popup purely with css overlays and whatnot, but it wouldn't have quite the same sideeffects as a normal alert() would. – Marc B Oct 07 '14 at 19:59

1 Answers1

-2

no you can't its OS or browser dependent but u can make your own pop up boxes which is also very easy

maq
  • 1,175
  • 3
  • 17
  • 34