Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [] Hiding Form Object Without Javascript

 The reason I asked this group is to find out if such a solution exists in the Jakarta 9.1 library.
 So I want to find out if what needs to be done with _javascript_ can be done with the Jakarta library.

Mehmet Fatih ÇİN

Gönderen: Werner Keil <werner.keil@xxxxxxxxx> adına <>
Gönderildi: Thursday, December 15, 2022 11:43:37 PM
Kime: Jakarta EE community discussions <>
Konu: Re: [] Hiding Form Object Without _javascript_
I'm not sure if that's the right group for this?

Maybe you should try faces-dev or a totally different list/forum dedicated to _javascript_.


On Thu, Dec 15, 2022 at 9:03 PM Mehmet Fatih ÇİN <mfatihcin@xxxxxxxxxxxxxx> wrote:

Hi, I want to hide a "div" with a <h:commandButton/> object. But every time I click the button it seems like the div is hidden and shown again. I tried to do this with _javascript_ but I couldn't. Is it possible to do this with jakarta library without _javascript_?

The codes are below. Could you check the codes and report the error?


_javascript_ Code:


function menuGizleGoster() {

    var menuid = document.getElementById("solDiv")

    if ( === "none") { = "";

    } else { = "none";




Xhtml Code:


<?xml version='1.0' encoding='UTF-8' ?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">

<html xmlns=""



        <h:outputScript name="/js/script.js"/>

        <title>Header Page</title>




            <h:commandBacutton id="menuButton" value="Menü" _onclick_="menuGizleGoster()"/>

            <div id="solDiv" style="background-color: #121e2d; color: #ffffff;

                 font-family: Verdana; font-size: 12px;

                 margin: 0px; padding: 10px;">

                <h:outputText value="Sol"/>


            <div id="SagDiv" style="background-color: #121e2d; color: #ffffff;

                 font-family: Verdana; font-size: 12px;

                 margin: 0px; padding: 10px;">

                <h:outputText value="Sağ"/>


            <div id="ortaDiv" style="background-color: #121e2d; color: #ffffff;

                 text-align: center; font-family: Verdana; font-size: 12px;

                 margin: 0px; padding: 20px 10px 0px 10px;">

                <h:outputText value="BİLİŞİM UYGULAMASI"/>







Mehmet Fatih ÇİN



_______________________________________________ mailing list
To unsubscribe from this list, visit

Back to the top