html

html scraping and css queries

Hello, what are the advantages and disadvantages of the following libraries? PHP Simple HTML DOM Parser QP phpQuery From the above i've used QP and it failed to parse invalid HTML, and simpleDomParser, that does a good job, but it kinda leaks memory because of the object model. But you may keep that under control by calling $object->...

How do you know when a download has started from JavaScript?

Hi all, Basically, I would like to wait for the IE save dialog box to open up, and then run the next line of JavaScript. Something like: `window.open(URL,"_self",...);` window.alert("save dialog started"); Can this be done? Thanks Grae I came up with this: var iframe = document.getElementById("dFrameID"); ...

Three part dynamic spacing wo/Table and Absolute Positioning

I'm trying to place 3 divs within a larger div such that the center one is 800px wide, and centered, and the other two fill the space remaining. I cannot use tables, nor can I use absolute positioning, as I have html below that must be outside the three divs but inside the larger div. I can get the center div: .center-div { width: 8...

Is it possible to have a html code and all images in one file?

I want to have a html file with javascript. Then I want to have some images in this file. I want to send this html file to my friends (per e-mail). I want them to see my html file with images but I do not want to send them all files with all images. It would be nice to send them just one file. I also do not want to have images on a web...

How to access the screen size in html?

Is it possible? ...

Simple PHP, AJAX request

Right now I'm struggling to get this simple PHP AJAX request to work. <html> <head> <script type="text/javascript"> function getSuggestions(type){ if(type == "") { document.getElementById("entries").innerHTML="test" return; } if (window.XMLHttpRequest) ...

Regexp for html

Possible Duplicate: RegEx match open tags except XHTML self-contained tags I have the following string: $str = " <li>r</li> <li>a</li> <li>n</li> <li>d</li> ... <li>om</li> "; How do I get the HTML for the first n-th <li> tags? Ex : n = 3 ; result = "<li>r<...>n</li>; I would like a regexp if possible. ...

ASP.Net MVC File Upload Post Parameters

I am trying to go to a view with a speicifed batchId parameter wrapped in a ViewModel, pick a file to upload, get the uploaded file back and store the file data w/ the associated BatchId value in a database. When the form is submitted I don't know how to get back the viewmodel and the PostedFileBase so that I can get the BatchId value. ...

How do I get my text centered below the image, not adjacent to it?

In the HTML markup below, what do I need to do in order to get the text, "What is this?" to be positioned BELOW the image? Initially, I placed the text in <p> tags but, although the text was positioned correclty, I lost my desired hyperlink behavior. Thanks! <div class="HorizontallyCentered"> <a href="qr.aspx"> <img alt="...

JSF prettify/beautify HTML output

I want to correct indent before I send a JSF page to the user, because the indent is a little bit messy from JSF and it would be easier to do css stylig with nicier indent. So I want to redirect all output written by JSF rendering to a variable, parse it and then send it to the user. I tried to play a little with and thought that the <f:...

Understanding HTTP Requests/Responses regarding the DOM and script execution

Hello! I've been away from web design/development for a long, long now and have recently begun to get back into it. I started off doing things just to make them work, and now that I'm getting back into it, I would like to understand things a bit more clearly - including when the DOM is requested by the browser to when it is fully loaded,...

An alternative to hardcoding Html in C# ?

I'm finding myself hardcoding html into C#. It's usually on a data-driven pages. The content of the page and url change but the physical page does not change. As it stands now, I have snippets of hardcoded HTML sprinkled throughout the UI. It's usually navigation html, but not always. In most cases there is logic wrapped around the htm...

Interrupt jQuery delay function

I am working on a way to autocomplete function to navigate through steps of a form. Here is the code that when 5 characters are entered into an input, it then moves to the next element. My delay is working great, but I don't have a way to stop it from completing if characters get deleted after 5 characters are entered. It just fires off ...

HTML question about modifying background

Hello, I am a beginner in HTML and am taking a Multimedia class for school. I noticed for many websites such as ESPN, CNN, Google, etc. that there was no direct image source for the entire background. How might I be able to incorporate an image for an entire background of a website? Thanks I appreciate it! ...

HTML\PHP - How to elicit user (visitor)'s info

How to elicit user's information when he/she is visiting your website? IP Address Mac Address User Profile Name OS Name OS version OS Registered to (Name/Company) Computer Name Browser Name Browser Version ISP Name/Internet Connection Provider Name Connection Type Location - City/Country (based on IP) ...

HTML: Request - Response Redirection

Lets say I have a website www.mySite.com and there are a lot of pages whose links are www.mySite.com\contact.php and www.mySite.com\about.php. What if I want that when someone enters a direct link like www.mySite.com\about.php instead of opening that page it should go to a page myPolicy.php and then myPolicy.php may\may not refer the us...

How can I extract text from HTML using c++?

How can I parse HTML tags using c++? eg: <html><body>examlpe text </body></html> ...

How to force horizontal scrolling depending on size of contents

I want to have a horizontal scrollbar if necessary, by having the 'child' divs be added side-by-size instead of getting pushed to the next row when the parent isn't wide enough. My code is below. If you set .mid to have width: 1000px you'll see what I'm going for, only I only want it to be as wide as the dynamically generated children....

Image preloading: how much is too much?

So I have my own webpage here, which is a sortable thumbnails page. The load() event activates each thumbnail when the first related image is loaded. Since I'm grabbing <img> tags and text content from a hidden div on the page, the thumb activation prevents the user from clicking through to a yet-unloaded image and then waiting while the...

Hide the mouse cursor in Opera 10 Kiosk Mode

Seems I can't use cursor:url(); with opera and from what I can tell they removed the hide cursor setting from opera.ini. We're running an app in kiosk mode on a touch PC and would like to hide the mouse cursor. any idea on how to do this? ...