Questions tagged as 'javascript'

2
answers

Changing index.jsp dynamically without reloading the page

In my index.jsp I have a table that in one of its cells and an iframe that displays one of my jsp, and depending on the type of action taken by the user it changes which and the page displayed inside the iframe, I would like know if you can do t...
asked by 19.11.2014 / 14:45
1
answer

Javascript only works if placed directly on the page

I have some functions and they only work if placed in the same file where the code is that will use them. Separate with: <script type="text/javascript" src="js/funcoes.js"></script> Functions: $(function($){ $('#enviar')...
asked by 11.12.2014 / 19:39
1
answer

Problem passing parameters to function

I have the following JavaScript code to which I want to pass parameters from a onClick event, but they are not recognized: HTML <a id="addplaylist" href="javascript:void(0);" onclick="Addplayer(true,'', '', '', 'public/playlist/...
asked by 21.12.2014 / 00:07
2
answers

Add methods to plugin namespace without selector

I'm creating a plugin in js and need to add some methods to this plugin. This is the base of the plugin so far: (function ($) { function jarbas(params) { ... } $.fn.jarbas = function (params) { // cria fu...
asked by 22.12.2014 / 14:32
1
answer

Modal that opens only the first time [duplicate]

I'm new here, I have a modal that opens automatically, I wanted to make it open only the first time for the user. I saw you have a way to do with cookies. insira o código aqui <!DOCTYPE html> <html> <head> <meta name="...
asked by 28.06.2018 / 02:10
2
answers

Ignore reading the first input

How do I ignore the reading of the first value of an array? I do not want to remove the same, just want to display, do not appear the same: I've already done this: document.querySelectorAll('.form .form-control').forEach(function (a) {...
asked by 02.07.2018 / 13:29
1
answer

Remove html tag, but keep br Javascript

I'm having second thoughts about removing html tags, but keeping only <br> This code removes the tags, but I would like to keep <br> and maybe other tags. function removeHtmlTag(strx,chop){ if(strx.indexOf("<...
asked by 29.06.2018 / 20:10
1
answer

Best way to find out if the user is online / offline

Well, I have the login and home pages, when I log in the user is set as online in the BD and is taken to home, at home, by clicking the logout button the user is set as offline and taken to login. So far so good, however, when the user clicks...
asked by 08.07.2018 / 15:46
3
answers

How not to activate js inherited function?

As you can see in the example below, I have a collapsible and in the initial structure I have a button / link (sign of the example), I would like to be able to push this button and not activate the function that expands the collapsible link...
asked by 16.07.2018 / 14:28
3
answers

Anyone know me explain the following situation:

pessoa = { nome: 'leandro', idade: '2' } for(x=0;x<pessoa.idade;x++){ console.log('Ola mundo'); // ele repete 2 vezes "Ola mundo" na tela } The question I have is that I thought that javascript differed in string numbers, but...
asked by 20.07.2018 / 02:29