span

Strip HTML tags and its contents

I'm using DOM to parse string. I need function that strips span tags and its contents. For example, if I have: This is some text that contains photo. <span class='title'> photobyile</span> I would like function to return This is some text that contains photo. This is what I tried: $dom = new domDocument; $dom->loadHTML($st...

Listen to chaning text in a Span Element

I have a span element which display's a changing duration value. <span id="vtime">--:--</span> Unfortunately, due to the JS API i am using these is no way to pick up that value other than to listen to the changing text in the Span element. I want to pick up the values and execute a javascript ajax command to fetch a value for the ca...

How to retrieve an input element and its surrounded span?

For <span id="" ...> <input id="" ...> Is there any way to retrieve span id? input element is embedded within span? ...

create a span and inject image to it

i am new to mootoll what i want is to create a new element span and injuct image to it. i write following code but not working var newElementVar = new Element('span', {'id': 'id_namekhan','text': 'I am a new div'}); var my_img = new Element ('img' , {'src' :'uploading/'+json.get('fpath')+'' , 'style' : 'width:50px; text-ali...

SPAN vs DIV (inline-block)

Hi, Is there any reason to use a <div style="display:inline-block"> instead of a <span> to layout a webpage? Can I put content nested inside the span? What is valid and what isn't? Thanks! It's ok to use this to make a 3x2 table like layout? <div> <span> content1(divs,p, spans, etc) </span> <span> content2(divs,p, spans, etc) ...

Span cursor style on empty areas. IE8 problem

Hi I have a span with the following style: margin: 5px 0; padding: 2px; cursor: pointer; display: block; width:100%; background-color:Blue; This works fine with IE6, IE7, FF3 and Chrome, but in IE8 the cursor is changed only in the parts of the span that have text (in other browsers the whole span has the cursor changed). Any idea o...

Text limit inside <span> XHTML?

I would like to limit the text inside a tag so when I add a new article in my ASP admin panel, it only has 350 characters max. How do I go about doing this? ...

How do I choose between innerText or nodeValue?

Hi, When I need to change a text within a span element, which one should I use and what is the difference: var spnDetailDisplay=document.getElementById('spnDetailDisplay'); spnDetailDisplay.innerText=sDetail; or var spnDetailDisplay=document.getElementById('spnDetailDisplay'); spnDetailDisplay.childNodes[0].nodeValue=sDetail; ...

span css help IE7 - How can I set the width?

I have this CSS and I cannot get the width set on a span element. Any ideas what I am doing wrong? #address-readonly { margin-left:150px !important; padding-left:100px; } I am using this in 2 areas in my application. Here is some of the HTML <tr> <th colspan="2">Address Details</th> <th><span id="address-readonly" class="a...

Html Agility Pack ends-with does not work

Hi everyone! I tried to use ends-with in Html Agility Pack in the following mode: //span[ends-with(@id, 'Label2')] and //span[ends-with(., 'test')] , but it does not work. All other functions, like starts-with and contains works well. Can anyone help me? Tanks in advance! ...

javascript or css trick to group spans without separating them when one reaches the edge of browser

so we have three spans and a parent span <span id="parent"><span1></span><span2></span><span3></span></span> when one of the spans reach the right end of the browser, it moves down, leaving its siblings behind. Are there any tricks here on how to keep these spans together that if one moves down, the others will follow? Thanks. ...

Surrounding all content in div with span - why?

In code we got from a "psd2html"-service, I see a lot of spans surrounding the contents of div-tags. I know the difference between spans and divs, but I cant figure out why the code looks like this: <div class="forgot-password"> <span><a href="/forgotpassword/">Forgot password?</a></span> </div> ... <div> <span>Sign in</spa...

add / remove class on span inside a tag

I've tried various options but can't get the silly thing to work. How do I get the span inside an < a > tag within an < li > to change class to "active"; then remove it when another < a > is clicked? <ul id="dumb"> <li><a href="#">Something<span></span></a></li> <li><a href="#">Something Else<span></span></a></li> </ul> Clicking the <...

How do I access a SPAN element using the PREV function in JQuery?

When a button is clicked it needs to look before its ocurance and find a specific span tag. Unfortunately it is either not finding the tag or not changing it's contents. This is the code that doesn't work. $(this).prev("span[id*=CommentText]").hide(); I can set the colour during the load event but when the link is clicked it won't m...

Lucene SpanNearQuery partial matching

Good day, Given a document {'foo', 'bar', 'baz'}, I want to match using SpanNearQuery with the tokens {'baz', 'extra'} But this fails. How do I go around this? Thanks, Franz Sample test (using lucene 2.9.1) with the following results: givenSingleMatch - PASS givenTwoMatches - PASS givenThreeMatches - PASS givenSingleMatch_andExtra...

a span floated right within a div - why a new line in IE?

I have 1 span within a container div. I want the span floated to the right. The content within the div and the span should be on one line. In Firefox, that's how it displays. But in IE, the span is displayed on a new line: http://i48.tinypic.com/etzg5f.png Why do the browsers display the content differently? ...

span tag onclick to call a code behind method

Hai guys, How to make a span tag behave exactly like an asp:button (ie) using its onclick method to call a codebehind method.. <span onclick="MyPageMethod()"></span> I know linkbuttons can do it for me,but my question is can span tag do it for me? ...

Have you ever seen usage of <span> like this?

<span content="2010-01-08 21:35:12" property="dc:date"> What does it mean? ...

Inline parsing in BeautifulSoup in Python

I am writing an HTML document with BeautifulSoup, and I would like it to not split inline text (such as text within the <p> tag) into multiple lines. The issue that I get is that parsing the <p>a<span>b</span>c</p> with prettify gives me the output <p> a <span> b </span> c </p> and now the HTML displays spaces between a,b,c, which ...

C# asp.net: How to remove span tag from WebControl when rendered.

When using an asp.net CheckBox (and in out case, inherited from a CheckBox) it renders a span around the checkbox input control, this span control is affecting jQuery scripts. Is it possible to remove this span when rendering? ...