/    Sign up×
Community /Pin to ProfileBookmark

input form layering

I have a Javascript mouseover pop up drop down that gives me links when I put my mouse over a link. It works great but when the pop up drop down goes over a form input part the input part (the rectangular input entry area) seems to always show up (only the rectangular entry part) over the pop up drop downs. In other words I cant hide the input form rectangular box as it seems to be the primary layer that never disappears. Anyway to make an input form not be the primary layer all the time? I dont want it to be hidden but want my pop up drop downs to layer over the input form entry. Anyone have any suggestions??? I am working with Netscape 4.

Here is my form entry.

<form action=”form.html”>
<input type=”Text” name=”myname”>

</form>

to post a comment
JavaScript

3 Comments(s)

Copy linkTweet thisAlerts:
@gil_davisFeb 10.2003 — Congratulations! You have asked the #1 FAQ menu question!

Objects, Embeds and (some) Forms will always appear above HTML objects like pop-up menus, and z-index will do you no good on most (if not all) browsers. Your only choice is to MOVE IT or HIDE IT.
Copy linkTweet thisAlerts:
@floridaauthorFeb 10.2003 — How would I hide it on the pop up?

I understand the hidden property but not sure how I would use it for this to work? Any suggestions??



if something

{

<form action="form.html">

<input type="Text" name="myname">

</form>

}

else

{

<form action="form.html">

<input type="hidden" name="myname">

</form>

}
Copy linkTweet thisAlerts:
@gil_davisFeb 10.2003 — That's pretty funny!

Seriously, you cannot mix javascript and HTML like that.

If you choose to attempt to hide a form using JavaScript in NS 4, you are in for a rough road. You will have to 1) enclose the whole form in a layer that is initially declared "visibility: visible", 2) change the event handler that makes the menu appear such that the form layer is made "hidden", and 3) change the event handler that makes the menu hide such that the form layer is made "visible".

For example:

[font=monospace]<head>

<script>

function showMenu() {

if (document.layers) document.formLayer.visibility = "hide";

// do the normal menu stuff

}

function hideMenu() {

if (document.layers) document.formLayer.visibility = "show";

// do the normal menu stuff

}

</script>

</head>

<body>

...

<script>

if (document.layers)

{document.writeln('<ilayer name="formLayer">');}

</script>

<form action="form.html">

<input type="Text" name="myname">

</form>

<script>

if (document.layers)

{document.writeln('</ilayer>');}

</script>

...

</body>[/font]
×

Success!

Help @florida 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 5.20,
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: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

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

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...