Posts by Mark Vaaz • 966 points
50 posts
-
1
votes1
answer36
viewsQ: Add links to text dynamically without changing element attributes
I’m creating a tool to add a link to the text if it matches one of the titles in the object links, I’m using replace and regex, the problem is that in this way it affects the attributes of the…
javascriptasked Mark Vaaz 966 -
0
votes2
answers44
viewsA: Problem with inheritance in css
You are directly altering the elements label, a without declaring their relatives, try: .button_profile button, .button_profile label, .button_profile a{ width:100%;…
-
4
votes1
answer57
viewsQ: How to identify the exact element that contains a specific word
To display only the element in which the searched word is found? In the example below he searches us filhos of container if the searched content is present in the element moves it to the saida. But…
-
1
votes1
answer108
viewsQ: Ways to check in real time if an object has been changed
I was looking for a way to check if an object was altered. I did it in "gambiarra" mode using setInterval to keep checking all the time if it was changed, but I don’t know if it would be a good way…
javascriptasked Mark Vaaz 966 -
10
votes4
answers985
viewsQ: Compare string with array to return the most compatible item
How to compare to string with the array and return whatever has more compatible words? Example: string = "uma frase qualquer aqui" array = ["frase qualquer", "uma qualquer aqui", "nada compatível"]…
-
0
votes1
answer285
viewsQ: How to edit an existing localStorage item in a blob url
How to edit an existing item in localStorage on an HTML blob page? The item comes from another page and is replaced on the blob page, but when you try to replace it, you end up creating a new one…
javascriptasked Mark Vaaz 966 -
0
votes0
answers124
viewsQ: How to load external script and ccs in a javascript blob url
I want to use temporary pages with the blob but it is not loading the external files, it is possible to do this with the blob? If not, there would be another way to make temporary pages without…
-
0
votes1
answer232
viewsQ: Analyze request and decide action, Chrome extension
How to manipulate a url request before opening the page on google Chrome? Searching I found how to block the request of a specific url, but I’m a little confused with how to manipulate the url and…
google-chromeasked Mark Vaaz 966 -
1
votes1
answer295
viewsQ: Move element from one div to another without changing the state
How to move the contents of a div to another div and maintain the status of the elements? Example: move a input of a div to another, without creating a new input and delete the old one, as in the…
javascriptasked Mark Vaaz 966 -
6
votes2
answers67
viewsQ: Is there a problem with using invented tags and attributes?
I was looking at some websites and noticed some tags that are not patterns like <div> <span> etc.... So I decided to test and saw that these tags work normally with css and javascript,…
-
4
votes1
answer244
viewsQ: Detect the URL where iframe is being displayed
How to detect the URL where the iframe is being displayed and performing a function if the page is being displayed at a specific URL. Example: when accessing the page https://www.../exemplo.html…
-
16
votes2
answers1087
viewsQ: How do I identify if a link was opened by an iframe in a new tab?
How to identify if any link originated from a iframe that I do not have access was opened in a new guide? I tried with document.getElementById("i").addEventListener("click", a);, but from what I…
javascriptasked Mark Vaaz 966 -
-1
votes1
answer32
viewsQ: Input cache when updating page
You can keep the information typed in the Input by updating the page only using front end? input { border-color: blue; padding:5px; font-weight:bold; } <input type="text" value="Manter este texto…
-
-1
votes1
answer26
viewsQ: Problem with HTML preview
I’m creating a HTML preview using javascript, everything was going very well using a div and a textarea. But when you start typing an element inside the textarea as <div.. I realized that the…
javascriptasked Mark Vaaz 966 -
0
votes2
answers161
viewsA: Resize two Divs at the same time with jquery-ui
You can use flexbox to maintain the div fixed without having to do so in the script, the examples below use a div as control to resize, only the first div is resized by script, to div follow…
-
1
votes1
answer201
viewsA: How to control height within a Grid?
You can use .container .marca, .meta{align-items:flex-end!important;} in marca and meta with !important Or instead of using .container div to set for all div, you put only the classes you want to be…
-
1
votes1
answer146
viewsQ: Edit the text of a div and her children by clicking
How to edit a text div or your children by clicking on the text, with Javascript or jQuery? Example, by double-clicking on Text here it is possible to change the text and/or delete it #alterar…
-
1
votes1
answer2970
viewsA: Open page in the same window
Use window.location.href='' in place of window.open('menu.html'), window.open will open a new window and that’s not what you want... You can use too window.location.replace('menu.html'), but this…
-
3
votes1
answer190
viewsA: Load javascript file only on one page
Create a condition for your scripts to run only at a specific url. if (window.location.href == "https://seusite.com") { //se a pagina corresponder, executar a função //sua função aqui }…
-
2
votes1
answer255
viewsA: Create custom interactive HTML banner Hover overlay style
Example using only css, by hovering over the size of the div daughter will be 100% of div father .container { position: relative; width: 25%; } .imagem { display: block; width: 100%; height: auto; }…
-
3
votes1
answer3088
viewsA: How to align a photo in the center of the page?
You can place the image inside a div define a class for that div and add margin:0 auto at the css to align the image in the center of the page or another div. Learn more about margin here Example:…
-
4
votes1
answer115
viewsQ: How to identify if an item has been removed from the page in real time
How to identify with Javascript, if the user has removed a div of the page by the, or element inspector, that is to say, if the id element no longer exists on page, perform an action. Simple…
javascriptasked Mark Vaaz 966 -
2
votes1
answer82
viewsA: Custom password window for the same page
You can put that div as overlay, it works the same way and you can customize with css and add new elements HTML to your liking. document.getElementById("concluir").onclick = function senha() { var…
-
2
votes2
answers324
viewsA: Onclick event in a list show an image
By clicking on an element in the list the image will appear in the div and the text will change, and when you click back again as it was. Explanation of the code commented on script with…
-
2
votes1
answer193
viewsA: pictures show description when you hover your mouse in a separate div
You can do javascript directly in the element or separately The descriptions are in a div separate In the element: .descricao, .descricaodois{ display: none; } <span class="item"…
-
1
votes1
answer33
viewsA: Problem to position the div
I changed the css of the menu removed the float:right and margin-right and changed margin-top for margin: 30px auto to center the div: body { background: url(skyblue.jpg); } .titulo { border: 1px…
-
4
votes2
answers673
viewsQ: How to identify if the user is at the top of the page?
When entering the site the page will be displayed from the top (by default), how to do to identify if the page is at the top using Javascript pure and jQuery? Examples: If the page is at the top,…
-
0
votes1
answer138
viewsA: Vertical scroll bar
Try to add overflow-x:hidden; in the element you want, or directly in the body body{overflow-x:hidden;}
-
0
votes2
answers153
viewsA: What to do when looping repeats in 2 different areas
The problem is in that part of the code: if (titu[0]) { for (var k = 0; k < titu.length; k++) { if (titu[k].value.trim() != '') { res.value += `<div>…
javascriptanswered Mark Vaaz 966 -
0
votes1
answer525
viewsA: Hide things from blogger pages
In blogger you can set conditions using <b:if cond='SUA-CONDIÇÃO-AQUI'> you can see the Data tags for layouts here Display in specific pages Display on the home page: <b:if…
-
0
votes1
answer1065
viewsA: Real-time html, css and javascript editors offline
Recommend: Visualstudiocode And also you can use the extension for google Chrome Web Maker it works offline is based on codepen.io and it is possible to save the project in files even when offline.…
-
4
votes1
answer910
viewsQ: Custom resize of a div
How to customize the resize so that it is possible to resize anywhere at the bottom of the div Example of the stackoverflow: .caixa { background-color: #444; /* margin: 100px auto; */ height: 100px;…
-
0
votes3
answers169
viewsA: How to know if Modal has active scrolling?
Using element.offsetHeight, element.offsetWidth , element.scrollHeight and element.scrollWidth, you can determine if your element has content larger than its size. Example: if…
-
1
votes1
answer75
viewsQ: Questions about Javascript looping
I noticed it’s used a lot var i and when is for/in and var x, why use these letters? I can use words in their place and it will work normally. I can put a for into another? That would cause some…
-
0
votes1
answer311
viewsA: Creating thumbnails only with the video link
You can use the following code to take a frame of a specific time and create one canvas with the thumbnail image, change the variable time for the second desired. var time = 6; var video =…
-
0
votes1
answer65
viewsQ: Fixed values and values in javascript looping
The code below creates new input and send the values to textarea, as the number of input is undefined it was necessary to make a looping to catch the values through the name, it works normally if…
-
0
votes3
answers1365
viewsQ: Creating html elements in javascript looping
I am very new with javascript and when it comes to creating loopings I get totally lost, the code below is to create the elements with each click and number the id and the text, but I’m having…
-
0
votes1
answer31
viewsA: How to reduce field width using css?
The script generates a iframe and you can’t change the look inside a iframe unless you have access to the css of the displayed HTML document, in this case it is not possible. Learn more about iframe…
-
0
votes1
answer89
viewsQ: How to remove javascript cloned elements
How to remove only the last cloned Ode? document.getElementById("add").onclick = function clonar() { var linha = document.getElementById("linha"); var clone = linha.cloneNode(true);…
-
0
votes1
answer1502
viewsA: How to make a button return to the home menu? Use html and css
I used a link with background and padding to create a start button and put / to indicate the start url .inicio { padding: 15px; background-color:#232323; color: #fff; text-decoration:none; } <a…
-
0
votes3
answers2556
viewsA: How to get the value of an input using the attribute name javascript
document.getElementsByName returns a Nodelist of elements, so it does not have the property .value Use document.getElementsByName("01")[0].value and t5[0].value…
-
2
votes2
answers499
viewsQ: How to redirect to a url using url parameters
I would like to get a url that is found right after red= and redirect to it in case it is blank not redirect. I used window.location.replace("") only to test the code. Example of where I’m going…
-
0
votes2
answers880
viewsQ: How to check if the url is true
I made this code simple to encode urls, but I would like it to work only with url checking if the protocol and hostname are correct or if the magnetic link is correct: http://www.exemplo.com/…
-
2
votes2
answers922
viewsA: Keep Hover on a button after taking the mouse out
Change that line btns[i].addEventListener("click", function() swap the "click" for "mouseover" var header = document.getElementById("div777"); var btns = header.getElementsByClassName("botao"); for…
-
0
votes1
answer168
viewsA: How to hide posts with a certain mark from the blogger homepage
Find: <b:include data='post' name='post'/> and trade for: <b:if cond='data:blog.url == data:blog.homepageUrl'> <b:if cond='data:post.labels none ( l => l.name == "Esconder" )'>…
-
0
votes1
answer168
viewsQ: How to hide posts with a certain mark from the blogger homepage
I have some posts that are just javascript, and on the home page appears javascript, I would like to hide posts that contain the tag "Hide" from the home page, what to do?. I tried to change it:…
-
-1
votes1
answer164
viewsQ: Each line in the "textarea" give a different return. Using form and javascript to create a code generator
The code below has the function of catching the link of each input form and add <a href="link" target="_blank">Link - ?</a> I wonder if it is possible to get the same result with just…
-
0
votes1
answer47
viewsQ: Javascript generating characters that are not present
The code below is in XML and is a form that is being used for convenience generating code HTML, everything typed in the input will be sent to textarea already with the HTML through javascript.The…
-
1
votes2
answers74
viewsQ: How to do when click "send" change the final text Form
I want the result of the content typed in the "Text" field to automatically exit between a preset text within the "Post Text" field". Ex: when typing exemplo in the "Text" field and click submit,…
-
0
votes1
answer75
viewsQ: How do I style this code with css and html? Blogger
The code below is for list blogger posts within a bookmark, if the post has the specific marker it will be shown in this list I wish I could change the appearance of how everything is displayed and…