HighDots Forums  

Select Menu Javascript Question Hidden/Visible areas

Macromedia Dreamweaver Macromedia Dreamweaver Discussions (macromedia.dreamweaver)


Discuss Select Menu Javascript Question Hidden/Visible areas in the Macromedia Dreamweaver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Prit
 
Posts: n/a

Default Select Menu Javascript Question Hidden/Visible areas - 08-25-2004 , 06:27 PM






Hi
Earlier I had asked the a javascript question but did not get an answer
(Murray did try to help me though.)and I have managed to get it working
though not fully well. Here is the code for the page. The problem is that
once i select a different number on the drop down the earlier selection
should be replace. It does not do it now. It remains in place. I hope
someone can figure it out.
thanks in advance
Prit

<script language="JavaScript">
<!--
function MM_jumpMenu(selObj){ //v3.0
if (selObj.value==2){
document.getElementById('boo').style.display=selOb j.value==2?'block':'none';
}
if(selObj.value==1){
document.getElementById('foo').style.display=selOb j.value==1?'block':'none';
}
}

//-->
</script>
<body>
<form>
<select name="dropdown" size="1" onchange="MM_jumpMenu(this)">

<option>Select</option>
<option value="1">1</option>
<option Value="2">2</option>
<option>3</option>
<option>4</option>
<option>5</option>
</select>
<table>
<tr id="boo" style="display:none;">
<td>New text field:</td>
<td><input name="newField" type="text" size="20"></td>
</tr>
<tr id="foo" style="display:none;">
<td>New text field:</td>
<td><input name="newField2" type="text" size="2"></td>
</tr>
</table>
</form>

</body>
</html>



Reply With Quote
  #2  
Old   
Mick White
 
Posts: n/a

Default Re: Select Menu Javascript Question Hidden/Visible areas - 08-25-2004 , 10:39 PM






<script type=="text/JavaScript">

function Prit_jumpMenu(selObj){ //v3.0
if(document.getElementById){// check if browser supports the method
document.getElementById('boo').style.display=selOb j.value==2?'block':'none';
document.getElementById('foo').style.display=selOb j.value==1?'block':'none';
}
}

</script>
And if you modify MM's functions, you should at least remove the MM prefix.

Mick

Prit wrote:
Quote:
Hi
Earlier I had asked the a javascript question but did not get an answer
(Murray did try to help me though.)and I have managed to get it working
though not fully well. Here is the code for the page. The problem is that
once i select a different number on the drop down the earlier selection
should be replace. It does not do it now. It remains in place. I hope
someone can figure it out.
thanks in advance
Prit

script language="JavaScript"
!--
function MM_jumpMenu(selObj){ //v3.0
if (selObj.value==2){
document.getElementById('boo').style.display=selOb j.value==2?'block':'none';
}
if(selObj.value==1){
document.getElementById('foo').style.display=selOb j.value==1?'block':'none';
}
}

//--
/script
body
form
select name="dropdown" size="1" onchange="MM_jumpMenu(this)"

option>Select</option
option value="1">1</option
option Value="2">2</option
option>3</option
option>4</option
option>5</option
/select
table
tr id="boo" style="display:none;"
td>New text field:</td
td><input name="newField" type="text" size="20"></td
/tr
tr id="foo" style="display:none;"
td>New text field:</td
td><input name="newField2" type="text" size="2"></td
/tr
/table
/form

/body
/html



Reply With Quote
  #3  
Old   
Prit
 
Posts: n/a

Default Re: Select Menu Javascript Question Hidden/Visible areas - 08-26-2004 , 01:02 PM



Mark
It worked great ....thank you so much.. I greatly appreciate your help.
I will keep ur suggestion in mind... about the name change
Prit

"Mick White" <mwhite13 (AT) BOGUSrochester (DOT) rr.com> wrote

Quote:
script type=="text/JavaScript"

function Prit_jumpMenu(selObj){ //v3.0
if(document.getElementById){// check if browser supports the method

document.getElementById('boo').style.display=selOb j.value==2?'block':'none';

document.getElementById('foo').style.display=selOb j.value==1?'block':'none';
}
}

/script
And if you modify MM's functions, you should at least remove the MM
prefix.

Mick

Prit wrote:
Hi
Earlier I had asked the a javascript question but did not get an answer
(Murray did try to help me though.)and I have managed to get it working
though not fully well. Here is the code for the page. The problem is
that
once i select a different number on the drop down the earlier selection
should be replace. It does not do it now. It remains in place. I hope
someone can figure it out.
thanks in advance
Prit

script language="JavaScript"
!--
function MM_jumpMenu(selObj){ //v3.0
if (selObj.value==2){

document.getElementById('boo').style.display=selOb j.value==2?'block':'none';
}
if(selObj.value==1){

document.getElementById('foo').style.display=selOb j.value==1?'block':'none';
}
}

//--
/script
body
form
select name="dropdown" size="1" onchange="MM_jumpMenu(this)"

option>Select</option
option value="1">1</option
option Value="2">2</option
option>3</option
option>4</option
option>5</option
/select
table
tr id="boo" style="display:none;"
td>New text field:</td
td><input name="newField" type="text" size="20"></td
/tr
tr id="foo" style="display:none;"
td>New text field:</td
td><input name="newField2" type="text" size="2"></td
/tr
/table
/form

/body
/html





Reply With Quote
  #4  
Old   
Mick White
 
Posts: n/a

Default Re: Select Menu Javascript Question Hidden/Visible areas - 08-26-2004 , 07:24 PM





Prit wrote:

Quote:
Mark
It worked great ....thank you so much.. I greatly appreciate your help.
I will keep ur suggestion in mind... about the name change
Prit
You don't have to change my name, though.
Mick


Reply With Quote
  #5  
Old   
Murray *TMM*
 
Posts: n/a

Default Re: Select Menu Javascript Question Hidden/Visible areas - 08-26-2004 , 07:31 PM



Mark that well, too!

--
Murray --- ICQ 71997575
Team Macromedia Volunteer for Dreamweaver
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com - Template Triage!
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
==================

"Mick White" <mwhite13 (AT) BOGUSrochester (DOT) rr.com> wrote

Quote:

Prit wrote:

Mark
It worked great ....thank you so much.. I greatly appreciate your help.
I will keep ur suggestion in mind... about the name change
Prit

You don't have to change my name, though.
Mick



Reply With Quote
  #6  
Old   
Mick White
 
Posts: n/a

Default Re: Select Menu Javascript Question Hidden/Visible areas - 08-27-2004 , 04:45 PM



Are you taking the mick?
(UK English)
Mick

Murray *TMM* wrote:

Quote:
Mark that well, too!


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.