pop-up screen

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

Please do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.

This forum is for discussing mojoPortal development

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

You can monitor commits to the repository from this page. We also recommend developers to subscribe to email notifications in the developer forum as occasionally important things are announced.

Before posting questions here you might want to review the developer documentation.

Do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.
This thread is closed to new posts. You must sign in to post in the forums.
9/29/2005 1:10:21 PM
Gravatar
Total Posts 73

Re: pop-up screen

Hi all,

In a previous application I created, I used a pop-up screen. The function was defined in the html-representation of? the screen:

and then adding something to a button in an aspx

When I try this in my mojo-application, the pop-up screen will not open. I do not k now why. Any help would be welcome.

As an alternative I tried opening a new window wit the same functionality by creating a new page in Mojo and specifiying that the page should open in a new window. I specified not to show the menu on this page. That want work. A new page is opened, but the menu is still there. Am I doing something wrong?

Jan
9/29/2005 2:32:06 PM
Gravatar
Total Posts 148

Re: pop-up screen

Any javascript errors?

The following code:

Button1.Attributes.Add("onclick", "popUp(mymodule.aspx', 'console', 200, 400, 'Status details');return false");

Is missing a single quote (') before "mymodule.aspx".

--Dean
9/30/2005 9:35:01 AM
Gravatar
Total Posts 73

Re: pop-up screen

Sure. but that was a typo in the message to this forum. In the code it has a both quotes. Well noticed however.

Jan

 

 

9/30/2005 10:08:38 AM
Gravatar
Total Posts 148

Re: pop-up screen

Are you getting any errors in the javascript console on Firefox, or if you are using IE, have you enabled the option which pops up a dialog when an error occurs?  Also you could try adding a "window.alert('popUp() called');" inside of the popUp() function to see whether it is even getting called.  If it isn't, try using a different name (eg janPopUp) in case something else used by mojoPortal defines a function named popUp().

--Dean
9/30/2005 10:16:06 AM
Gravatar
Total Posts 148

Re: pop-up screen

Also, if you do a View Source on the page that is generated, does the button have the "onclick" attribute set to the desired value?

--Dean
10/1/2005 12:17:11 AM
Gravatar
Total Posts 73

Re: pop-up screen

Yes.

Jan

10/1/2005 4:24:19 AM
Gravatar
Total Posts 148

Re: pop-up screen

Are you getting any errors in the javascript console on Firefox, or if you are using IE, have you enabled the option which pops up a dialog when an error occurs?  Also you could try adding a "window.alert('popUp() called');" inside of the popUp() function to see whether it is even getting called.  If it isn't, try using a different name (eg janPopUp) in case something else used by mojoPortal defines a function named popUp().
10/1/2005 10:54:17 AM
Gravatar
Total Posts 73

Re: pop-up screen

Dean,

About a year ago a have built an application using the portal stuff from www.asp.net as a basis. I encorperated the pop-up logic in it. It worked without a problem.

Now I am building a new application using Mojo. I copied the code from the other application in, but it will not work. I tried using FireFox, and that does result in a pop-up. Funny thing is that the page the pop-up orriginates from, is being rebuilt. When I use IE, the page get rebuilt as well, but there is no pop-up.

When I use IE to access the old application, the pop-ups work fine, so it has nothing to do with the settings. I added the window alert code and it does prompt when I hot the button that should result in the pop-up.

Jan

 

 

10/1/2005 1:43:20 PM
Gravatar
Total Posts 73

Re: pop-up screen

The reason the rebuilt was done is because I changed "return false" in "return true". Changing it in the original code, resulted in Firefox not rebuilding the page.

So what remains is: the pop-up works when I use Firefox, but it fails when I use IE (6.0).

Jan
10/1/2005 2:20:48 PM
Gravatar
Total Posts 18439

Re: pop-up screen

I wonder if it could be a popup blocker, I understand that it works in your other site but maybe it is site specific or if the sites are in different zones or if one is a trusted site and the other is not or some other difference. Is it happening on your development machine using localhost? I would experiment with using very simple options or using all defaults or just '' for strOptions and see if that makes any difference. Is it running on a windows machine or mono? If mono, what version?

The popup for the upload progress bar works just fine in mojoportal so its hard to think there is something intrinsic to mojoportal that is causing this.

When you tried adding window.alert did you do it inside the popup function? I notice the script tag doesn't have language='javascript' or type='text/javascript'
10/1/2005 2:52:49 PM
Gravatar
Total Posts 73

Re: pop-up screen

It is defined as a second site in Mojo. Mojo is running under localhost, so I added this site using the name of my local machine: development.

Perhaps it is not recognized as an intranet site and therefor is effected by the IE settings for Internet sites. But then again, the old site was running on another machine.

window.alert was inside the popup function. Adding 'javascript' does not seem to be necesary. I develop and run everything in Windows (XP or Server 2003).

Perhaps you could try a test on your environment?

Jan
10/1/2005 3:47:37 PM
Gravatar
Total Posts 18439

Re: pop-up screen

Jan,

I was able to replicate the problem where it would work in Firefox but not IE. After a bit of research I was able to get it working in IE.
The problem is you are passing a page name instead of a target.
Accoring to this page http://msdn.microsoft.com/workshop/author/dhtml/reference/methods/open_0.asp
window.open( [sURL] [, sName] [, sFeatures] [, bReplace])
sName is not the caption for the page but the target like _blank or the name of a frame in a frameset
as soon as I changed 'Status details' to '_blank' it workes in IE and Firefox

Cheers,

Joe
10/2/2005 11:16:24 AM
Gravatar
Total Posts 73

Re: pop-up screen

Joe.

I changed the code and it worked without a problem. Then I started wondering why it didn't cause a problem in my other application. I use a meaningfull string there aswell. Looking into that code shows that I only used strings without a space. Changing _blank into xxxx als works!

I'll use _blank however.

Thanks Joe,

Regards,

Jan

You must sign in to post in the forums. This thread is closed to new posts.