web-development

Why does IE8 remove fragment identifiers from link urls in Web Slices?

I have built a page to function as a Web Slice in Internet Explorer 8. The links on the page work fine if I view the page in the main browser window. However, when I add the page to the favorites bar as a Web Slice and view it the links do not work the same. IE strips the fragment identifier from the link URLs (e.g. when clicking on a...

Rendering 'belongs_to" in index view question - Ruby on Rails

I have created a simple blog application with Ruby on Rails. The applications consists of two tables, posts and comments. Comments belongs_to :post and posts has_many :comments. I created posts table with the following columns: title:string, body:text. I created the comments table with the following columns: body:text post_id:integer n...

Google Maps: Map Type (Roadmap, Terrain)

I just came across the following web site and noticed they had 2 map types I'm not certain on how to activitate from the Google Maps JavaScript API. http://www.maps-for-free.com/index.html It's the "Relief" and "OSM" Map Type as found on the link above. Any ideas what the API call is to display "Relief" and "OSM" from a Google Map? ...

Centering a percent-based div

Hello, Recently, a client asked that his site be percent-based rather than pixel-based. The percent was to be set to 80%. As you guys know, it is very easy to center the container if it is pixel-based but how do you center a percent-based main container? #container { width:80%; margin:0px auto; } That does not center the containe...

Random avatar generator

Possible Duplicates: Auto Generated Avatars on Stack Overflow what is the algorithm used to generate those little gravatar identicon images? StackOverflow seems to have nice, randomly generated avatars for default users. How do I do that (preferably with PHP)? ...

[JavaScript] Pass a defined function as a parameter

Hello, I am trying to pass in a function as a parameter: GEvent.addListener(marker_1, "click", populateMarkerWindow(0, marker_1) ); the addListener function takes an inline function as a parameter, and it works fine, but I want to call this function from other places as well, so I made it into a defined function: var populateMarker...

How do you create an effective web site map?

Hi. We've got a non-profit site that's been up for over 10 years; though it's gone through various redesigns, it's showing its age and needs to be revamped -- inside and out. This includes the layout of the pages as well as the internal structure of the site. As part of rebuilding the site and designing it structure, we'd like to create...

Transforming highlighted text inside an element using javascript

My goal is to be able to get the highlighted text within a document, but only if that text is within a given section, and then apply a certain style to that selected text after clicking a div tag. I'll explain what I mean: So, having looked at window.getSelection() and document.selection.createRange().text, I attempted to use elmnt.get...

Possible to use Javascript to get data from other sites?

Is it possible for a web page using Javascript to get data from another website? In my case I want to get it for calculations and graphing a chart. But I'm not sure if this is possible or not due to security concerns. If it is considered a no no but there is a work around I would appreciate being told the work around. I don't want to...

When is a PHP project too small for a framework?

I'm about to start on a small, static website project: no database or CMS required. Basically, a brochure website. I used the CodeIgniter framework recently to develop a full-blown web application, and I'm wondering if it appropriate to also use CI for smaller, simpler sites. Typically for a static brochure site I would write regular P...

If I prefer semantic naming then shouldn't i use any CSS Framework and grid approach?

If I prefer semantic naming then shouldn't i use any CSS Framework and grid approach? Which approach is better Grid or Freehand? Is any CSS Frameworks really can save time and make semantic code even for Experienced CSS developer? Many CSS Frameworksd are popular in static PSD 2 XHTML+CSS conversion and in wordpress/drupal/joomla them...

vHost RewriteRule is creating a 500 Error

Hello, Below you will find my current vHost entry that I am using for a site that I currently have under development. This vHost entry works fine when I have it on my local machine, but when I push my code to my staging server that is running this same vHost record I receive a 500 Internal Server error. The machine I'm running this vHo...

What tools should i use for web development?

Is learning html, xhtml and css even necessary if i use IDE's like dreamweaver, wordpress, etc? ...

how to develop an web application in alfresco?

*strong text*i have installed alfresco community edition and want to develop an web application having databse connectivity. i have developed that application using jsp, servlets but want to develop the same application in alfresco. can anybody help where to start? thanks in advance ...

Difference in css-positioning in windows and linux

I have a problem with rendering my html page by the same browsers in different OS. There are 3 spans and position of each span is corrected through css(position:relative). But I have found out that the page that looks correct in firefox under Linux, shows not right at the same firefox(3.5.7) under Windows OS. Linux(Left - How it shoul...

How to sniff http requests

I want to sniff a local HTTP request to an ASP.NET web application. Is telnet an option? How do you capture packets to a web application? ...

Auto-versioning of static content with JBoss

As per the Q&A here, I'd like to implement a similar auto-versioning system for a web app running in JBoss 5. Is there anything already out there to do this sort of thing, or will I need to write something myself? To be clear: I am not using PHP. Not knowing much about PHP, I'm not sure what the Tomcat/JBoss analogs of PHP's .htaccess, ...

Is it possible to stop a javascript with Firebug without using breakpoints?

Is it possible with Firebug to stop a javascript with a press of a button or a keyboard shortcut instead of stopping it by setting a breakpoint? Why would I like to do this? We have a very dynamic website with lots of animations. It would be a great help if I could just stop the scripts at the moment the animation is doing something I w...

PHP 6.0 - Roadmap?

With the recent announcement that PHP 6 development has been halted, I'm confused as to what the PHP 5.x and 6.x road map includes. The current version of PHP is 5.3.2. There were quite a few significant features to come in PHP 6.0, such as: APC include for automatic bytecode caching Unicode support etc.. Question: What is the new ...

How can I hide empty html table cells with jQuery?

What I have to work with: An html table 5X7. On many queries, there are less that 35 items filling the complete table. How can I "hide" the empty cells dynamically in this case, using jQuery (or any other efficient way)? Thank you. ...