As the title says, i'm trying to get the inner text of an attribute element.
Essentially, I can get the attribute href from it, but when using inner text on a element, it returns a null value.
Is there some way around this issue? I'm not sure what is causing it .
brand = item.querySelector("div>div>div>div>div>div>a").innerText;
Is the code in question,
and what I'm trying to get the value of.
Yin Yam - Asian Grocery
also tried this.
brand = item.querySelector("div>div>div>div>div>div>a").textContent;
brand = item.querySelector("div>div>div>div>div>div>a[class*='merchant-name']").innerText;
This answer, based on a comment below the question, worked like a charm :)
Related
In crystal report:
right click on a field -> edit formula. I can add some html elements.
example
<u>
IF {myobject.myfield} = "something" THEN
blabla1
ELSE
blabla2
</u>
Is there a way to add a css font style?
I would like to underline the whole line. Not only where there is text
You can use something like this:
IF {myobject.myfield} = "something" THEN
<u>blabla1</u>
ELSE
</u>blabla2</u>
But that would require turning on the 'Interpret as HTML option.
Why not simply format the formula object with underline?
Even with a CSS style, it will still only underline the text and will not extend the underline beyond.
I see two other ways to accomplish this though.
Make the field the entire width of the area that you want to be underlined, then add a bottom border to the field or text object.
Use the line drawing tool to add a horizontal line to the report where it is needed.
It doesn't give a solution to the mentioned problem. But it give a solution to the problem that leads to this problem, i.e., underline the whole line.
select the feld, click on underline. In "edit formula", add space(N) before each line break. With N is a big number
I'm hoping I don't need to provide a repro demo here if this question can be answered right away. I'd like to remove all div elements under the parent div with id="daterangescontrol" everytime I upload a file to my Shiny app. So my code is like this:
removeUI(selector = "div#daterangescontrol div")
FYI under div#daterangescontrol, there are div#daterange1, div#daterange2...div#daterange(n) generated dynamically depending on the number of columns in the dataset, which can be converted to Date. My objective is to remove all these div children when a new file is uploaded (new dataset). However. the above line of code can only remove the first child, e.g. div#daterange1. I wonder whether it's because I didn't use the right syntax for the selector. I'm not quite familiar with css. Would anyone please help? Thanks!
EDIT:
The demo code is provided in my other question post:
How to validate date range input in Shiny
please check removeUI in observeEvent(input$file).
removeUI("#daterangescontrol > div", multiple = T)
I am still stuck on a highlighting problem in IE 7/8. I have tried applying CSS from this question, changing the onselectstart event to return false, adding the attribute unselectable="on", and anything else I could find here on SO.
Then I came across this response to this question:
Once an element is unselectable, users cannot select from within that
element. However, they are still able to select either the text or the
box of the element by dragging into it from within another element
which is not unselectable.
I have tried to work around this by cancelling various events on
myElement (ondragenter, oncontrolselect, onmouseenter,
onselectionchange...), it didn't work.
This is exactly what I am trying to do. I have a raphael canvas object that the user can drag in order to draw. However, if they leave the canvas I do not want text in "outside" elements to be highlighted. I was wondering if anybody has found a hack for the quoted problem. I'm only having this problem in IE 7/8.
use JQUERY
$('#dragelement').onMouseDown(function(){
//YOUR CODE
});
I am having a weird problem with CSS.
I am trying to achieve the following.
I can have people search for a name or a part of a quote in a database and I would like to display this into a box (in this case a form ,which is easy for styling).
Problem is, the total box should have a gradient green color, but not the entire fetched data is retrieved with a green layout.
I have debugged and it seems to work just great:
I have both echo and alerted my output and it is just a normal form with table rows in it..
Here's the result outcome:
pastebin.com/AZAv6bpX (broken)
Here's my css:
pastebin.com/NATwyki6 (broken)
Here's what it looks like:
Notice the table rows still continue-ing after the gradient has stopped.
I have adjusted the table entry margins, for the div (results) they are placed in. So I am 100% sure the outcome is as I want it.
So basically I got:
code from pastebin here
And this weird layout.
Can anybody please help me out?
Either take your float:left off of your table or set overflow:auto on your form.
jsfiddle link
Because your form contents are set to float, they are taken out of the flow, and so your container will not wrap around them.
The simple fix for your css would be to add in the following;
form br { clear:both }
and then make sure that you fix the final </br> in your form to be <br /> instead.
I'm trying to use a custom Text component to show a series of comments. I got
the original idea from:
http://www.eonflex.com/?p=40
I've got the base case working but I am stuck with 2 problems I cant seem to
figure out:
Since I am drawing around the text, the actual height of each bubble is
greater than that of the Text field, as a result, the last bubble is always
chopped off. I have tried explicitly overriding the height getter, and adding
some padding, but I cant seem to get it right. You can see an example here:
http://test.lambandtunafish.com/bubbles/CommentTest.swf
In my layout, I have 2 VBoxes (one nested inside the other). The first vbox
shows a form where the user can enter a comment, and the second box has all the
comments. In order to ensure that the scrollbars only show up on the second box,
I set minHeight="0" on the nested VBox, but then for some reason, some comments'
text is shifted to the right. You can see an example here (look at the first
comment): http://test.lambandtunafish.com/bubbles/CommentTest-minHeight.swf
Rather than posting the code here, I've provided some links:
Container: http://test.lambandtunafish.com/bubbles/CommentTest.mxml
Bubble: http://test.lambandtunafish.com/bubbles/CommentBubble.as
If anyone has any ideas, I would appreciate it.
Thanks!
Have you considered adding padding to you VBoxes?
<mx:VBox id="vBox" verticalGap = "100"/>
There is a nice example here