/    Sign up×
Community /Pin to ProfileBookmark

problem on dropdown menu?

I am new to javascript.
I want to design dropdown menu.This menu contains two item(save,saveContent).When mouse over on Menu then display below like that


____________

Menu |
————-|
Save |

SaveContent |
————–

When click on “Save” item then the Menu will be changed to One “TextBox”
and “GO Buttoon” on dropdown menu.


____________

Menu |
————–

________ |
_
__
_____| GO |

SaveContent |
————–

first, is it possible?
if possible, plz tell me the code.

to post a comment
JavaScript

2 Comments(s)

Copy linkTweet thisAlerts:
@vwphillipsAug 25.2008 — [CODE]<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

<head>
<title></title>
<script language="JavaScript" type="text/javascript">
/*<![CDATA[*/

function M(obj){
var zxcevt=window.event||arguments.callee.caller.arguments[0];
var zxcobj=window.event?zxcevt.srcElement:zxcevt.target;
obj.test=true;
var divs=obj.getElementsByTagName('DIV')
divs[0].style.display='block';
if (zxcevt.type=='mouseout'&&zxcCkEventObj(zxcevt,obj)){
divs[1].style.display='block';
divs[2].style.display='none';
divs[0].style.display='none';
}
}

function MM(obj){
var divs=obj.parentNode.getElementsByTagName('DIV')
divs[1].style.display='block';
divs[0].style.display='none';
}

function zxcCkEventObj(zxce,zxcprop){
if (!zxce) var zxce=window.event;
zxce.cancelBubble=true;
if (zxce.stopPropagation) zxce.stopPropagation();
if (zxce.target) zxceobj=zxce.target;
else if (zxce.srcElement) zxceobj=zxce.srcElement;
if (zxceobj.nodeType==3) zxceobj=zxceobj.parentNode;
var zxceobj=(zxce.relatedTarget)?zxce.relatedTarget:(zxce.type=='mouseout')?zxce.toElement:zxce.fromElement;
if (zxceobj==zxcprop) return false;
while (zxceobj.parentNode){
if (zxceobj==zxcprop) return false;
zxceobj=zxceobj.parentNode;
}
return true;
}

/*]]>*/
</script></head>

<body>

</body>
<div style="position:relative;width:100px;height:20px;background-Color:#FFFFCC;"
onmouseover="M(this);"
onmouseout="M(this);"
>
Menu
<div style="position:relative;display:none;width:100px;height:20px;background-Color:#FFFFCC;" >
<div style="position:relative;width:100px;height:20px;background-Color:#FFFFCC;" onclick="MM(this);" >
Save</div>
<div style="position:relative;width:100px;height:20px;background-Color:#FFFFCC;" >
<input type="text" size="5" /><input type="button" name="" value="Go" /></div>
<div style="position:relative;width:100px;height:20px;background-Color:#FFFFCC;" >
Save Content</div>
</div>
</div>
</html>[/CODE]
Copy linkTweet thisAlerts:
@dittuauthorAug 26.2008 — That code is working good but

can u send above code using ajax or dhtml?
×

Success!

Help @dittu spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.17,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...