jquery - Change the text in Javascript alert -


is possible change text in javascript alert after appeared?

for example possible create timer inside of alert?

┌────────────────────────┐ │ x seconds passed...    │ │                   <ok> │ └────────────────────────┘ 

...where x changed 0 passed seconds value.

i know can use modal or something, want know if it's possible change text alert box after appeared.

i guess it's not possible, it's better ask.

after bit of preliminary searching, seems it's impossible want. due security reasons, think.

it not recommended use alert box because (webplatform):

  • this synchronized method call. meaning, calling method pauses scripting execution of window method called, until user closes displayed dialog. also, depending on cross tab/window usage, can pause scripting executions of other windows/tabs same domain.
  • calling method in browsers prevents user interacting entire browser, or browser window (along of tabs), until dialog closed.
  • intrusive dialog boxes annoying user.

you create own dialog box using 1 of these:

you have alert says: "hey, here, user, i'm trying tell something!" , use 1 of above.


another alternative create popup using javascript

window.open("http://example.com");

or

you use showmodeldialog or showmodelessdialog

where can use dialogarguments, dialogheight, dialogwidth, dialogleft, , dialogtop.

but problem most people have popup blockers block innocent popups.


an activex only possibility seems modified alert box. have not tested not have windows computer.


there nsipromptservice's alert and/or alertcheck. these seem offer more functionality such adding title, or check box. there prompts, selections, etc.

unfortunately, doesn't seem available in javascript. seems it's available firefox extensions, etc (chrome users).


Comments

Popular posts from this blog

java - JavaFX 2 slider labelFormatter not being used -

Detect support for Shoutcast ICY MP3 without navigator.userAgent in Firefox? -

web - SVG not rendering properly in Firefox -