html

When strip_tags() Burns a Haystack

I've got a list of websites for each US Congress member that I'm programmatically crawling to scrape addresses. Many of the sites vary in their underlying markup, but this wasn't initially a problem until I started seeing that hundreds of sites were not giving the expected results for the script I had written. After taking some more tim...

How to get the absolute url of <img /> in PHP?

The src of the <img> is known,as well as the url of the target webpage,like http://test.com/directory/hi.html,how to implement the general function to retrieve the absolute url of the image? ...

Alternatives to Faux column on a single centered colunmn

Hi, I am working on a centered 2-column layout. Both halves of the centered column stretch equally because I have a footer beneath it. How can I make the center column - at its shortest - no shorter than the browser? What are alternatives (using CSS only if possible) to the faux column technique? Code welcome. Thank You. ...

Convert a HTML Control (Div or Table) to an image using C#

Hi guys, Is it possible to convert a Html Control to an image in C#? Is there any C# method where I can pass the Html Control object and return an image of that html control? Is this possible, any suggestions? ...

Setting title of a page

I have an ASP.NET application that uses a master page configuration. What I'd like to do is two things. How can I programmically set the title in the child page (as in the text in the <title></title> tags? And, If the child page does not set the title, I'd like the master page to automatically detect this and set a default title. Any...

Sentence Spacing

What is the best way to present the additional spacing that should come between sentences (using [X]HTML+CSS)? <p>Lorem ipsum. Dolor sit amet.</p> ^^ wider than word spacing Since HTML and XML both require whitespace folding, the above two spaces must behave as a single space. What options are there? There are a few o...

insert tags in ElementTree text

I am using the Python ElementTree module to manipulate HTML. I want to emphasize certain words, and my current solution is: for e in tree.getiterator(): for attr in 'text', 'tail': words = (getattr(e, attr) or '').split() change = False for i, word in enumerate(words): word = clean_word.sub('', wo...

Simple AJAX code not being recognized

Hi, I'm trying to begin learning AJAX, and I've already hit a little stump. So I'm starting simple and just trying to get an alert to pop up showing the length of the string the user types into a text field. The HTML: <form action="/scripts/addemail_fb.php" method="post"> <input type="text" name="email" value="Enter your email here!" /...

Div with a Header

I want to create a <div> which has a Label/Header displayed in Capitals letters. The <div> is 250px wide. Inside the <div>, I will place another <div> which will contain controls. This inner <div> should be center aligned and the outer <div> should automatically increase its height to accommodate the controls height. The outer <div> an...

How to get rid of HTML tags

Hi, I am a little stuck and need help. So it goes like this. I have a site where the count of comments on a particular article comes from comment module. the HTML tag on it is displayed which looks something this (<em>1</em>). I have recently upgraded my site 5 to 6. Everything else works fine apart from this. Please Help. Thanks!!! ...

Is there something like &nbsp for ' ?

The system I'm using has a bug dealing with ',is there a html format for '? Is there a PHP function to look up this ? ...

How to get a web page input datas?

Am very New to Web Page Development. In my website i have the help page like Name, Email ID, Contact No, Comment and Submit Button Suppose i entered the data in the help page , then i press submit button means that entered data's should sent to the email account For Example Help Page Name - Raja Email - [email protected] Contact - 98763...

Methods for preventing search engines from indexing irrelevant content on a page

I'm looking for ways to prevent indexing of parts of a page. Specifically, comments on a page, since they weigh up entries a lot based on what users have written. This makes a Google search on the page return lots of irrelevant pages. Here are the options I'm considering so far: 1) Load comments using JavaScript to prevent search engin...

URL Hash modification after document.write()

Hi!, I download via jQuery AJAX a whole html webpage. I want to replace the content of the current page with the one downloaded via ajax. I do it with document.write(). It doesn't work correctly because whenever I try to modify the hash, the webpage is reloaded. I know in IE it it necessary an iframe, but that is not the problem, becau...

JQuery and RadioButtons question

Hi, I have a table containing radiobuttons (i.e. 3x3 grid) and I want when I select one of them the containing the radiobutton to change colour. Following this example I did this <table class="table-name"> <tr> <td> <span>Some text</span> <input type="radio" name="some-name" /> </td> <td> <span>Som...

Override TAB inside a Browser

If I'm typing text in a input field and press ENTER the default behavior of all the browsers I know is to submit the form, however if I press ENTER inside a textarea a new line is added. Is there any way to mimic this behavior (indent, not submit the form) whenever I press TAB inside a textarea? Bespin seems to do it, but in a canvas el...

OOP Diamond problem for php files - How should I deal ?

I have file A.php that includes file B.php and C.php. Now both B.php and C.php includes D.php. D.php has some div tags, javascript functions/variables which all conflict. :( I could copy paste code from D.php to B.php and C.php and rename functions/div tags. Is there a better solution that I could use ? ...

How to handle Frameset, POST & Re-Direct

I am using FrameSets to divide screen into two panes. The left pane displays links whereas the right pane displays the actual pages. I want to know how to handle the issue when an entry Form is opened on the right-pane and submitted. When I submit a Form, the action is passed to another .php file, which saves the records into MySQL data...

Rounded (image) corners using jQuery

I'd like to apply rounded corners to several blocks using the single image (above). I know there're corners plugins available but I need to use images for max compatibility. So, as I know, the only way is to create wrappers around the blocks to apply the corner images: <div class="wrapper-4"> <!-- top-left corner --> <div class="wra...

How to POST without using Submit?

I want to post the Form but don't want to use the Submit method. If I use JQuery, how to handle the Form input controls? ...