Forum Four51° Forum Index
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Spec Form Show/Hide/Toggle Methods w/Drop Down Menu Option

 
Post new topic   Reply to topic    Forum Four51° Forum Index -> Pageflex (L3 - L4)
View previous topic :: View next topic  
Author Message
mvang



Joined: 29 Jan 2008
Posts: 80

PostPosted: Tue Sep 08, 2009 3:52 pm    Post subject: Spec Form Show/Hide/Toggle Methods w/Drop Down Menu Option Reply with quote

When selecting Iowa the Address 1 label and City lable and variable spec show than when I select Other the address 1 variable spec show.
When I go back to select Iowa nothing show (which is what it should be) and than when I select Other the Address and City label and variable spec show? Below are my script below.
What I'm trying to accomplish is when the customer select "Iowa" nothing show but when they select "Other" the variable spec Address1 and City show along with the label. this is kind of similar to my check box feature show/hide/toggle methods except i am using the drop down feature.

Item: BC-01 TESTING
Description: BC-01 TESTING
Buyer: Mary Greeley Medical Center

Edit HTML Tab:
<p><strong>Select Location:&nbsp;</strong> [[Address]] <br />
<span id="add1">Address 1 </span>[[OtherAddress1]] <br />
<span id="city">City </span>[[OtherCity]]</p>

Advanced Scripting Tab:
spec['OtherAddress1'].hide();
get('add1').hide();
spec['OtherCity'].hide();
get('city').hide();
spec['Address'].onchange = function(){
var choices = { "Iowa" : "Iowa", "Other" : "Other" }
if (this.selectedText() != "Iowa")
spec['OtherAddress1'].toggle();
get('add1').toggle();
spec['OtherCity'].toggle();
get('city').toggle();}
spec['OtherAddress1'].onselect = function(){
get('add1').hide();
if (this.value.length > 0)
get('add1').show();}

Any help is greatly appreciated.
Thanks in advanced.


Last edited by mvang on Wed Sep 09, 2009 11:23 am; edited 1 time in total
Back to top
View user's profile Send private message
mvang



Joined: 29 Jan 2008
Posts: 80

PostPosted: Wed Sep 09, 2009 9:01 am    Post subject: Reply with quote

Another method that works but the <pan> is not showing.

HTML
<p><strong>Select Location:&nbsp;</strong> [[Address]] <br>
<span id="add1">Address 1 </span>[[OtherAddress1]] <br />
</p>

Advanced Script
spec['OtherAddress1'].hide();
get('add1').hide();
spec['Address'].onchange = function(){
var choices = { "Iowa" : "Iowa", "Other" : "Other" }
if
(this.selectedText() != "Iowa")
spec['OtherAddress1'].show();
else
spec['OtherAddress1'].hide();}


Last edited by mvang on Wed Sep 09, 2009 11:24 am; edited 2 times in total
Back to top
View user's profile Send private message
Steve



Joined: 17 Jan 2008
Posts: 337

PostPosted: Wed Sep 09, 2009 10:49 am    Post subject: Try this. Hard to understand your needs. Reply with quote

<div><strong>Select Location:&nbsp;</strong> [[Address]]</div>
<div><span>Address 1 </span>[[OtherAddress1]]</div>

spec['Address'].onchange = function() {
get('OtherAddress').hide();
if (this.selectedText() == 'Other')
get('OtherAddress').show();
};
_________________
Steve

You can read about other advanced tech topics on the http://www.insightsfour51.com/?cat=3
Back to top
View user's profile Send private message
mvang



Joined: 29 Jan 2008
Posts: 80

PostPosted: Wed Sep 09, 2009 11:06 am    Post subject: Reply with quote

Thank you for the reply.
I copy and paste the code.

Blank selection include the span "Address" and variable spec "OtherAddress1".
"Iowa" selection include the span "Address"
"Other" selection include both "Address" and variable spec "OtherAddress1".

Is it possible to only show the "Address" and variable spec "OtherAddress1" when select "Other" and have nothing show when the blank (1st selection) or Iowa is selected.

Thank you in advanced.
MV
Back to top
View user's profile Send private message
Steve



Joined: 17 Jan 2008
Posts: 337

PostPosted: Wed Sep 09, 2009 11:10 am    Post subject: Reply with quote

mvang wrote:
Thank you for the reply.
I copy and paste the code.

Blank selection include the span "Address" and variable spec "OtherAddress1".
"Iowa" selection include the span "Address"
"Other" selection include both "Address" and variable spec "OtherAddress1".

Is it possible to only show the "Address" and variable spec "OtherAddress1" when select "Other" and have nothing show when the blank (1st selection) or Iowa is selected.

Thank you in advanced.
MV


Of course. Just change what your hiding/showing. I struggle to understand what you are specifically asking for.
_________________
Steve

You can read about other advanced tech topics on the http://www.insightsfour51.com/?cat=3
Back to top
View user's profile Send private message
mvang



Joined: 29 Jan 2008
Posts: 80

PostPosted: Wed Sep 09, 2009 11:13 am    Post subject: Reply with quote

I'm trying to hide the spec control name "Address" when selecting Iowa or the blank options.

spec['OtherAddress1'].hide(); *add to remove variable spec but the spec control name "Address" still show
spec['Address'].onchange = function() {
get('OtherAddress1').hide();
if (this.selectedText() == 'Other')
get('OtherAddress1').show(); };

Previous I added an Span ID:
HTML
<span id="add1">Address 1 </span>[[OtherAddress1]] <br />

ADVANCED SCRIPT
spec['OtherAddress1'].show();
get('add1').show();

MV
Back to top
View user's profile Send private message
Steve



Joined: 17 Jan 2008
Posts: 337

PostPosted: Wed Sep 09, 2009 12:31 pm    Post subject: Reply with quote

mvang wrote:
I'm trying to hide the spec control name "Address" when selecting Iowa or the blank options.

spec['OtherAddress1'].hide(); *add to remove variable spec but the spec control name "Address" still show
spec['Address'].onchange = function() {
get('OtherAddress1').hide();
if (this.selectedText() == 'Other')
get('OtherAddress1').show(); };

Previous I added an Span ID:
HTML
<span>Address 1 </span>[[OtherAddress1]] <br>

ADVANCED SCRIPT
spec['OtherAddress1'].show();
get('add1').show();

MV


hide is a function. It has to have a target. If it's the spec then you use the spec reference. If it's a DOM element you use the dom element reference.

spec['Address'].hide() or get('add1').hide()
_________________
Steve

You can read about other advanced tech topics on the http://www.insightsfour51.com/?cat=3
Back to top
View user's profile Send private message
mvang



Joined: 29 Jan 2008
Posts: 80

PostPosted: Mon Sep 21, 2009 11:47 am    Post subject: Reply with quote

The spec control name "Address 1" is still showing when selecting Iowa or the default blank options.

HTML
<div><strong>Select Location:&nbsp;</strong> [[Address]]</div>
<div><span id="add1">Address 1 </span>[[OtherAddress1]]</div>

Advanced Script
spec['OtherAddress1'].hide();
get('add1').hide();
spec['Address'].onchange = function() {
if (this.selectedText() == 'Iowa')
get('OtherAddress1').hide();
get('add1').hide();
if (this.selectedText() == 'Other')
get('OtherAddress1').show();
get('add1').show();
};

Item# BC01
Description: Drop Down Option
Catelog: Business Card
Buyer: Maiton Testing Site

Thank you in advanced.
MV
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Forum Four51° Forum Index -> Pageflex (L3 - L4) All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
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 can delete your posts in this forum
You can vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group