html

Simulate keypress in a non-visible webbrowser object C#

I'm currently working in an application that has to navigate a webpage and recollect data about products, prices, ... with webbrowser object in .net 3.5. The problem is that the page has some fields with a suggest script in ajax, and I can't simply modify the innerText property because the script also saves codes in a hidden input field...

How to select an html element that has two class names ?

IE7 doesn't support :last-child pseudo selector. I am thinking of explicitly adding a class name to denote it as the last element but not sure how to select this element inside a css file. Anyone have any ideas on how to do this ? ...

How to match with javascript and regex?

I have the following HTML: <span id="UnitCost5">$3,079.95 to $3,479.95</span> And i want to use Javascript and Regex to get all number matches. So i want my script function to return: 3,079.95 AND 3,479.95 Note the text may be different so i need the solution as generic as posible, may be it will be like this: <span id="UnitCost5">...

How to structure HTML form elements so they can be easily translated into a PHP object?

I am trying to figure out the best way to name my HTML form fields so that they can be easily parsed into a set of PHP opbjects. For example I have the following table of elements: (let's assume it is inside a form) <table> <tr id='payment0'> <td><input type='text' name='paymentType0'></td> <td><input type='text' name='paymen...

Placing link at top

How do I place a link at the top of my page when the URL that it is pointing to is not determined until later down the page. In this example, I want to move Create and Edit Scenario links to the top of the page, but as you can see Edit Scenario depends on knowing the @scenario_id first. <%= will_paginate @scens, :next_label => 'Older', ...

Suggestion Needed: Best way of parsing HTML in C#

Hello everybody, This is my question. Which is the best way to extract certain information from an HTML page. What I currently do is the following: Download the page using WebClient Convert the received data to string using UTF8Encoding Convert the string to XML Using Xml related classes from the .NET Framework extract the desired dat...

CSS Menu Displays Incorrectly in Safari

I have written a CSS menu for a site I am helping develop, and it displays correctly in both IE 7 and Firefox 3 (on Windows XP). The intended effect is that the drop down menus should be as wide as the widest element in them (but not wider). In Safari, however, they appear to be roughly twice as wide as they should be. I have no clue as...

How can I hide a TD tag using inline JavaScript or CSS?

How can I hide a <td> tag using JavaScript or inline CSS? ...

Qwerty Keyboard in HTML

I need a QWERTY keyboard using HTML buttons, which enters the typed info into a text field. I can put one together, but it seems that this must have been done before, and I hate to reinvent the wheel. Does anyone know where I could find code for something like that? ...

Generate image data from HTML Canvas element

What is the best way to generate image data from the contents of an HTML canvas element? I'd like to create the image data such that it can be transmitted to a server (it's not necessary for the user to be able to directly save to a file). The image data should be in a common format such as PNG or JPEG. Solutions that work correctly i...

How to detect if a user is running IE 6?

I need to be able to tell if a page is being viewed in IE 6. How can I do this in javascript while ignoring version like 7, 8, or other browsers? ...

inserting javascript variable into html output of .innerHTML =

I am trying to insert a variable passed to my function into the output of my .innerHTML = code but do not know how to properly insert it into the HTML output. function playsong(song) { parent.document.getElementById('player').innerHTML = '<object width="199" height="26"><param name="movie" value="audio_player_black.swf"><embed src="...

FDF, MS CRM and iframe

I'm looking for help with using iframe with a FDF. It also has to display in IE because we use MS CRM. The PDF that the FDF is referencing is encrypted so I can't do any server side merging (I don't think). I've looked at the FDF-Toolkit but it's little over kill for just displaying, also I have heard that it doesn't always work. Thank...

should embedding video in home page slow down the page?

If I embed a video demonstrating my application in my home page, will it slow down the page to a considerable amount? I tried, and checked that it takes almost 1 sec, to load the preview of the video. And as the video stream will not be downloaded until, the video is clicked, the total video do not have to get downloaded. Is it recomme...

Learn how to make Flair for my users (javascript snippets)

I wanted to give my users a little piece of JavaScript or HTML code that they could put on their site and show information about them. Kind of like StackOverFlows new feature Flair. I have an idea of how to code it. I was going to give them some JS with a HTML that had a DIV id="MySite_Info". Then the JS would go to my site and pull som...

How am I going to reproduce Javascript bugs if I don't have a Mac & Safari?

Simple question... How am I going to reproduce Javascript bugs if I don't have a Mac & Safari? Is it possible to run a legit copy of Mac OS on VMWare, or even better...run Safari in Windows? ...

Firefox addon or other tool to locally validate HTML pages

I have a rails project with a lot of duplicate id's (it looks like id's were used like class should have been used), so obviously this is bad. I need to refactor everything to get rid of the duplicate id's, and need some addon for Firefox (ideally) to validate the page as I view it to ensure there are no duplicate id's, since it's not s...

What are the pros and cons of various ways of analyzing websites?

I'd like to write some code which looks at a website and its assets and creates some stats and a report. Assets would include images. I'd like to be able to trace links, or at least try to identify menus on the page. I'd also like to take a guess at what CMS created the site, based on class names and such. I'm going to assume that the s...

How do I change the name of multiple selected html values?

I have about 20 check boxes. When the user selects these and then uses an alternate submit button, I need to change the name of the name/value pair, for the selected inputs. Why does this function only change the name of every other selected input? function sub_d() { for (i = 0; i < document.checks.OGname.length; i++) //for all ...

Is there a reliable way to position content off to the sides of a div, and have it only appear if the user's resolution allows it?

I have my markup like this (for argument's sake) <div id="content"></div> <div id="layout"></div> <div id="layout2"></<div> Then I use this CSS #content { width: 800px; height: 600px; margin: 0 auto; } /* place this attached to the top of the page */ #sidebar, #sidebar2 { display: block; width: 139px; height:...