html

Find links to images in HTML (incl. outside of common tags/attributes)

I'd like to find (using javascript) all of the references to image links on an HTML page. Since I'm also looking for image references that may not be displayed, or are in unknown attribute types, simply looking for image tags or src's etc. isn't enough. As such, I haven't yet found a simple method using an html parser to do this. Ha...

Expanding HTML forms using Javascript

I have a simple HTML form that asks a user to input their name, SKU, quantity, and comments. This is for a simple inventory request system. <html> <body> <form id="myForm" method="post"> <input type="submit"> <br>Name: <input type="text" name="form[name]"> <br>SKU: <input type="text" name="form[SKU1]"> ...

html redirect issue

I am using the following simple javascript for redirection. However, it works in some machine but not others. Does anybody know why? Is there a better way to make sure every machine works? I also tried <meta> redirect it has the same issue. <script type="text/javascript"> <!-- window.location = "http://mypage.html#instruction" //--> </s...

Google Chrome renames file .xml to .download

hello. i have this very simple download page to get an xml file. the script works ok in firefox/IE. but chrome renames the extension of the file to ".download". and this happens only to .xml, when you use another extension like .txt it does it without problems. the body of the html is this: <body> <a href="down.php">descarga</a> </bo...

How to select an html element according to its child node attribute in css?

For example, in the following snippet: <tr> <td align="center">123</td> <td class="someclass">abc</td> </tr> I would like select all <tr> elements that have a <td> with the class="someclass". I am wondering if this is possible in css, without using javascript. Thanks. ...

Stylesheets for content?

Forgive my ignorance since this seems like its something I should know by now. I know I could make a stylesheet that will allow me to make changes in my CSS throughout several pages that use the CSS. I also know that you can make an external javascript file that could contain functions you want to reuse. But lets say I had pure HTML con...

Regular expression that removes attributes from tags

What I'm interested in is a regular expression that will accept HTML input and remove all attributes inside the tag while leaving the tag intact. For example I want this... <p class="test" id="TestParagraph">This is some test text right here.</p> To become this... <p>This is some test text right here.</p> Any help would be much app...

XAMPP won't allow me to send email.

So, I'm trying to get my html form hosted on the company I work for's intranet to be submitted to several email addresses using PHP. I am testing the code using XAMPP, and everytime I try to submit, I get this error: *Warning: mail() [function.mail]: Failed to connect to mailserver at "172.23.38.10" port 25, verify your "SMTP" and "smtp...

getting image with php and displaying in html

i know it is so simple problem but eventually it isn't working and i am a newbie. in the index.html, a swf sends an image and displayImage.php(below code) should display it on another page. why isn't it working?? <?php if ( isset ( $GLOBALS["HTTP_RAW_POST_DATA"] )) { $no=0; while (file_exists("images/$no.jpg")) $no++; header('Cont...

The eXe-SCORM generated html file has to be transparent to show the backround UIIMage view

Hii....i am new to iPhone programming..Can anybody help me out please i have an html which is generated by eXe tool.I need to show it on an UIImageView,created programmatically. so the html has to be transparent then the image looks like backround. is it possible to make that html as transparent..? Thank u ...

How to add horizontal padding to every line in one multi-line wrapped sentence?

This is my code: <div><p><span>... highlighted text ...</span></p><p>Chapter info</p></div> This is what it currently looks like: http://i48.tinypic.com/2dqvo1i.png Is there a way to add padding to the sides of the highlighted text? Regular padding on the SPAN doesn't work, because it only takes into account the the beginning and en...

PHP: When submitting an HTML form, does the HTTP_REFERER get set?

An exception was thrown in my application, but the HTTP_REFERER was null, which seems strange in this case. I'm wondering if you could answer a quick question: So I've got this form: <!-- mysite.com/index.html --> <form action="http://mysite.com/somewhere/else"&gt; <input type="submit" /> </form> When someone submits the form, ...

Escape html in python?

i have a <img src=__string__> but string might contain ", what should I do to escape it? Example: __string__ = test".jpg <img src="test".jpg"> doesn't work. ...

Make two fieldsets the same height

I have two <fieldset>s inside a single div (nothing else), that are positioned next to eachother (positon: absolute, div is set to relative). Is there any way to make these fieldsets both the same height without setting a fixed height? I have some idea that maybe I can make both have a max height of the parent, and a min height of auto...

Forcing tags to close in dynamic text

In many places on many of my sites, users are permitted to enter formatted text through a WYSIWYG or through plain text with tags. Naturally, such input is sanitized for security threats, but it is not stripped of tags nor is it fully entity encoded. Something like <p>hello world</p> ends up going back to the end user as <p>hello world</...

For textbox/textarea limit the length of input on typing, but not on paste.

Hello. I got a strange requirement: function TextLimit(elem, maxChars) { ... } Where elem is a textarea or input of type=text and maxChars is the maximum number of characters that could go into the elem. The code inside the function must limit the length of the text inside elem to maxChars when the user is typing. However, if the us...

Slide instead of Fade for a div

This could be a simple thing im sure... Im trying to get the fade to slide: $slides.eq($btns.index(this)).fadeIn().siblings().hide(); At the moment it works great with fade, i just need this line tweaked to slide, ive done the obvious but i must be doing something with the syntax as it doesnt work. Cheers in advance! //added var $b...

Form is not in correct position in IE7

http://www.campbellcustomcoatings.com/index2.php At this site, I'm using css3's box shadow and rgba for the content background. To make it play nice with IE7, i'm using 3 images. The Form element is cleared underneath the main content area and it's supposed to be to the right of it. Any body know why? ...

Right align first line inside a span element

I have a span, which is inside a div of fixed width. The span contains text that might wrap to more than one line. My problem is that I want the first line of text to be right-aligned, and the subsequent lines (caused by word wrap) to automatically left align with the first line. I.e., This is what I want to happen after a wo...

Fill available spaces between labels with dots or hyphens

Hello everyone, I have a page with labels which are contained in a div, the labels has a variable with and i want to fill spaces between both with characters, dots or '-'. For example. My label text 1 ----------- Some Text Here. My text 2 ----------------------- Another Text. If you notice both text are justified (or at least i tr...