Digital Workshop

Welcome to the Digital Workshop Message Boards
It is currently April 22nd, 2025, 10:52 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 8 posts ] 
Author Message
 Post subject: Disable Objects from Master page
PostPosted: March 17th, 2005, 7:51 pm 
Offline

Joined: November 3rd, 2004, 2:22 pm
Posts: 54
Location: Kent, Ohio, USA
Is it possible to disable an object/button that is on a master page? Ideally. I'd like to be able to hide the button I don't want available.

Thinking about it, I could create multiple master pages with the elements I want hidden not there, but would it be useful to ba able to say that we don't want to have certain elements from a master page on a certain page?

Opus ProXE 2.81

_________________
Tom Hutchins
The Davey Institute
Kent, OH
800-445-8733
http://www.davey.com

Opus ProXE 5.5
Windows XP SP2


Top
 Profile Visit website  
 
 Post subject: disable button on masterpage
PostPosted: March 17th, 2005, 9:21 pm 
Offline

Joined: February 4th, 2005, 5:59 am
Posts: 81
Location: Bristol, UK
I don't know whether this thread is any help:

viewtopic.php?t=537&highlight=master

This uses a frame on the masterpage above the button which stops mouse-clicks from passing through and is initially hidden. Don't know if that helps...

I think the option of being to base MasterPages on other MasterPages would be very useful but currently not available - maybe one for the wishlist!

Also - maybe you could try show() or hide() the button using script on the Masterpage according to the pagename. I haven't tried it, but does this sound like what you want?

Best

Melanie

_________________
Win XP, 3.4 HT P4, 1GB ram, Nvidia Geforce 6610 XL, DirectX 9.0c
Opus Pro 04 XE version 4.50
Opus 2.81


Top
 Profile  
 
 Post subject: Try thins:
PostPosted: March 18th, 2005, 4:43 am 
Offline

Joined: February 4th, 2005, 5:59 am
Posts: 81
Location: Bristol, UK
Let me know if this is any use: :)

It uses script on the master page to check for a string in the pagename and shows a frame which stops clicks through to the button...Pub level variable pagename.

I've looked for the strings "TypeA" and "TypeB" in the pagename to denote pages that behave differently (access to different buttons) ...but you could also allow buttons according to username or security level or settings in a database...


Cheers


Melanie :D

PS... if you substitute the following in the script and make the buttons initially hidden, the buttons appear and disappear according to page:

Code:
if (typa)
   {
   Button_2.Show()
   }
else
   {
   Button_1.Show()
   }


You do not have the required permissions to view the files attached to this post.

_________________
Win XP, 3.4 HT P4, 1GB ram, Nvidia Geforce 6610 XL, DirectX 9.0c
Opus Pro 04 XE version 4.50
Opus 2.81


Top
 Profile  
 
 Post subject:
PostPosted: March 18th, 2005, 3:27 pm 
Offline

Joined: November 3rd, 2004, 2:22 pm
Posts: 54
Location: Kent, Ohio, USA
Melanie,

I'll give it a shot. I hadn't thought about using scripts and page name strings to disable buttons.

Thanks for taking the time to pull this together.

_________________
Tom Hutchins
The Davey Institute
Kent, OH
800-445-8733
http://www.davey.com

Opus ProXE 5.5
Windows XP SP2


Top
 Profile Visit website  
 
 Post subject: Vary Masterpage according to db user authorisation
PostPosted: March 19th, 2005, 4:29 am 
Offline

Joined: February 4th, 2005, 5:59 am
Posts: 81
Location: Bristol, UK
No problem, Tom - I'm learning myself as I go. And this is one of my own functionality requirements for the publication I'll start once I've learnt enough Opus... :D

I've played around some more tonight and got something that doesn't use frames anymore, but shows/hides/disables buttons according to a field in an Access database, and changes to using arrow keys to navigate according to another.

It may well be more than you want or need at this stage, but I'll load it up on this thread in case it's useful to anyone else, now or in the future. :)

I'd be grateful if any experienced OpusScripters would check it for errors or suggest improvements - I know my clunky, ugly code must have you wincing...!

Ideally I would have liked a case statement or an elsif gizmo, but I can't seem to find either in script... :?:

Thanks,

Melanie


You do not have the required permissions to view the files attached to this post.

_________________
Win XP, 3.4 HT P4, 1GB ram, Nvidia Geforce 6610 XL, DirectX 9.0c
Opus Pro 04 XE version 4.50
Opus 2.81


Top
 Profile  
 
 Post subject: SWitch case
PostPosted: March 19th, 2005, 10:02 am 
Offline

Joined: November 11th, 2004, 4:05 am
Posts: 636
Location: Christchurch, NZ
Hi Melanie
There is no switch statement in Opus, but you can use a series of if and if else statements to achieve the same thing.

Switch
case:
case:
case:
case:
case:
default

is the same as

if (){}
if else (){}
if else (){}
if else (){}
if else (){}
else {}

cheers
Paul


Top
 Profile  
 
 Post subject: Thanks Paul
PostPosted: March 21st, 2005, 6:59 am 
Offline

Joined: February 4th, 2005, 5:59 am
Posts: 81
Location: Bristol, UK
Thanks Paul, I'm inwardly digesting... :)

If anyone has time could they cast an eye of the script on

viewtopic.php?p=2587#2587

See if it looks ok?

Thanks

Melanie

_________________
Win XP, 3.4 HT P4, 1GB ram, Nvidia Geforce 6610 XL, DirectX 9.0c
Opus Pro 04 XE version 4.50
Opus 2.81


Top
 Profile  
 
 Post subject:
PostPosted: March 21st, 2005, 8:45 pm 
Offline

Joined: February 15th, 2005, 12:00 am
Posts: 7
Location: Venezuela
Thanks Melanie

I really appreciate your help....I have just looking for how to hide objects from master page, I will give it a try!

Leonardo

_________________
Hipocampus Multimedia Approach


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group