web-development

How can you prevent direct browsing to an image in a web directory?

I'm creating an image gallery site that you have to log in to access. The site will use sessions to keep track of usernames and passwords. Logged in users will be able to search for images and see results. Presumably, this means I'll be putting images in a web directory. How do I keep non-logged in people from being able to browse direct...

connecting to quickbooks database via odbc with php?

[edit] We're collecting credit application data from users on a web form. I have not tied my web form directly into QB. I have no idea what the QB table structure is for this collection of data - nor of how it displays it to the user because I've never actually worked directly with QB. Others in my office do however. I would still ...

IE fails, when calling functions from external javascript?

I have a piece of code that can be simplified to this: var s='' ; s += "<"+"script type=\"text/javascript\" src=\"http://somehost.com/scripts/FooFunctions.js\"&gt;\n"; s += "<"+"/script>" ; s += "<"+"script type=\"text/javascript\">\n"; s += "FooFunction(42, 'i love cats');\n"; s += "<"+"/script>" ; document.write(s) ; In all brows...

Why em instead of px?

I heard you should define sizes and distances in your stylesheet with em instead of in pixels. So the question is why should I use em instead of px when defining styles in css? Is there a good example that illustrates this? ...

Is there something like CherryPy or Cerise in the Java world?

CherryPy and Cerise are two small frameworks that implement nothing but the barebones of a web-framework and I love their simplicity: in fact I reckon that if Classic ASP was implemented that way (and didn't pretty much require VBScript) I could have settled for it and lived happily ever after. But now I'm living at the borders of the J...

What image type should I use when? GIF, JPG or PNG?

I am trying to create a personal home page for myself to learn more about web design (JavaScript, using Photo Shop, etc). I plan on having a graphical menu on the left, a banner across the top and also a "Photos" section where I can display photos of various pictures I have taken. However, when I look at other sites that do anything sim...

Web accessibility - behaviour of screenreaders when configured to read 'title' attribute

I've been advised that if a 'title' attribute expands upon what's present in a control's visible text, it should include all information in the visible text, because the screenreader may read the title instead of the visible text. To clarify exactly how this works, are any of the following points true (for must screenreaders)? If a la...

Can Firefox's "view source" be set to not make a new GET request?

This is sort of tangential to coding, but programmers often do "view source" on their own pages and on others' pages. I learned that when you do the normal View Source in Firefox, it takes the URL you're at and issues another GET request to that URL. There are two reasons why this is bad: If you've just issued a POST and do View Source...

Recommend security training for PHP/MySQL web developer

Know any good courses, online or perhaps otherwise, you'd recommend to a relatively new PHP/MySQL web developer to get her up to speed on security vulnerabilities? It would be nice if it was fairly thorough and went beyond basic stuff like sql injection. Ideas? Edit: Thanks for the really great links and information, but I'm also loo...

Which web framework incurs the least overhead?

I'm playing around with Django on my website hosting service. I found out that a simple Django page, which has only some static text, and is rendered from a very simple template I created takes a significant time to render. When compared to a static HTML page, I am getting ~2 seconds difference in the load times. Keep in mind this is a ...

What language should I use to create a simple text-formatting application online?

I want to make a page for a website that will let the user create a blog post, and want them to be able to graphically edit the formatting, like paragraphs and styles, then convert this to html. Is there a way to do it in PHP? Do I need to use Javascript or Ajax or something? ...

Is It Secure To Store Passwords In Web Application Source Code?

So I have a web application that integrates with several other APIs and services which require authentication. My question is, is it safe to store my authentication credentials in plain text in my source code? What can I do to store these credentials securely? I think this is a common problem, so I'd like to see a solution which secures...

Remote File upload in grails

I am creating a webapplication using grails which uses lot of ajax.I want to implement file upload using ajax.I dont know how to use ajax for file upload.My sample GSP code is : <!-- code for file upload form--> <div id="updateArea"> </div> I tried with and .After uploading I want to update the 'updateArea' with the result.In result...

Flow of struts

Can anyone tell me the control flow of struts. Which program will be called first? ...

Phototagging like in Facebook and Orkut album photos?

Is there a jQuery library or any leads on implementing that photo tagging like in Facebook and Orkut Photo albums? Thanks ...

PHP, Ruby, Python...Yuma?

In considering languages to use in creating a web-application that interfaces with a database back-end, has anyone had experience in using Yuma and can share how stable it is and what kind of performance it may give? ...

How can we restrict the user from saving a web page?

How can we restrict a user from saving the page? Please provide some tips to disable File->Save and View Source options EDIT: Obviously it can't be done, and probably shouldn't be attempted. But possibly a more interesting variant on this question is how can we make is sufficiently hard for a user to save a page in a usable format suc...

Passing session data between ASP.NET Applications

We have several ASP.NET applications deployed to a few servers. Is there a standard way to reuse session data or some other method to not require users to log in to the next application when moving from application to application if they've already authenticated? I'm hoping there's a best practices way of doing this that you guys know ab...

Setting up SVN to Best Suit Dev -> QA -> Prod

I'm sorry if this has already been asked, but I haven't been able to find an answer specific to this situation: For our web application, we have 3 systems: dev, QA, and production. Right now, a third party is maintaining the code, but soon it will be in our hands. We will have separate build environments for each stage. Also, we use ...

What's the Point of Selenium?

Ok, maybe I'm missing something, but I really don't see the point of Selenium. What is the point of opening the browser using code, clicking buttons using code, and checking for text using code? I read the website and I see how in theory it would be good to automatically unit test your web applications, but in the end doesn't it just tak...