Jump to content

elcaiaimar

Members
  • Content Count

    39
  • Joined

  • Last visited

Community Reputation

0 Neutral

About elcaiaimar

  • Rank
    Newbie
  1. Hi, I having problems when I execute (from a JS file) an onclick function by the class that is into an append of another JS file. My code is this: JS File1: var user_tmpl = $('<div />') .addClass('user') .append('<strong/>').find('strong').addClass('titulo').html(item.titulo) .append('<a href="#buscamedioModal" role="button" class="btn btn-danger deletebuscamedio" data-toggle="modal" id=' + item.gid + ' data-name=' + item.titulo + '>Eliminar</a>') .parent(); JS File2 (call): // Configuraciones Generales var boton_eliminar
  2. Hello, what it happens is that when I try to save the attributes on scopes, they are undefined. There aren't errors in my browser console. After your answer, How could I get the file information and save it in scopes. My main problem is with javascript. Thank you very much!
  3. Hello everybody, I'm new in angular so sorry if my question is ridiculous. I have a drag and drop file area and when I put a file I put his details (attributes: name, size, type) on inputs disabled because I don't want that users can change them. All of that is a form, so I want to save this with angular in scopes. Here my code: <div ngf-drop ngf-select ng-model="files" class="drop-box" ngf-drag-over-class="'dragover'" ngf-multiple="true" ngf-allow-dir="true" accept="{{acceptSelect}}" ngf-pattern="pattern" required>Arrastre y suelte su archivo aquĆ­</div> <div ng
  4. Hello! I have a map in my website and when I click on it, if there is a feature, it shows its information. This information is written by an innerHTML and currently it looks like that: if (feature) { var objeto = feature.getProperties(), propiedades; var propiedades; content.innerHTML = ""; for (propiedades in objeto){ content.innerHTML += propiedades + ':' + objeto[propiedades] + "<br />"; } return container.style.display = 'block'; } else {
  5. Hello, I've a problem when I try to send variables (django variables) from html to javascript. My variables contain coordinates, I mean, they are decimals, and when I receive them in the javascript and I show them in console, I've got only the no decimal part of the coordinates. This is my code: Template: <td><button onclick="window.to('{{p.coorx}}','{{p.coory}}')" data-coorx="{{p.coorx}}" data-coory="{{p.coory}}">Ver Pozo</button></td> Javascript: window.to = function(coorx,coory) { var coorx = parseFloat(coorx); var coory = parseFloat(coory); console.log(co
  6. Now, I click a button to remove db registers so I don't want to click another button to execute the map script. I think that the best way would be to click in the delete button, then shows an alert saying removed and automatically execute the script. For that, I've thought in execute it from the code above, if it was possible.
  7. Ok, thanks for your clarification. Just a question, How could I run the script from my code? I've seen that you can do it with events but I dont want to use any button to do it. Thank you again!
  8. Hello, I'm trying to reload only a script instead of entire page. And I want to apply it in an ajax script. How could I do that? My web contains a map(script of openlayers) and I put data into the map. So when I remove this data by a button I would like reload only the map. Here is my code. It only shows an alert if the object has been removed or not: // Autor: @jqcaper// Configuraciones Generalesvar nombre_tabla_pozos = "#tabla_pozos"; // idvar nombre_boton_eliminar_pozo = ".deletepozo"; // Clasevar nombre_formulario_modal_pozo = "#frmEliminarpozo"; //idvar nombre_ventana_modal_pozo
  9. That is! It works! Sorry but I didn't find the solution. Thank you very much!
  10. Sorry, but I'm trying everything and don't get anything. Can you tell me how you would do it with my code? I'm still a newbie in JS Thank you for your fast answers!
  11. I've tried to put that: var myVar = 1;var tramosSource = new ol.source.ServerVector({ format: new ol.format.GeoJSON(), loader: function(extent, resolution, projection) { var url = 'http://localhost:808...wfs?service=WFS' + '&version=1.1.0&request=GetFeature&typename=cia:tramos&PROPERTYNAME=gid_cuenca_id&CQL_FILTER=gid_cuenca_id="myVar"&' + 'outputFormat=text/javascript&format_options=callback:tramosloadFeatures' + '&srsname=EPSG:3857'; $.ajax({ url: url, dataType: 'jsonp' }); }, projection:
  12. Hello! I'm working in a viewer with openlayers and with geoserver and I want to filter layers by a variable. I'm not going to ask anything about geoserver nor openlayers. My problem is about put variables in a url. To obtain geoserver layers from openlayers you have to call them by a url and to filter them you have to use CQL_FILTER. (Filter to shows only what the user wants). My viewer works fine if I put a simple value to filter: (gid_cuenca_id is a db column) var imbornalesSource = new ol.source.ServerVector({ format: new ol.format.GeoJSON(), loader: function(extent,
  13. Hello, first of all, thank you for your answer. I've been looking for examples and I've found a code. I've tried to change it to adapt it to my URL but I always receive the same: null Could you help me with my URL? http://localhost:8000/edicioncuenca/obra=2/cuenca=1/ function getParameter(paramName) { var searchString = window.location.search.substring(1), i, val, params = searchString.split("/"); for (i=0;i<params.length;i++) { val = params[i].split("="); if (val[0] == paramName) { return val[1]; } }return null;var cuenca=getParameter("cuenca");alert(cuenca); Than
  14. Hello, I'm working in a website development with django and I need to send a parameter to a script. On my web, I send parameters through the URL on this way: I put the href in which {{obra.id}} is the object received from views.py href="/edicionobra/obra{{obra.id}}/"> At the url I take that object as parameter to go to one page or another, according its value, url(r'^edicionobra/obra(?P<id_obra>.*)/$','demo.apps.obras.views.EdicionObra', name='edicionobra'), However, I would like to take that parameter to use it in a script, but I don't k
  15. I fix it! I put css('display', 'table-row'); and it looks well!
×
×
  • Create New...