-2

Here is script in my website's footer that will check that specific font installed or not in computer. If installed or not it will prompt alert box. I want to customize:

  • Design of that alert box
  • Replace the 'OK' button with 'Download' button that also have download link.
  • Write some RTL words in new paragraph. For Example Urdu words like آپ کے کمپیوٹر میں۔۔۔۔
JJJ
  • 32,902
  • 20
  • 89
  • 102
John Doe
  • 15
  • 2
  • 7

3 Answers3

1

Just accept that it's not going to be an alert() box, but rather it's just going to be normal HTML+CSS. So you will just position the box wherever you want it with whatever buttons you want and whatever way you want it to look. Or if so you'd whish their are plugins which already do this for you (though they limit your options quite a bit of course). You might want to look at jQuery UI if you're using jquery for example (specifically the dialog component of jQuery UI).

David Mulder
  • 26,123
  • 9
  • 51
  • 114
  • It is good idea but how to call the HTML frame? Some guide please. – John Doe Apr 28 '13 at 10:34
  • Very simple example: http://jsfiddle.net/bEGMD/1/ Though there are lots of other ways to achieve the same effect. – David Mulder Apr 28 '13 at 12:11
  • Thank you. That is work fine and exactly that what I want. But I need some more help. Please do not mind. I am new to JS. Now how to put link on "Download" button that will open in same window/tab. Another question is that does JS affect on website's loading speed? – John Doe Apr 28 '13 at 15:16
  • http://jsfiddle.net/bEGMD/2/ and everything affects website loading speeds, however the effect is so small that that's one thing you won't ever have to worry about. – David Mulder Apr 28 '13 at 17:26
0

you have to use jquery dialog box for this type of customization. Use this link

John Doe
  • 15
  • 2
  • 7
  • That is right to use this plugin rather then customize Alert box. It is more flexible to customize. Thanks for nice sharing. – John Doe Apr 28 '13 at 11:10
0

I use Sweetalert for designing the Alert box. its easy, simple and efficient. here is the link to download SweetAlert and example codes worked out at Here

JavaLearner1
  • 607
  • 2
  • 8
  • 21