web-development

Spring MVC 3.0: how do I define an interceptor with annotations?

I am developing an app with Spring MVC (3.0). I defined some controllers with annotations, how can I define an intereceptor with annotations too. ...

Querying large XML file (600mb+) in PHP or JavaScript?

I have a large XML file (600mb+) and am developing a PHP application which needs to query this file. My initial approach was to extract all the data from the file and insert it into a MySQL database - then query it that way. The only issue with this was that it was still slow, plus the XML data gets updated regularly - meaning I need to...

HttpServletRequest to complete URL

I have an HttpServletRequest object. How do I get the complete and exact URL that cause this call to arrive at my servlet? Or at least as accurately as possible, as there are perhaps things that can be regenerated (the order of the parameters, perhaps). ...

How do I dynamically modify content (a TreeView) in the parent page from a child IFrame?

I have a TreeView menu on a parent or base base that hosts an IFrame in which content pages corresponding to menu items are loaded. Ideally one of my content pages should dymamically insert its own contextual items into it's section of the TreeView menu. I have a strong suspicion that jQuery is pretty much the only tool I am familair wi...

How do I integrate MS Word into a web page?

I have a section of a web application I’m working on where there are mail merge templates. The documents are word documents. When a user has need to edit the template I’d like them to be able to simply click edit, which would cause word to load with the document loaded. When the user is done, they click save in word and the web page spot...

Google Maps: Auto close open InfoWindows ?

On my site, http://tinyurl.com/ybubyd6 I'm using Google Maps API v3 to place house markers on the map. The InfoWindows stay open unless you explicitly click the close icon. Meaning, you can have 2+ InfoWindows open at a time if you hover over the map marker. Question: How do I make it so that only the current active InfoWindow is open...

forcing menus to take up 100% of width

I have this top bar menu: http://yoursdproperty.com/ I need to have the text always take up 100% of the width. how do i do this? if I add more links i want the sizing to be dynamic any ideas? ...

Web-dev/design template implementation and creation?

I've been trying out loads of different way to make the most effecient "template" for a site. The site consists of 'Sections', 'Menus' and 'SubMenus'. So to the question; what would be the most efficient and "slick" way of making a "template" for it? I've tried including headers and footers (Making all "head" items in the "header.php" an...

JQuery: How to make DIV within Scroll window focused?

I have the following HTML/CSS: #scrollpanel{height:100px;overflow-x:hidden;overflow-y:scroll;width:200px} <div id="scrollpanel"> <div class="listing ref_1">...</div> <div class="listing ref_2">...</div> <div class="listing ref_3">...</div> ... </div> As you can see, the scrollpanel is a scrollwindow defined to have a ...

Website functionality tips

Hello everyone, I'm writing a paper about website functionality so far I've covered some of them : Event Calendars and Registration, and Appointment Setting Product Databases and Wizard-like applications Flash and other Interactive Multimedia Presentations Online Publishing and Article Modules Surveys and Interactive tools that entice...

Tips for template systems

hi, i am wondering how i can create functional template system, something like smarty. I dont want to use ready made template systems because they slow down page. I want to create template system where i can add in certain pages a new JS code or new stylesheet or even remove the sidebar. I think i could get that result by using output b...

Have some questions about web development (PHP and MySQL).

I've done a bit of web programming (using PHP and MySQL), but nothing too large in scale. I've been thinking about how someone would create a social networking type of site and I've ran into some problems. How would you safely and securely store passwords in MySQL? What kinds of encryption would you use? If users were allowed to upload...

Upload large files with browsers without having it hanging (preferably with flash)

Hey. I am trying to upload a lot of files from a browser to a webserver that I have total control of. I've tried to use SWFUpload, but the problem is that my browser hangs when I am uploading a file. The files are supposed to be of any length (up to 2GB due to other restrictions, of course). While the upload is in progress the browser ...

How to save server state of CGI application?

I have a cgi web program (in C) that prints out different error messages to a log file. If the program is run again and runs into he same error, I do not want the same error message to log again. I'm looking at different options and any advice is appreciated. Thanks. -Cookie: unable to set cookie after the html <head> section has been p...

In JavaScript, how can I create a function with an optional parameter?

Question: What is the proper way to define a function in JavaScript that takes optional parameters? For example: function myFunc(optionVar1) { if(optionVar1 == undefined) { ... } else { ... } } myFunc('10'); // valid function call myFunc(); // also a valid function call Is it proper to use a ? mark ...

applying varying styled text

when i write a paragraph i would like the text to look like this: is it something that i have to do in css? i want similar formatting. ...

What is the difference between <p> and <div>?

What is the difference between <p> and <div>? Can they be used interchangeably? What are the applications? ...

ASP.net Chat Problem

Hi there, I was looking for a chat program, and I found it here in Code Project, Build a Web based Chat using ASP.NET Ajax (http://www.codeproject.com/KB/ajax/aspnetchat.aspx) The code is working perfectly,except 2 issues,can anybody tell me how can I overcome these issues? 1-how can I get for example the last 2 hours chat from the d...

save page in php

Hi all, I am writing a web program using mvc php framework. I have index and another view which I want to render the view inside of my index. First I call view then I call index and put view into it. My problem is I want to save the whole view into a variable and do something like echo $view in my index. both require_once and include_onc...

What will happend to a session if user try to copy the address bar to a new IE window?

hi suppose one user logins to a web site and start navigating its pages. For a specific page, he copies page address and pastes it to a new IE window address bar. Now, what happens to his session? Does it duplicates? or what? ...