[Solved] Launch a php script without form

Why are you using onclick? onclick executes javascript code. Just link to the file <a href=”https://stackoverflow.com/questions/12374789/myscript.php”>Say Hello</a> If you must use javascript, you have to redirect to that page using something like window.location Here’s a tutorial on redirecting with javascript solved Launch a php script without form

[Solved] Creating a small page that generates 3 random words from 3 seperate lists at the click of a button

<html> <body> <script> Array.prototype.randomElement = function () { return this[Math.floor(Math.random() * this.length)] } var list1 = [ “1”, “2”, “3”, “4”, “5”, “6”, “7”, “8”, “9”]; var list2 = [ “a”, “b”, “c”, “d”, “e”, “f”, “g”, “h”, “i”]; var list3 = [ “car”, “horse”, “gym”, “fair”, “boat”]; function myFunction() { document.getElementById(“demo”).innerHTML = list1.randomElement() + … Read more

[Solved] Using jQuery to validate checkboxes and input text values

This might get you started. You can make the field validation as complex or simple as you wish. $(‘input[type=checkbox]’).click(function(){ var tmp = $(this).next(‘input’).val(); //validate tmp, for example: if (tmp.length > 1){ //alert(‘Text field has a value’); $(‘#mybutt’).prop(‘disabled’,false); }else{ //alert(‘Please provide a long value in text field’); $(‘#mybutt’).prop(‘disabled’, true); $(this).prop(‘checked’,false); } }); <script src=”https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js”></script> <input id=”mybutt” … Read more

[Solved] How to i link a script to a script? [duplicate]

I see you’re trying to link to a javascript file from a javascript file. You should totally drop that and try jQuery, a lightweight free library for Javascript. With that, you can just do it like this: $.getScript(“myscript.js”,function(){ alert(“script has been loaded!”) }); Alternatively, you can append scripts to the end of your body, but … Read more

[Solved] How can I download pictures from a URL to a local computer without asking permission?

You can use the download attribute to force download and JS to automatically click that link. document.getElementById(‘download’).click() <a href=”https://scontent.cdninstagram.com/t51.2885-15/s640x640/sh0.08/e35/23279358_143343893084349_1681002671546302464_n.jpg” download id=”download”>Download begins</a> 3 solved How can I download pictures from a URL to a local computer without asking permission?

[Solved] how can i create successfull popup window after register in php [closed]

nice question! They way you could do something like that would be.. to try and check what is your url – in this case is: header(“Location: ../Home.php?signup=success”); … and basically see if it contains the keyword “signup=success”. To do this, you need $url=”http://” . $_SERVER[‘SERVER_NAME’] . $_SERVER[‘REQUEST_URI’]; if (strpos($url,’signup=success’) !== false) { echo ‘Thank you … Read more

[Solved] How do I make my stay in one position while I move the page around [duplicate]

Using the marquee tag is not standard. https://developer.mozilla.org/en-US/docs/Web/HTML/Element/marquee Also I would avoid to wrap a div with a p tag as it’s semantically not correct and are supposed to contain only inline elements. I would separate the styling from the div tag. and do something like this: https://jsfiddle.net/Mehdikit/bs9shwt0/ HTML & CSS .container { position: relative; … Read more

[Solved] How to insert an HTML table in Javascript?

function addMultiTable(rows, cols) { var myHeader = document.getElementsByTagName(“h1”)[0]; var table = document.createElement(“table”); for(i=0; i < rows; i++ ) { var row = document.createElement(“tr”); table.appendChild(row); for (j = 0; j < cols; j++) { var cell = document.createElement(“td”); cell.innerHTML = (i+1)*(j+1);//value inside cells row.appendChild(cell); } table.appendChild(row); } myHeader.appendChild(table); } solved How to insert an HTML table … Read more

[Solved] Unordered List and fonts appearing differently in different browsers

The <details> element is not currently (11th May 2016) supported by IE and is an experimental feature in Firefox requiring a preference ‘flag’ to be set/enabled. Per MDN This feature is available since Firefox 47 behind the preference dom.details_element.enabled, defaulting to false, except on Nightly and Aurora versions (bug 1241750). Support for it is enabled … Read more

[Solved] how to order a HTML page by ?

You can use Bootstrap 4 which is the current version of CSS framework but not an only option. Without BS you will have terrible CSS code that might make your browser load slowly. It is just a contribution of CSS to browser and one of the factor why browsers load slowly (like 5%) Hence BS … Read more