Skip to content

Tag: html

How to communicate between iframe and the parent site?

The website in the iframe isn’t located in the same domain, but both are mine, and I would like to communicate between the iframe and the parent site. Is it possible? Answer With different domains, it is not possible to call methods or access the iframe’s content document directly. You have to use…

How to show a confirm message before delete?

I want to get a confirm message on clicking delete (this maybe a button or an image). If the user selects ‘Ok’ then delete is done, else if ‘Cancel’ is clicked nothing happens. I tried echoing this when the button was clicked, but echoing stuff makes my input boxes and text boxes lose …

How to select an input element by value using javascript?

I’ve seen it’s jquery equivalent: But how do you select it using pure javascript (no jQuery). Thanks for all the responses so far but I’m sure if it is working correctly, I need to change the value of the input into something else. I though I could do this by But it appears to be not that ea…

HTML Select: How can you change the label when the is closed?

Consider this: The HTML above looks like #1 when open, and #2 when closed. How can I get the closed version to look like #3? The purpose is to also show the selected year without repeating it in the open options (so it looks cleaner). Answer My original (marked correct) answer is too old to be of use, so here

Use CMYK on web page

I need to use CMYK colors on my web page. Is there any way to use CMYK in CSS or may be convert CMYK to RGB using JavaScript? EDIT: I mean I have colors creating algorithm in CMYK notation and I need to use it on web page. Answer There is no perfect algorithmic way to convert CMYK to RGB.