html

How can I print an HTML document from C# or javascript without user confirmation?

I would like to send a print job to the printer without the user having to click "okay" on the print confirmation dialog window. Either C# code-behind or javascript would be fine, whichever works better. So... I know it it possible to print an HTML document, but is it possible to print without the user clicking okay? The reason I as...

Sending an Ajax request before form submit

Is it possible to send an ajax request in onsubmit() of a form? I have been trying it and the results are flaky, mainly because probably if the browser happens to take longer sending my request than it takes sending the original form, my request is discarded as soon as the location of the loaded page change, so sometimes it never even hi...

Prevent form redirect OR refresh on submit?

Hey guys. I've searched through a bunch of pages, but can't find my problem, so I had to make a post. I have a form that has a submit button, and when submitted I want it to NOT refresh OR redirect. I just want jQuery to perform a function. Here's the form: <form id="contactForm"> <fieldset> <label for="Name">Name</label> <input...

iFrame not expand to 100% height

I have this below html. And I would like the iFrame to cover the rest of the screen with 100% on whatever left. I tried "100%" and "*" in height attribute but not working. Why is that? Thanks <html xmlns="http://www.w3.org/1999/xhtml"&gt; <head> </head> <body> <div id="container-frame"> <img id="if-logo" height="35" width="84" alt="Kuck...

Can you have multiple log in buttons for Google Friend Connect?

I was wondering if it's possible to have multiple log in buttons for Google Friend Connect... google.friendconnect.renderSignInButton({id:"google-login",style:'long'}) That code renders the log in button. Unfortunately it accepts an id, and id's have to be unique. Is there any way to do something similar to google.friendconnect.rend...

Need help with reCAPTCHA - keep getting incorrect-captcha-sol

Hi I am trying to add a reCAPTCHA to my site, but keep getting incorrect-captcha-sol error when I submit the answer. Can anyone tell me if I am correct in doing the following? I have a generic index.php, which includes contact.php. In contact.php I have inserted the following code: require_once('recaptchalib.php'); $publickey = "XXXX...

best way to filter unwanted elements from html before rendering

I have a variable $example that has html content that I need to render/echo to screen. But before rendering to screen, I want to remove certain elements. For instance the structure of the $example variable is: <form> some stuff here... </form><p>hi there</p><div></div> I want to remove the form element from the $example variable befor...

both of the radio buttons can be selected

Hi, I have form with 2 radio buttons but both of the radio buttons can be selected, <form class="descriptions" id="collection" method="post" action=""> <table width="200"> <tr> <td> <label>Collection</label> ...

Download the html text collected in a string builder to word document in VB.NET Console Application

I have a requirement to move the html text available in a string builder to a word document and open the word document after the data is appended in a VB.NET console application. I am new to console applications and am not sure how this could be done, but I am aware that if I am using a Web Application then I can use the following code: ...

Recommended method for escaping HTML in Java

Is there a recommended way to escape <, >, " and & characters when outputting HTML in plain Java code? (Other than manually doing the following, that is). String source = "The less than sign (<) and ampersand (&) must be escaped before using them in HTML"; String escaped = source.replace("<", "&lt;").replace("&", "&amp;"); // ... ...

jQuery Drop Down Menu - slideToggle

jQuery $(document).ready(function(){ $('.cats_showall').click(function(){ $('.cats_dropdown li').slideToggle(); }); }); CSS .cats_dropdown li{ display: none; } .cats_dropdown > li:first-child{ display: list-item; } HTML <ul class="cats_dropdown"> <li>Category 1 - <a href="#" class="cats_showall">Show all</a></li> ...

JavaScript - window.onload - put content of a <div></div> onto a new window.

Hi all, I would like to write a java script which: When the page loads takes the content of a and Places that content on a popup page. any ideas for the script? I know how to navigate to the element but have no idea how to copy the content. The content of the div will be something like this <div id="validationDiv"> ...

Find spaces in anchor links

We've got a large amount of static that HTML has links like e.g. <a href="link.html#glossary">Link</a> However some of them contain spaces in the anchor e.g. <a href="link.html#this is the glossary">Link</a> Any ideas on what kind of regular expression I'd need to use to find the Spaces after the # and replace them with a - or _ ...

Read in Contents of a Folder, onto HTML

I am trying to create a news ticker for a website that reads in the contents of a folder, where each file in the folder would hold a news update, and I am trying to do this without having to manually create 10 different Iframes for each individual file, and having to keep files names etc. the same. Is this possible, and if so how is it ...

Should i sanitize markdown?

For my post entity i store both HTML and MARKDOWN in database (HTML is converted from MARKDOWN). HTML is for rendering on page and MARKDOWN for editing ability (with WMD). I sanitize HTML before storing to db. Question is: should i sanitize markdown too? or it is xss-safe if i only pass it to wmd-editor? ...

Display Multiple Form Submit Buttons Inline Same Line In IE8 In Table

I am trying to display two form submit buttons on the same line inside a table. In IE7 the following code works great, however in IE8 the Delete button drops down to the next line even though I declared the form to display inline. Any suggestions? I created a basic test page here to show the issue: http://ajondeck.net/test/displayinli...

How to emulate window title bar in CSS/HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"&gt; <html> <head> <style> table {border: 1px solid black; width: 500px} .title {height: 40px} .close {float: right} td {text-align: center; border: 1px solid black} </style> </head> <body> <table> <tr> ...

What is the difference between these two HTML anchors?

I tried to use Link Checker to find any broken links, but the second one is not included, the displayedPage.html shows 404 error, but it will not show in the Link Checker's report. What is the difference between the two <a></a>? Why wasn't the second one being checked as a link? <a href="showpage.go?page=mypage&room=yours"> <span>my own...

SEO in Blueprint CSS Framework

I'm creating a new layout for a site and I would prefer to use a grid-based css framework such as Blueprint (which is the only one I have experience with). But does anyone know of a way I could place my main content above my navigation and sidebar in the html in order to improve SEO? Thanks! ...

CSS for text background in text input element

Wondering if this is possible: Let's say if I have a text input element that I want to use to input currencies. Probably I'd want a prefix before the text input to indicate what currency the user is performing his input in. Hence, the HTML'd look something like: US$ <input type="text" /> But let's say I want the "US$" above to appea...