|
I want to show a very wide image on a page but not have it cause a horizontal scrollbar to appear.
I found the overflow-x attribute[^] but it only works on IE6. Is there a portable way of doing this (without using frames )?
Software is everything. It also sucks. Charles Fishman [^]
Awasu 1.0.4 (beta)[^]: A free RSS reader with support for Code Project.
|
|
|
|
|
Could you set the image as the background image for the page or a div?
James
"I despise the city and much prefer being where a traffic jam means a line-up at McDonald's"
Me when telling a friend why I wouldn't want to live with him
|
|
|
|
|
What I need is to reload the page with parameters depending on users selection.
First from application main window i open new dialog (using javascript):
showModalDialog(DIALOG_NAME, DlgParameters, DlgAtributes);
(dialog name, parameters and atributes are predefined or generated variables).
Till here everything works fine, but when I try to reload the page it automaticaly opens new browser window.
<a href="SelectData.aspx?d=125&m=15">DATA 15</a><br />
<a href="SelectData.aspx?d=151&m=16">DATA 16</a>
Same happens when I try it with javascript i.e:
<a href="javascript:ReloadWindow('SelectData.aspx?d=125&m=15')">DATA 15</a>
function ReloadWindow(DestinationURL)<br />
{<br />
document.location = DestinationURL;<br />
}
Everything works fine when I use browser window instead of ModalDialog window.
So is it posible to reload the page inside the ModalDialog window?
If yes, how?
|
|
|
|
|
The only way to reload, navigate or do form posts in a modal dialog is to create a dialog that serves as a "host container" for the actual page, which resides in an iframe. In the following example, just replace the iframe src tag with your page url:
<html>
<head>
<title>Multi Select Lookup</title>
<SCRIPT LANGUAGE=javascript>
<!--
var g_iInterval = 0;
var g_iLoop = 0;
function window_onload()
{
document.all["LookupPanel"].style.display = "";
document.all["LoadingMsg"].style.display = "none";
window_onresize();
window.returnValue = "";
g_iInterval = window.setInterval("CheckForSave()",200);
}
function CheckForSave() {
if (window.returnValue.substr(0,1) == "R")
{
g_iLoop++;
if (g_iLoop > 2)
{
window.clearInterval(g_iInterval);
window.close();
}
}
}
function window_onresize() {
var oLP = document.all["LookupPanel"];
oLP.style.posHeight = document.body.offsetHeight;
oLP.style.posWidth = document.body.offsetWidth;
}
</SCRIPT>
</HEAD>
<BODY background="::{ImageDir}/body_back.gif" bottomMargin=0 leftMargin=0 rightMargin=0 topMargin=0 LANGUAGE=javascript onload="return window_onload()" onresize="return window_onresize()">
<span id=Retval style="display: none"></span>
<SPAN id=LoadingMsg style="z-index: 0; position: absolute; left: 0; top: 100; width: 100%; text-align: center">Loading...</SPAN>
<IFRAME id=LookupPanel src="!!YOUR URL HERE!!" marginheight=0 marginwidth=0 hspace=0 frameborder=1 style="HEIGHT: 10px; WIDTH: 10px; Z-INDEX=10; DISPLAY: none" vspace=0></IFRAME>
Then, in your page, when you need to close it (or doing a form post), simply set the following:
function OnCancelButtonClicked() {
window.parent.close();
}
function FormOnSubmit() {
window.parent.returnValue = "R";
}
Using this as a foundation, we were able to develop true multipage Wizard dialogs and Tabbed dialogs.
onwards and upwards...
|
|
|
|
|
Cool, it works fine, Thanks.
|
|
|
|
|
Well done my friend...
Very good... Why dont you write an rticle about this?...
I am developing a web app which requires alot of wizards etc...
I think that I am going to use this..
Thanx alot...
|---------------|
| theJazzyBrain |
|---------------|
|
|
|
|
|
Who has time to write articles....and how interested are people here about HTML... seems to be a C++ dominated board. If you are interested, I could share with you some "wizard" templates and "tabbed dialog" templates.
onwards and upwards...
|
|
|
|
|
that would be great...
Although I haven't got anything to give you as I am still on design ...
implementation will start in 2,5 weeks...
but I am open to anything you can share...
And there are people who are developing heavy web apps, like me! and these tips are very helpful...
By the way, have you ever used the Web Service Behavior?
|---------------|
| theJazzyBrain |
|---------------|
|
|
|
|
|
Just some background: In addition to electronic mail campaign software, we have a group that develops a C++ targeted web application server. In addition, there are numerous client libraries that ship with the product. Items such as calculators, calendars, form validation, drilldown trees, wizard dialogs, tabbed dialogs, etc. What we try to do is provide the framework for developing the fastest, most scalable web apps possible, while providing the same functionality that you would get with a regular client app. So, many of these libraries have been developed over the last couple years.
But, I'd be glad to help you out.
onwards and upwards...
|
|
|
|
|
Interesting...
Well, I am a MSc in Distributed Information Systems student and I am doing my final project on Web Content Management Systems. I am developing a web based WCMS which has a very rich client interface. I am trying to make it look like MS Word in order to be familiar to the users. Hence I decided to have wizards and tabed dialogs for setting page properties, meta data, users and user groups, etc. and all these in modal dialogs...
thats why I found your code so helpful...
I would be interested in having a look at your wizard and tabbed dialogs...
Is there a web site that I can have a look at?
|---------------|
| theJazzyBrain |
|---------------|
|
|
|
|
|
|
Interesting...
I like the tabbed dialogs... it is excactly what I need...
Actually the app is abit similar to what I am doing...
I will show you when I have a demo up and running...
Where can I contact you?
|---------------|
| theJazzyBrain |
|---------------|
|
|
|
|
|
jeff@webogy.com
onwards and upwards...
|
|
|
|
|
Something similar I'm doing for the company I work for.
You can find a lot of useful informations at:
ms-help://MS.MSDNQTR.2002JUL.1033/ProgIE/workshop/author/editing/tutorials/html_editor.htm
|
|
|
|
|
I must not have left any light on in my cave. I just found out today that it appears the IFrame is cross browser compatible. When did that happen, I thought it was only for IE
Does any one know of cautions working with IFrame? I tried it on Mozila and Opera and both of them look mostly like IE except where the border is not set. Any other quirks with these? Seems REALLY handy for message bases and web sites where only the primary content panel is changed when selected to other pages are made. I am sure I can find a lot more uses but just want to make sure it is a smart thing to do.
Also, I work MOSTLY in C# under ASP.NET, anything to worry about there with IFrames?
Rocky Moore <><
|
|
|
|
|
From what I know my friend ASP.NET with c# will not affect your IFrames at all... as IFrames is client side and ASP.NET with C# is Server side...
It is a good question though if you want to go for IFrames... The only problem seems to be with older browsers and there are some people who still use Netscape 4.0 or IE 4.0... so you have to look at your target audience and make your decision...
I tent to use IFrames only when developing IE 5.0 and above based Intranets..
tough decisions.... I know my friend...
|---------------|
| theJazzyBrain |
|---------------|
|
|
|
|
|
How would one go about determining the date a file was created on a client machine, after the file has been uploaded to a web server, using ASP.net?
I have only been able to come up with using Javascript and a FileSystemObject to actually determine the create date and send that with the file, but this has serious security issues.
|
|
|
|
|
ProffK wrote:
How would one go about determining the date a file was created on a client machine, after the file has been uploaded to a web server, using ASP.net?
Impossible, if you ask me. Unless of course you do what you did on the client machine.
|
|
|
|
|
I am displaying data through asp page and changing the contenttype to exel so that some body can save that on their pc.Now i want the compressed excel file
from asp.Can u help me
|
|
|
|
|
Using Perl's CGI.pm, I created two "popup menus" (drop-down menus). When the page first loads, the 1st menu will lists the names of all available customers (after querying the database). I got this to work.
Now, when the user selects a name from that drop-down menu, the 2nd menu should be DYNAMICALLY populated with products that were bought ONLY by the selected customer, and not all products in the database. In other words, I will use the Customer ID obtained from the 1st menu to query the database for a list of products specific to that customer, and list them in the 2nd menu. How do I do this?
I would think that I need to use Javascript and attach an "onChange" event to the 1st menu. But then how do I code a javascript function that will query a database on the server side?
I know how to do it in .NET, but I'm a newbie to Perl (and I'm not allowed to use Perl.NET). I was wondering how I can induce a postback to the server in Perl so that I can perform database operations. Thanks.
|
|
|
|
|
Hi there
is there scripts available that ensures that the user can't download pictures from your website?
tx
|
|
|
|
|
This has been a recurring topic on the Evolt mailing list. The general consensus is that if you make the image viewable, it can be grabbed by the user. After all, they're downloading the image to view it anyway
Here's a link to one basic form of "image protection":
http://www.xs4all.nl/~ppk/js/index.html?improt.html[^]
Don't think it's full-proof, though. Another option I've seen people try is embedding the image in Flash or a Java applet. All of these methods fail on the case where a user just takes a screenshot of their brower window, with the image being displayed in it.
Probably the best bet is to not even try tricks like the above, and just add a watermark to images you don't want people to steal.
- Mike
|
|
|
|
|
that is just so stupid.
in the text of that protection "there is two ways to copy an image , 1) "save as" 2) drag the image to your desktop"
printscreen always work!
//Roger
|
|
|
|
|
Is there any way to get around the fact that the "position" style attribute is read-only? I'm wanting to change an HTML element's "position" style attribute after the element is created. There must be some way, and I thought surely someone around here would know.
"Blessed are the peacemakers, for they shall be called sons of God." - Jesus
"You must be the change you wish to see in the world." - Mahatma Gandhi
|
|
|
|
|