Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jakarta.ee-community] [EXTERNAL] Re: Hiding Form Object Without Javascript
  • From: Reza Rahman <Reza.Rahman@xxxxxxxxxxxxx>
  • Date: Thu, 15 Dec 2022 20:51:58 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=microsoft.com; dmarc=pass action=none header.from=microsoft.com; dkim=pass header.d=microsoft.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=kvvDwHgblw94UD2nh94B9TAK4CORPTC5jT7quOfVOHs=; b=G4SBAhzreyRYgxvy3sxwZF5mG7MXLZqGARPx4hwQ241YgXAOoYSeLhb9MCP+bSkDJkhktUQZQI0vZMX+I0EN4M2jBkqeQKdi4cuaNu8RCxVsTgNerplREO8Rj3ka0kqdPWpFX4mSJb9uWE4wTgePRN18szdHCM6LXIzaOZPpzpAl1m8vCyHeIzRqWkr0rJNOVcDq/sl1WjvmNS+av6CUczFKBy1TWFsfXCIiWhc/sFjSvLyPVfxNRXag+s7IA7N8pUO04yiXTOaJ4O2ZYgVgTEJqZgwePZn9vN4hrvx5K3ktHSJ+IOHlaUZPhHmO0FBIBvWPj4gJIkeo0uXh4gbqMQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=eWVFDBdp8KWXXz+r8I9pekHWrdwuO6R7I4jvYI4/rgoapMPVvBcTYZTEFNxg1KwB0ATi4S3WQY20+dW+/oueiU2uBBP1hYxeACb/INSIf6bmR5T873LHM6zpi3nO0ixYh1tglNnT8kzDk+STpkn+CpqUgxrMB8+qJ80LPBUQGsWJ2nurPkbQcLjaeRgwPyeyN2o33jbeBe34mzIYjKO9B3cpF9EU+fkzlwt1rpTEtCVP/IQmAgzCfyfzqf8tXbqsPc5VELkXtWHzuxVbViTqjC3zBj6ssQ2ZjgNeNb4PlgQZPDkQ1Ep1BbK0UJpfmvclWM7Fo1y/Q2BRtzXQ63PGVA==
  • Delivered-to: jakarta.ee-community@xxxxxxxxxxx
  • List-archive: <https://www.eclipse.org/mailman/private/jakarta.ee-community/>
  • List-help: <mailto:jakarta.ee-community-request@eclipse.org?subject=help>
  • List-subscribe: <https://www.eclipse.org/mailman/listinfo/jakarta.ee-community>, <mailto:jakarta.ee-community-request@eclipse.org?subject=subscribe>
  • List-unsubscribe: <https://www.eclipse.org/mailman/options/jakarta.ee-community>, <mailto:jakarta.ee-community-request@eclipse.org?subject=unsubscribe>
  • Msip_labels: MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_ActionId=2f6b1125-f856-41e5-807c-66c38a11811d; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_ContentBits=0; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Enabled=true; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Method=Standard; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Name=Internal; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SetDate=2022-12-15T20:51:10Z; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SiteId=72f988bf-86f1-41af-91ab-2d7cd011db47;
  • Thread-index: AQHZEMX0hRZVbPcDlkiOQ61D4AHCcq5vbGDA
  • Thread-topic: [EXTERNAL] Re: [jakarta.ee-community] Hiding Form Object Without Javascript

Agree. I can recommend: https://coderanch.com/f/82/JSF. Hope it helps.

 

From: jakarta.ee-community <jakarta.ee-community-bounces@xxxxxxxxxxx> On Behalf Of Werner Keil
Sent: Thursday, December 15, 2022 3:44 PM
To: Jakarta EE community discussions <jakarta.ee-community@xxxxxxxxxxx>
Subject: [EXTERNAL] Re: [jakarta.ee-community] 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_.

 

Werner

 

 

 

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 (menuid.style.display === "none") {

        menuid.style.display = "";

    } else {

        menuid.style.display = "none";

    }

}

 

Xhtml Code:

 

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

<!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"

      xmlns:h="http://xmlns.jcp.org/jsf/html">

    <h:head>

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

        <title>Header Page</title>

    </h:head>

    <h:body>

        <h:form>

            <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>

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

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

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

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

            </div>

            <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"/>

            </div>

        </h:form>

    </h:body>

</html>

 

 

Mehmet Fatih ÇİN

 

 

_______________________________________________
jakarta.ee-community mailing list
jakarta.ee-community@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/jakarta.ee-community


Back to the top