[Solved] How can my html not read my js [closed]

I would assume that you want to load your javascript file from a relative path (relative to your html page) rather than an absolute path. Absolute paths start with a / (slash). Try <script src=”https://stackoverflow.com/questions/40283606/js/script1.js”></script> To debug it right click your page and click on the javascript src value. A page with the file content … Read more

[Solved] Popup text box in HTML with javascript

Does this meet your requirements? function showPopup() { document.getElementById(‘2’).style.display = “block”; } function syncValueWith2() { document.getElementById(‘2’).value = document.getElementById(‘1’).value; } function syncValueWith1() { document.getElementById(‘1’).value = document.getElementById(‘2’).value; } <textarea onkeyup=”syncValueWith2()” id=”1″></textarea> <br> <textarea onkeyup=”syncValueWith1()” id=”2″ style=”display: none;”></textarea> <input type=”button” value=”Show Popup” onclick=”showPopup()”> solved Popup text box in HTML with javascript

[Solved] How do i automatically add the h1 of a page to an ahref link on that page [closed]

It can be achieved like this: JSFIDDLE HTML <h1>Web Developer</h1> <a href=”https://stackoverflow.com/questions/32713259/example.com/?Question12=”>job link</a> JQUERY var link = $(“a”).attr(“href”); link = link+$(“h1″).html(); link = link.replace(/\s/g,”%20”); $(‘a’).attr(“href”, link); 7 solved How do i automatically add the h1 of a page to an ahref link on that page [closed]

[Solved] website upload file to directory [closed]

Try this: <form id=”form_request_file” method=”post” action=”index.php” enctype=”multipart/form-data”> <table align=”center” width=”525″ border=”0″> <label for=”uploaded” class=”control-label col-sm-2″>Upload File</label> <input id=”uploaded” name=”uploaded” type=”file”/> <input value=”Submit” name=”submit” type=”submit”/> </form> <?php if (isset($_POST[‘submit’])) { if (isset($_FILES[‘uploaded’])) { $path = “uploaded_docs/”; $file_name = basename($_FILES[‘uploaded’][‘name’]); $target = $path . $file_name; if (move_uploaded_file($_FILES[“uploaded”][“tmp_name”], $target)) { echo $file_name . ” was uploaded”; } else … Read more

[Solved] what does #someDiv mean? [closed]

‘#someDiv’ is a CSS3CSS selector which is semantically equivalent to getElementById(‘someDiv’), in that it will select the element with ID ‘someDiv’. So: document.getElementById(‘someDiv’) == // bracket notation will return a DOM element $(“#someDiv”)[0] // leaving it out will return a jQuery object $(“#someDiv”) 4 solved what does #someDiv mean? [closed]

[Solved] Javascript how to split() multiple string or values? [closed]

Do you want to remove those characters or split on those characters to form an array? Your question is confusing and you should consider re-phrasing it. If you want to remove them: console.log(“{99}”.replace(/[{}]/g, “”)) /* “99” */ If you want to split on them: console.log(“{99}”.split(/[{}]/g)) /* [“”, “99”, “”] */ solved Javascript how to split() … Read more

[Solved] Can jQuery css get inline styles also?

As people have said in the comments, this question is something that you might have easily found out for yourself. Since we’re here anyway though, here’s the answer: The .css() function can read both inline styles and separate styles (via link or style tags), but when it does write styles (when it has a parameter), … Read more

[Solved] Write a js script in a div

Don’t use document.write, it does not do what you think it does. What it does not do is write some data at the end of the document. What it does instead, is pipe data into the current write stream. And if there is no write stream, it will make a new one, resetting the document’s … Read more

[Solved] Change the sequence of div an span in this Javascript

First you need to revert your js file to unminify: ! function(e) { “use strict”; var t = e, i = t.document, o = “cbinstance”; var n = { get: function(e) { return decodeURIComponent(i.cookie.replace(new RegExp(“(?:(?:^|.*;)\\s*” + encodeURIComponent(e).replace(/[\-\.\+\*]/g, “\\$&”) + “\\s*\\=\\s*([^;]*).*$)|^.*$”), “$1”)) || null }, set: function(e, t, o, n, s, r) { if (!e || … Read more

[Solved] Requesting content without reloading the page [closed]

Try this: http://shaquin.tk/experiments/select-ajax2.html. HTML: <select name=”select-choice” id=”select-choice”> <optgroup label=”News”> <option value=”feature”>Feature</option> <option value=”current”>Current</option> <option value=”research”>Research</option> </optgroup> <optgroup label=”Archive”> <option value=”archive”>Archive</option> </optgroup> <optgroup label=”Video”> <option value=”video”>Video</option> </optgroup> <optgroup label=”Submit”> <option value=”story”>Story</option> <option value=”event”>Event</option> </optgroup> </select> <div id=”article”>Please select an article to view.</div> JS: var origText=””; $(document).ready(function() { origText = $(‘#article’).text(); $(‘select’).on(‘change’, changed); }); function changed(e) { … Read more

[Solved] How can i Store HTML arrays into Mysql using PHP in each columns

<SCRIPT language=”javascript”> function addRow(tableID) { var table = document.getElementById(tableID); var rowCount = table.rows.length; if(rowCount < 10){ // limit the user from creating fields more than your limits var row = table.insertRow(rowCount); var colCount = table.rows[0].cells.length; for(var i=0; i <colCount; i++) { var newcell = row.insertCell(i); newcell.innerHTML = table.rows[0].cells[i].innerHTML; } }else{ alert(“Maximum Number of Books is … Read more