Questions tagged as 'dom'

2
answers

bootstrapValidator.js with jsf does not work

My validation script using bootstrapValidator.js <h:outputScript library="primefaces" name="jquery/jquery.js" target="head" /> <h:outputScript library="primefaces" name="jquery/jquery-plugins.js" target="head" /> <script ty...
asked by 08.11.2016 / 15:10
1
answer

Difficulties in connecting Javascript with HTML [closed]

Some months ago I took a course to enter the job market as "Front End", I learned what was needed, but now to put into practice Javascript is complicated, because in theory I know a lot with Javascript, but at the time of connecting these things...
asked by 09.06.2015 / 21:09
1
answer

Option change of select element

I'm trying to add an option to a select: function add(){ var opt = document.createElement("option"); opt.value = "0101"; opt.text = "foo"; } This code works. My question is why when I remove the double quotation marks from th...
asked by 22.04.2015 / 15:31
1
answer

How to get a limited number of occurrences with DOM?

I'm doing parser for a website, I want to get some data from it, the data is structured as follows: <div class="interesses"> <span class="tipo" >Tipo 1</span> <span class="tipo" >Tipo 1</span> <span class="tipo...
asked by 27.03.2015 / 04:01
2
answers

How do I get the a tag inside a DIV using XPATH?

I'm trying to get the data from a DIV that contains the following structure: <div class="item" style="height:273px"> <a href="/arapiraca/anuncios/detalhes/159695-honda-cg-150-2008"> <img alt="" src="/i.php?w=148&h=119&am...
asked by 23.04.2014 / 16:32
1
answer

Browse and retrieve DOM objects via getElement without using WebBrowser

Is there any way to navigate web pages, create .Document.getElementById(" ") requests without the need to use the WebBrowser() component on my form? WebBrowser browser = new WebBrowser(); browser.Navigate("http://"); //[...] var...
asked by 20.09.2018 / 21:50
2
answers

How to add a class to an HTML element, through JavaScript. In my case, I need to add a class in the h1 element below

I need to add a class in element H1 var div = document.createElement("div"); var h1 = document.createElement("h1"); var p = document.createElement("p"); h1.textContent = "Me Ajuda"; p.textContent = "Preciso adicionar uma classe"; d...
asked by 09.04.2018 / 02:19
1
answer

Is it possible to get the value of the background-image attribute through xpath?

I have the following structure: <div class="xGh" style="background-image: url('name_file.jpg');"></div> Where do I need to capture: name_file.jpg I tried to use the solution featured in this response , but not work...
asked by 01.11.2017 / 11:57
1
answer

DOMDocument :: loadHTML () Error

Well I have the following controller where I get the information of a twitter user by username using DOMDocument::loadHTML() public function info($user = false) { if ($user === false) { Url::redirect('get');...
asked by 24.08.2017 / 00:08
1
answer

Read A tag that stays inside another in an .xml file with DOM API

Take data from a tag and then grab data from a child tag. For example, I have 2 tags that are repeated for the entire document, and I need to get data from both: <teste:dadosLote> <teste:numeroLote>380</unimed:numeroLote>...
asked by 30.04.2015 / 20:47