html

What are best practices in dealing with oEmbed regarding storing and caching responses?

I'm currently working on a website and I'm fairly new to working with oembed. What are considered best practices in regards to storage and caching of the response? If ultimate speed is my goal and the site I'm working on has potential for huge amounts of traffic, am I better off saving myself database space by just storing the end-point ...

Saving the DOM as HTML after modification

In an Rails app I want to modify the DOM of a web page using javascript Can I save the resulting HTML (of the whole page) after each modification to a database? Thanks. ...

Forms on an ASP.NET page

Hi, I have a website that was designed by a third party and contains several form, the forms are not nested so the HTML is valid. Now I am trying to port this HTML into an ASP.NET page. The controls in some of the forms require AJAX extenders (some Textboxes with Autocomplete) and I end up having Forms in Forms. The browser does not com...

Div with paragraphs with paragraph numbers aligned and outside the div (see sketch)

Hello. I need to do this in CSS The red box is a <div> with several paragraphs <p> I want to have the paragraph numbers to the right of the red box, and the paragraph numbers are aligned to the top of the respective <p> Can I do this layout only with CSS? I have tried so far to do this with javascript, recording the position of each ...

Can I make a <button> not submit a form?

I've got a form, with 2 buttons <a href="index.html"><button>Cancel changes</button></a> <button type="submit">Submit</button> I use jQuery UI's button on them too, simply like this $('button').button(); However, the first button also submits the form. I would of thought that if it didn't have the type="submit", it wouldn't. Obvi...

How can I rewrite the text parts of HTML using HTML::Parser without altering the <script> and <head> sections?

The following code is a shortened version of an example from HTML::Parser #!/usr/bin/perl -w use strict; my $code = shift || usage(); sub edit_print { local $_ = shift; tr/a-z/n-za-m/; print } use HTML::Parser 3.05; my $p = HTML::Parser->new(unbroken_text => 1, default_h => [ sub { print @_; }, "text" ], text_h => [ \&edit...

Does a element with display:none set in css still get downloaded by the browser?

Will the browser still download the image? <img src="/myimage.jpg" style="display:none;" /> ...

Changing HTML DOM element name dynamically

What I'm thinking about is when I remove or add a child element from the DOM, I will change other elements' names through JavaScript or jQuery. For example, I'm going to remove the second text box from a form which have 3 text boxes. They have the names "input-1", "input-2" and "input-3." After removing "input-2," I'm going to rename ...

get meta information of a picture from link

Is there any way at all to get the meta information about a picture from a link without download the picture it self? Like i have this url to a picture http://www.abc.com/picture.jpeg, i want to get the meta information such as the dimensions of the picture with out actually downloading the picture it self. Of course I want to do this by...

Html 'Select' control always returnh selected index as 0

I have placed HTML 'Select' control on aspx page and it's items(options) are loaded dynamically using javasvript. The items in dropdown appear properly on web page. But when I select any item from dropdown, it's selected index is not returned in aspx.cs file. In fact, it shows selected index as 0 and size of 'Select' html control as -1. ...

Trying to write to a MySQL database with a PHP form

I'm trying to do a simple write to database with an HTML form, using PHP. I've run the SQL query in the database and it works perfectly. However, using the form doesn't work. I'm not sure why. Any help? The user/pass/db name are all correct. <?php if(isset($_POST['submit'])) { $con = mysql_connect("localhost","delives0_ideas","ideas")...

In javascript how to find the height and width.

Hi, i am having a .aspx and masterpage page. in masterpage i am loading aspx page . in aspx page design i am using generating table structure using code-behind server in javascript how to find the height and width . Regards, kumar ...

Protect jQuery function from outside access

I'm using jQuery in an app which registers user clicks to perform a given action through the .click() binding, and I want this functionality to be available only through a user mousedown. One of my friends pointed out today that it's possible to run $(element).click() from a javascript terminal in Firebug (or something similar), and achi...

jqTouch css and a href link

I am trying to call a link from a page which points to another part of the page. This is the code I am using to do this: <a href="#product"><img src="Dress1.jpg" alt="Pic1"></img></a> The problem is that when I remove the css stylesheet links from the page, in other words: <link type="text/css" rel="stylesheet" media="screen" href="...

AJAX: fading in images

I've noticed the images on mashable.com fade in as I scroll down the page. I guess they are loaded with AJAX to reduce the page weight in the beginning. Is there a jquery plugin for doing this? What's the best way to add this feature to my website? thanks ...

how to inject line feeds into dynamically created html (javascript)

I'm creating HTML from javascript code. What character(s)/escape codes should I add to the long html to cut the html into smaller lines (in the html source level, not in the rendered html result)? ...

ASP.Net <%# %> and <%= %> rules?

Can someone explain to me the rules around what can and cannot be evaluated/inserted into markup using the <%# %> and <%= %> tags in asp.net? When I first discovered I could inject code-behind variables into mark-up using <%= I thought 'great'. Then I discovered that if such tags are present you can then not add to the controls collecti...

Remove white space at top of page between header and main content seen with some browsers.

Hi, seem to have a inconsistent problem with one of my pages. In some IE browsers it displays nearly a whole screen of blank white space between the header and the main content, strangely enough on my pc using both firefox and ie the page displays correctly however on some other pc's it shows the blank space. http://kiwiradio.blakjak.n...

jQuery/Javascript - Creating a documentation system

Are there any js/jquery scripts out there like this one: http://jqapi.com A left menu that changes the content on the right, with the ability to search it. ...

Slider loading after entire pages loads

Hi, I am using looped slider js for implementing a slider in wordpress. Basically i want to add my slider when entire page loads. please help me. I tried lazyload plugin for that but wont get any success. My markup is like this, <div class="container"> <div class="slides" > <div><a><img /></a><a><img /></a></div> </div> </div> Thanks ...