Jump to content

JamesL

Members
  • Posts

    11
  • Joined

  • Last visited

Everything posted by JamesL

  1. Start here: https://www.w3schools.com/js/default.asp
  2. Yes, it is possible. But you need to add some more Javascript to handle this. Break it down to smaller tasks: 1. Click link to open window and set an event listener to monitor the popup window 2. Popup window also checks to see if it has focus. If not, it sets focus and brings itself to the front. 3. The 'opener' window monitors to see if the popup has focus. If the user clicks on the opener (anywhere but the link), it should return focus to the popup. 4. The only exception is if the user clicks on the link from the opener window. If they do click it, an event listener is triggered, and closes the popup window.
  3. If you have multiple IDs in a document, the browser will set the value to the last one. For example: <a id="link" href="https://google.com">Google</a> <a id="link" href="https://yahoo.com">Yahoo</a> <a id="link" href="https://ebay.com">eBay</a> In this case, the href value of the id 'link' will be 'https://ebay.com'. The other two are replaced by the last value. Can you do it? Sure. Does it help you? Not one bit. It doesn't cause your browser to self-destruct or anything. But, you can't write functional Javascript code.
  4. There are probably "media queries" (https://www.w3schools.com/css/css_rwd_mediaqueries.asp ) which alter the content based on the screensize. You have to figure out: 1. What your screen viewport size is (window.innerHeight + window.innerWidth) 2. Determine which stylesheet is being used based on the screen size (e.g. small.css, medium.css, large.css) 3. Figure out if the element is being hidden by the CSS (e.g. "visibility:hidden' or 'display:none')
  5. You just want to change the background-color? Change the 'background-color' property in CSS: .topnav a:hover { background-color: red; color: black; } .topnav a.active { background-color: orange; color: white; }
  6. Sorry, I don't know the answer, but, I see that you also posted your question here: https://forums.raspberrypi.com/viewtopic.php?t=333686 The rasberrypi forum is probably the best place to find the answer. Good luck.
  7. You would need to rename your existing files to something different. (Or, you could rename the new files). In the end you would have something like this: <!DOCTYPE html> <html> <head> <title>Your site</title> <!-- the existing stylesheet --> <link rel="stylesheet" href="stylesheet1.css"> <!-- the new stylesheet --> <link rel="stylesheet" href="stylesheet2.css"> <!-- your existing javascript --> <script src="oldjavascript.js"></script> <!-- your new javascript --> <script src="newjavascript.js"></script> </head> <body> </body> </html>
  8. Come up with a list of requirements. Must do these things: A B C D Would like to also do these things (if possible) A B C Keep each bullet point one sentence or less (easy to read and understand by other people). This is your 'requirements' document. All of the things you described can easily be done with HTML / Javascript / CSS. WordPress just makes it more complicated.
  9. What do you mean "reserving"? Reserving what? The domain name? The Copyright? The Trademark? The W3Schools Spaces url? What are you trying to reserve... and where?
  10. Why not just use a 3rd party site to handle the Form part (e.g. Google Forms: https://docs.google.com/forms/ ) and then embed it into your site via an iFrame? Another possible option is to use a service like this with your existing form: https://mailthis.to/ As a side note: the friendlier you are to people, the more responses you'll get to your queries.
×
×
  • Create New...