CSS3, HTML, JavaScript, Programming, Web Development

A Basic Look at using the JavaScript QuerySelector Function with CSS Selectors

JavaScript QuerySelector
JavaScript QuerySelector

The JavaScript querySelector (and the related querySelectorAll) functions give you a lot of control over elements on your page since these functions support using CSS Selectors. You can target elements on your page in a number of different ways using CSS selector syntax which will likely save you a lot of time and effort. As well, the power of using CSS Selectors in JavaScript makes it less necessary to start referencing more heavy-weight libraries such as JQuery for doing simple DOM manipulations. Continue reading “A Basic Look at using the JavaScript QuerySelector Function with CSS Selectors”

CSS3, Dialog, HTML, HTML5, JavaScript, JQuery, Programming, Web Development

ShowModalDialog: How to Run a Function on the Parent Page

Sometimes when putting together a Web-based application, you will need to show a custom modal dialog that is a bit more complex than the inbuilt JavaScript alert( or confirm( dialogs, and that unlike a jQuery modal dialog will run as a separate window. Your best option in this case is to use the JavaScript ShowModalDialog function. Since ShowModalDialog behaves differently than a traditional Window.open command, you’ll have to keep a few things in mind when developing your solution. Continue reading “ShowModalDialog: How to Run a Function on the Parent Page”