Solved

Best, lightweight and multiple-browser-compatible way to do fancy Javascript dialog boxes (pop-up window replacement)

Posted on 2008-10-19
6
545 Views
Last Modified: 2013-11-11
Hello,

I'd like to implement (at first), two separate things:

- a 'button' that would always be available at a fixed place (even for pages spanning multiple screens) that would call the second thing:
- a 'window' (in fact a superimposed <div>) that would contain two or three text entries and a form. Ideally, this 'window' should be resizable and movable.

I can more or less see how to program it by myself, but if I do so, I believe that I'll have cross-browser problems and that it will be a 'reinventing the wheel' kind of exercise.

I know there are JS libraries (that is why I ask this question in the Jquery subsection also) for doing this kind of things. Are they the best answer to my simple needs? Or does simple 20-lines, rather optimized code to do so, exist?

What matters the most to me is that the library (or snippet of code) is non-bloated, easy to understand and implement (if it is a library, it needs a good documentation), quick to load and, before all, work on all browsers, from IE 5.5 to the latest incarnations of Firefox, Safari and Opera.

If it works well, I'll probably write a complete (although modest) web application using these 'widgets', so it is OK and even desirable that the solution can do a little more than what I asked.

Thanks,
Stéphane
0
Comment
Question by:CPL593H
  • 3
  • 2
6 Comments
 
LVL 10

Expert Comment

by:GeoffSutton
ID: 22753686
Quite simply the easiest approach would be to build this using ASP.NET and the Ajax Control Toolkit.  All you would have to do is worry about making the server side code function correctly, and the client side controls appear as you want them.  The client side scripting is already taken care of for you, and has been tested in multiple implementations on multiple browser types and versions.

You can download the Microsoft Visual Web Developer Express from http://www.microsoft.com/express/vwd/

Geoff
0
 
LVL 10

Expert Comment

by:GeoffSutton
ID: 22753688
oops... And you can get the Ajax Control toolkit through www.asp.net/ajax

Geoff
0
 

Author Comment

by:CPL593H
ID: 22774808
I work with PHP and design on a Mac so asp.net solutions are not an option for this project. Jquery probably looks like a better bet, but I'd rather have information based on first-hand knowledge.

Cheers,
Stéphane
0
What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
LVL 10

Expert Comment

by:GeoffSutton
ID: 22777040
Unfortunately I know nothing of JQuery.  My apologies.

Geoff
0
 
LVL 16

Accepted Solution

by:
sh0e earned 250 total points
ID: 22801618
I would highly recommend jQuery.  It has a strong userbase/supporters, very well documented, is compact and fast, liberal license, designed for compatibility, and is even being bundled by Microsoft.
It allows you to write compact code quickly, and is based on selecting elements to do what you want.  It won't protect you from all cross-browser problems, but it'll make your life easier.

There are also people who prefer Prototype/Scriptaculous, MooTools, Yahoo UI, Dojo, ExtJS.  Yahoo UI and Dojo will be a bit heavier, but they are complete frameworks.  Yahoo UI and Dojo are a bit heavier, but it's not much of a overhead.  You load pieces of it when you need it.  Yahoo UI and Dojo are designed with large scale websites in mind.
As many other people will say, you can't go wrong adopting any of these.  Most of them have liberal licenses, and make your life easier.

I find that JQuery is extremely easy to work with.  I literally learned (part of) it overnight.  And, I have never found a problem modifying it not to conflict with other things.
0
 

Author Closing Comment

by:CPL593H
ID: 31507563
Your advice confirms my preliminary tests. Now I'm sure I'm in the right direction. Thanks
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
advertisement module in core php 4 88
Autoplay video in mobile device 3 60
Safari SVG Image Problem 1 19
jqplot Pie Chart 2 16
Introduction Chart.js, used properly, can visually add a difference to your charting applications. It engages your visitors and allows them to interact with data they otherwise wouldn't be able to without expensive and complicated systems. For this…
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now