html

Loading values into an HTML select using jQuery/Json

I am trying to load values into a select dynamically using values from a json string. The data is being loaded correctly, but for some reason, only the 1st value is loading into the select. Can anyone spot why this could be? Here is my JSON data: [{"cat_id":"1","cat_section":"pages","cat_type":"cat","cat_name":"Music","cat_order":"1",...

Is that possible to display image thumbnail without uploading it to the server ?

I want let user to upload images to server add some info (like description, tags) about each image.I use Uploadify to upload multiple images. I wonder if it is possible to show thumbnails of the images (while the user enters the additional info about each image) before the images are actually uploaded to the server. I want user to have...

why different frames height in chrome and IE7.

i have two frames in one html page, which display correctly in chrome browser.but when i tried in IE7 it just looks very strange,its height is not 100% any more !the below is the code . <iframe src ="demoFramesetLeftFrame.jsp" name="treeframe" id="treeframe" height="100%" width="200px" frameborder="0"> </iframe> <iframe src="" name="ba...

Why ":last" and ":last-child" does not work ?

I'm trying to select the last div with class my_class inside div with id a. I tried several options with :last and :last-child but none of them worked. Here is on try. What am I doing wrong ? ...

How to programmatically load a HTML document in order to add to the document's <head>?

We are supplied with HTML 'wrapper' files from the client, which we need to insert out content into, and then render the HTML. Before we render the HTML with our content inserted, I need to add a few tags to the <head> section of the client's wrapper, such as references to our script files, css and some meta tags. So what I'm doing is ...

I want to return a specific error code on access of a page

I would like to return an error code on accessing a page, specifically a 418 error to see how my browser/server will implement it (and in case I ever manage to wire the appropriate devices to my digital coffee/tea pot I would like to know when it's done :) ) Is this even supported on Apache/2.2.14 (Ubuntu)? ...

iPhone Web App: Possible to Change the Style of Status Bar?

Hi, I would like to change the style of the status bar after the web app is launched in full screen. I understand that it is possible to change the status for a whole webpage. Is it possible to change it by Javascript? Thanks! ...

How to add <link> or <meta> tags to <head> with HtmlAgilityPack?

The link to download documentation from http://htmlagilitypack.codeplex.com is returning an error and I can't figure this out by trying the code. I'm trying to insert various tags into the <head> section of a HtmlDocument that I've loaded from a HTML string. The original issue I'm having is described here. Can somebody give me an idea ...

Intercept "location.href" in a UIWebView, Objective-C

What is the correct code to intercept location.href URL in a UIWebView? - (NSString*)actionURL { NSString *script = @"document.getElementById('action_url').name"; return [webView stringByEvaluatingJavaScriptFromString:script]; } This code doesn't work :( ...

How to open and save text in html to a file using javascript in HTML

i have a textarea and two buttons like <form name="form1"> <textarea name="text1"> HTML Codes goes here </textarea> <input type="button"> Open File <input type="button"> Save File </form> when i click on "save" button i want the text in textarea to be saved (i want it to pop up the "save as" dialog box) When i click on "open" , it...

Jquery Animation doesn't work in IE

Hi guys. I am trying to animate a div when the user click the button. Each button will move a div to a different amount of pixels. My code works in firefox and chrome but not IE8 (I only test it in IE8 so far). I appreciate it if someone could help me about it. my jquery $(document).ready(function(){ function breakline(position) {...

Keeping the native style of a context menu in webpages

Hi folks, I know everyone hates when their context menus get messed with so what I'm asking for is the opposite of that. I've tried looking for javascript plugins that deal with changing the context menus in webpages, but I find that they are very intrusive. (i.e. the context menu now only contains the items that the developer chooses)....

Removing HTML tags from a unicode string in Python

Hey all, I have a strong that I scraped from an XML file and It contains some HTML formatting tags (<b>, <i>, etc) Is there a quick and easy way to remove all of these tags from the text? I tried str = str.replace("<b>","") and applied it several times to other tags, but that doesn't work ...

how to build custom focusable object in HTML/JavaScript

I want to build a custom object in HTML which is focusable. How can I do that in general? More specific about why I want that: I need some kind of editor component with much more power and control over it. I.e. no single character should be possible to be typed in directly. It is like a big tree of objects (imagine an AST or so) and you...

JSONP vs IFrame?

Soon I'll be needing to build a widget that some of our clients can embed in their own websites. To future proof my widget the embed code would be something like this: <script type="text/javascript" src="path/to/remote/file.js"></script> <div id="my_widget"></div> What are the strengths and weaknesses of iframes vs JSONP? Are there ...

creating button drop down in html?

Hi, I am new to web programming. I want to create buttons in html and when you hover over it, it shows a drop down of options for pages you want to go to. Any help is appreciated. Thanks! ...

include a website in php file

Hi i am trying to include a webpage link from another website into my website. how can i do this? i tried <?php web_include ('http://website.com/website.html') ; ?> but all the commands are not loading after this statement. I want to include another webpage into my homepage directly. my homepage is completely designed in php, but the ...

Python: list of lists anf HTML table help

I'm having trouble appending the values from a list of lists into a html table, for example my list if lists contains: food_list = [['A','B'], ['Apple','banana'], ['Fruit','Fruit']] How would i append each value into a correspondong HTML table? So the code looks like: <table> <tr><td>A</td><td>Apple</td><td>Fruit</td></tr> <tr><td>B<...

PHP removing HTML from POST data

I am trying to submit a form with HTML data in it to my server, but it appears to be stripping it out and I cant seem to figure out why. If I do file_get_contents("php://input") I can see my content in the raw form: action=submit&content=%3Cp%3EAnteater+Alumni%3A+Help+current+UCI+students+reach+their+goal+of+raising+%2...registration+f...

How to make a "Print" button disappear.

I followed one example: I have a print image button. When clicked, the button opens the print dialog and then I want to hide the image button. But, initially I am not able to see the print button to click on it. <link href="style-print.css" rel="stylesheet" media="print" type="text/css"> #print { display: none; } <div style="flo...