Making the browser unresizable OR locking the elements position....URGENT

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.
1/12/2010 8:24:06 AM
Gravatar
Total Posts 17

Making the browser unresizable OR locking the elements position....URGENT

Hey guys, keep up the good work. 

I have a Question, is it possible for me to lock the dimensions of the browser to full screen(non-resizable). I have been looking for documentation to support this but i have had no such luck thus far.

Ideally what i would want to do is to make all elements on the page fixed (i.e. not move when the browser is resized). So if there any one can provide me with feedback to assist with any two of these problems it will be greatly appreciated.

New to Mojoportal, loving it thus far.

1/12/2010 8:52:34 AM
Gravatar
Total Posts 72

Re: Making the browser unresizable OR locking the elements position....URGENT

Hi Andrew,

If you are using a fixed width theme (such as the theme used on the mojoPortal site), your main elements will not resize when the browser is resized. Instead if the browser viewport is smaller than your content, scrollbars will be used.

You can create popup windows using a fixed width with the javascript method window.open() (see http://www.htmlcodetutorial.com/linking/linking_famsupp_120.html) but I would not recommend using this for your full site.

Hope this helps,

Ben

1/12/2010 8:56:33 AM
Gravatar
Total Posts 17

Re: Making the browser unresizable OR locking the elements position....URGENT

Hey Ben,

Thank you for your response, it seems as if the theme that I am using is not a fixed width theme. What I want to distinguish now is if there is a way to actually change this theme to a fixed width one (using scrollbars)?

Your help is appreciated,

Andrew

1/13/2010 2:22:22 PM
Gravatar
Total Posts 51

Re: Making the browser unresizable OR locking the elements position....URGENT

Which skin are you using?  Or if yours is a custom skin, which skin did you base yours off of?

You have 2 options I think:

a.) find a new base skin with a fixed width that suits your needs, copy it, and customize it to look the way you need, or

b.) Most skins have a containing div element that is your outermost object.  Check your page source code, then crack open your skin's CSS and modify that 'wrapper' element to be the fixed width you're after (1024 px most likely?)  You'll also likely want to center align the wrapper element, if it isn't naturally set up that way.   There may be a couple features that need to have their CSS modified as well, before it plays nicely. 

 

If you aren't familiar with CSS, there's plenty of CSS introductory material around on the web, but particularly after Joe's reorganization work in last month's release, Mojo's CSS is pretty straightforward.

1/14/2010 10:03:16 AM
Gravatar
Total Posts 190

Re: Making the browser unresizable OR locking the elements position....URGENT

<script type="text/javascript">
window.onload = sizeWindow;
window.onresize = sizeWindow;
function sizeWindow(){
window.resizeTo(800, 600);
}
</script>
 

This works pretty good if you just want to make sure the browser window stays at a certain size. It's not 100% reliable because it would be easy to disallow from the client browser. But if you are dealing with a fairly focused user base and they'll cooperate, then it can work just fine.

1/14/2010 11:00:27 AM
Gravatar
Total Posts 51

Re: Making the browser unresizable OR locking the elements position....URGENT

oh man...I guess it depends on the application.  If you're talking about a calendar feature or image browser, a new window with that JS in it to keep it sized might be OK.  If it's for an intranet, you could probably get away with it, but I still wouldn't recommend it. 

If you used that script on a public site (and I didn't have my browser configured to ignore resize scripts) I would either a.) think it was a popup and close it immediately, or b.) stay just long enough to find a 'contact us' link and send you a nasty email.  Either way, the user isn't even going to glance at your content.

 

forcing browser resize on a site is a great way to ensure 100% of your visitors never, ever come back.  No insult meant to you, John, your solution is technically correct, but I just don't think you should ever do that to a user.

1/14/2010 11:12:54 AM
Gravatar
Total Posts 190

Re: Making the browser unresizable OR locking the elements position....URGENT

No offense, and I totally agree. I would never use a hack like that on a public site just to preserve some formatting. But it sounded like the poster might be talking about something for a focused audience and was looking for an easier fix than reworking his master page. It was just a thought.

1/14/2010 12:17:14 PM
Gravatar
Total Posts 17

Re: Making the browser unresizable OR locking the elements position....URGENT

Hi guys, I'm the Poster.

Ideally, i would not want to make the browser unresizable. However, if I encounter problems making the browser have a fixed width (scrollable) then i will look into that option.

I will be reviewing this thread and provide feedback later today. Thank you all for your help thus far.

 

Andrew

1/14/2010 2:04:50 PM
Gravatar
Total Posts 17

Re: Making the browser unresizable OR locking the elements position....URGENT

Guys,

Thanks much, problem solved. Increased the fixed width of the page as mentioned by previous poster.

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