Questions tagged as 'javascript'

2
answers

How to add parameters in action html?

Now I just asked about the topbar links on my site. Well, now the problem is another: add parameters to a url. Here is the code: <script type="text/javascript"> function web(){ document.form.action = "http://www.google.com.br/search?q=";...
asked by 04.10.2014 / 19:22
1
answer

Where am I going wrong in this dice game?

I did this little dice game just to exercise link (if possible open in Dreamweaver or another similar editor, which in JSFiddle complicates ) The only problem is that I can not display the hit score of the 2 players. Where am I going wro...
asked by 12.10.2014 / 08:18
2
answers

How do I refresh the page after uploading images?

I'm using the following codes to upload and display images: Here, the HTML: <form id="formImage" style="display:none"> <input type="file" id="fileUpload" name="fileUpload[]" multiple onchange="saveImages()"> </form> <d...
asked by 15.10.2014 / 02:42
1
answer

Appear menu with ng-click + ng-class

I'm trying to make a side menu that appears when the user clicks a button, using a .is-visible class <button ng-click="visible=!visible;">Click me to open the menu!</button> <div ng-class="{'is-visible':visible}" class="menu">...
asked by 22.09.2014 / 19:00
2
answers

Make string uppercase before dash

How can I convert a string to uppercase before a dash (-) as it is typed using jQuery / JavaScript? Example text: "ab- Hello world cx- Okay?" Output: AB- Olá mundo CX- Tudo bem? // $('textarea').keyup(function(){ $(this).val( ?...
asked by 24.09.2014 / 14:20
2
answers

Date picker opens alone when changes neighbor input

Good morning, I have the following code: var maxDate = new Date(); maxDate.setDate( maxDate.getDate() + 364); $(".dtpBloqueio").datepicker( { numberOfMonths: 2, dateFormat: 'dd/mm/yy', maxDate: maxDate }); When you change an in...
asked by 03.09.2014 / 15:43
1
answer

Drag & Drop JQuery UI how to hide Div after drop?

I'm trying to do the following operation, I have 3 divs a Droppable and 2 Draggable, I want that when I drag one of the draggables and drop on top of the droppable Draggable is hidden from being displayed on the screen. <div id="" class="dro...
asked by 24.05.2014 / 13:31
1
answer

Use of callback to work with asynchronous javascript

Following the code below, is there a better way to call the sendEmail () method after receiving "success" in ajax called by the gravaVisita () method? Notice that I used callback as a solution to this problem. There are 2 "js" files: The...
asked by 23.05.2014 / 22:22
1
answer

How to do a select using Angularjs?

I'm trying to make a select field in my view and I'm using the framework Angular.js, but I'm not used to working with it and I'm not able to create the function in controller . Here is an example of the code I tried to make that did not wor...
asked by 20.05.2014 / 18:29
1
answer

Form Validation with indexOf ()

I know that you can validate with HTML5 or CSS, but it's just out of curiosity: I found a code on the net that verifies that the syntax of a typed email is correct: if(document.dados.email.value=="" || document.dados.email.value.indexOf('@') =...
asked by 05.11.2014 / 07:59