I need to show a dialog box that's is like chrome's. But I want a modal alert, because js alert freeze the page.
I tried getting the css from it, but I think it's not possible.
Does anyone know how to do it? Or have the css for it?
Chrome JS Alert
You might want to check out this page. Sounds exactly like what you're trying to do. It uses the onload javascript attribute, which says "run when the document is finished loading".
http://www.htmlcodetutorial.com/linking/linking_famsupp_88.html
Related
I saw similar problems to my problem, but I have not seen useful solutions for my issue.
Situation:
When I play a video file within firefox, I can see current state of html-markup (F12) because of that I can trigger some funtions in my php behat/mink code.
The same situation occurs in IE, and I dont see current state of my markup-code and I can´t trigger my test-functions.
Example:
Firefox opens modal dialog and it appears by markup (F12) css class "open window"
IE opens modal dialog and it not appears by markup (F12) css clas "open window"
How can I detect current markup state in IE, when I can look only at markup?
UPDATE
Here is my code. I just looking for one css-selector, but it does not working
on IE10
$node = $this->getSession()->getPage()->find('css', $css_selector);
Problem beginns by IE10:
When i press F12 within IE10, i will see developertools.
I see within "HTML-section" current state of html-markup.
I click on icon and modal dialog appears.
Actually my html-markup changes after that. Some css classes come additionaly to video-tag.
I have to click by developertools on "refresh"-Button or F5 to see
currently markup-state, which contains modal-dialog.
To achieve same effekt whithin behat, i use:
$this->getSession()->reload();
That does not work. Behat can not find new css classes, which referes on modal-dialog.
Please look on picture:
I hope, it is clear now, what i mean :)
As i understood, for IE the class that you are using in the validation is not added and you are not able to check that the modal is opened.
As an alternative you could use alternative methods to verify that the modal is opened and to avoid cross-browser issues like this.
I think is better to work with what you already have without reloading or doing any actions that could lead to extra code that could affect other browser or could affect the stability of the scenario.
One way of doing this is to check that the modal is visible using isVisible() method.
I'm developing an app which works more or less like the Notes app. When user click the + button a modal window with TextEdits is to be slided up,just like the Notes app did. However I was unable to locate any resource mentioning this kind of thing. Any clues?
I think you are looking for the QML Sheet element. You will need to implement the TextEdit part yourself.
I have a bug that I experience only in IE. I would like to inspect DOM by using IE developers toolbar, but unfortunately cannot seem to do it as complete DOM is generated dynamically. Does anybody have an idea how to overcome this problem?
There is a reload button in the toolbar to the right of the floppy disc icon. Hitting this also works.
Once that div is generated dynamically, then inspect it. Answered it as it seemed to work for you... :)
once page is completely loaded then click F12, after that reload page again and then on developer toolbar click REFRESH button which is available to exactly next to save button in developer tool bar. After that click the arrow for inspect element.
Alternatively, make sure Inspector pane is active then hit F5 key.
I have 12 pop up pages on my site with a Save and Cancel button. My requirement is once the Save button is clicked on the pop page i want the server side code to execute and once its done I want the pop up to close.
Is that possible? If yes, kindly let me know how do I achieve that.
You can put a small Javascript on each popup:
<script type="text/javascript">
window.close();
</script>
Once the page has loaded (and all the code is run) this Javascript should close the window. Please note, different browsers will behave differently! Some might close it, some might alert warning, others may block it completely.
As far as I know this is the only way that could close a browser window. Either way, any number of popup windows over 0 is arguably an unfriendly user design. 10+ and you should be seriously reconsidering your user friendliness!
What you can do:
Create update panel and make your Save button as trigger to it, once button is clicked it will execute code behind without closing your popup.
Use your ScriptManager to register statrup method (JavaScript). This method will close your popup
ScriptManager.RegisterStartupScript(this,this.getType(),Guid.NewGuid().ToString(),"/your code to close popup/",true /this true will add script tags to your script so you don't have to write /);
Cheers
Sorry but this SO script wont highlight code, I don't know what is the problem.
At the end of your code the below lines of code will help to close the window.
this.Page.Response.Clear();
this.Page.Response.Write(string.Format(CultureInfo.InvariantCulture,
"window.frameElement.commonModalDialogClose(1, '{0}');", lblText.Text));
this.Page.Response.End();
How to remove The warning image of the alert box in Javascript. I want to delete the warning image from the javascript alert window. Is it Possible?
Unfortunately, the look-and-feel of the result of an alert() call is browser dependent. Each browser implements it differently.
If you need to change the look of a browser dialog box, you'll have to implement your own. There's a lot of options out there. JQuery UI is a particularly popular one if you happen to be using JQuery.
You won't be able to change it. Better use a custom alert box.
jQuery Impromptu
is a nice one with a lot of options