0

I am developing a site for mobile web application using Html5 and jQuery which were very new technologies I am working with, My problem is that, onclick of a button I am opening a new popup window using window.showModelDialog("url",...);. This window has to be model because user should not access the parent page.

but the popup window is not opening in android browser, and its opening in another tab on chrome browser where as its working fine on desktop browsers ...

can anybody suggest some tweaks to that pop works on mobile browsers.

Thanks

CRUSADER
  • 5,486
  • 3
  • 28
  • 64
syed99
  • 332
  • 1
  • 5
  • 20
  • @mplungjan: i have seen that post its very old, after that many issues were fixed and window.showModelDialog adopted by other browsers too. and iam talking about mobile browsers. – syed99 Jun 28 '13 at 05:40
  • Look at the second answer it is still valid. Use jquery UI/mobile dialog instead of showmodal – mplungjan Jun 28 '13 at 06:24

2 Answers2

0

I believe it is window.showModalDialog not window.showModelDialog

Currently no mobile browser supports this feature and i would recommend you not to use this in the desktop browsers as well.

“You should only use one browser window ever, as a Web app author.”

The alternative would be to use jQuery UI’s dialog which much cleaner and better.

drarkayl
  • 1,017
  • 7
  • 17
  • Thanks for your post, yes its window.showModalDialog only its typo error.but i dont know how to call an servlet (which returns results from db to display on popup)using jquery ui dialog. – syed99 Jun 28 '13 at 05:52
0

I don't think it will work on any mobile browser. That's not how they designed mobile UX. On a mobile device screen real estate matters. Hence you cannot really expect a window over another window. The best you can get on android is

  1. Javascript alert popup
  2. A toast
  3. jQuery mobile dialog

I think jQuery modal dialog will do just what you want :)

Niks
  • 4,802
  • 4
  • 36
  • 55