473,657 Members | 2,523 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

set a div tag property to visible or hide from javascript

I need to set my div tag

(<div id="divBioBotto m"> content </div>)

to either visible or hidden from javascript. Does anyone know how to do this?

Thanks.
7078895

/ra
Jul 20 '05 #1
4 55368
SpamProof hu kiteb:
I need to set my div tag

(<div id="divBioBotto m"> content </div>)

to either visible or hidden from javascript. Does anyone know how to
do this?


You can't set it to be invisible or hidden from javascript. Javascript
is the all-seeing eye, at least within teh context of a html page.
however, you can use a css, and even manipulate css properties with
javascript, to make it invisible or hidden to the average human at teh
other end of the gui.
--
--
Fabian
Visit my website often and for long periods!
http://www.lajzar.co.uk

Jul 20 '05 #2
In article <8c************ **************@ posting.google. com>,
sp***********@y ahoo.com enlightened us with...
I need to set my div tag

(<div id="divBioBotto m"> content </div>)

to either visible or hidden from javascript. Does anyone know how to do this?

Thanks.
7078895

/ra


(not tested - watch for typos)
IE4+ and NN6+ should be fine with this. Dunno about other browsers, but
Opera had a problem with styles the last I checked (which was a couple
versions ago, so might be fixed).
Add a layers statement for NN4.

<div id="divBioBotto m" name="divBioBot tom">

if (document.getEl ementById)
{
if (document.getEl ementById("divB ioBottom").styl e)
document.getEle mentById("divBi oBottom").style .visibility="hi dden";
}
else if (document.all && !document.getEl ementById)
document.divBio Bottom.visibili ty="hidden";

--
--
~kaeli~
Press any key to continue or any other key to quit
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace

Jul 20 '05 #3
> I need to set my div tag

(<div id="divBioBotto m"> content </div>)

to either visible or hidden from javascript. Does anyone know how to do this?


Is this what you are looking for? (Works in NN 7.0, Linux box)

<html>
<head>
<script type = "text/javascript">
<!--
function hide(x) {
document.getEle mentById(x).sty le.display='non e';
}
function show(x) {
document.getEle mentById(x).sty le.display='';
}
//-->
</script>
</head>
<body>
<input type="button" value="Show" onClick="show(' divBioBottom')" >
<input type="button" value="Hide" onClick="hide(' divBioBottom')" >
<br>

Line 1<br>
<div id="divBioBotto m">
content
</div>
Line 3<br>
</body>
</html>
Regards,
Robert
Jul 20 '05 #4
That's exactly what I needed. Thanks so much!!!!!!!!!!! !!!!!!!
---------
ro***********@n etscape.net (Robert Meineke) wrote in message news:<2a******* *************** ****@posting.go ogle.com>...
I need to set my div tag

(<div id="divBioBotto m"> content </div>)

to either visible or hidden from javascript. Does anyone know how to do this?


Is this what you are looking for? (Works in NN 7.0, Linux box)

<html>
<head>
<script type = "text/javascript">
<!--
function hide(x) {
document.getEle mentById(x).sty le.display='non e';
}
function show(x) {
document.getEle mentById(x).sty le.display='';
}
//-->
</script>
</head>
<body>
<input type="button" value="Show" onClick="show(' divBioBottom')" >
<input type="button" value="Hide" onClick="hide(' divBioBottom')" >
<br>

Line 1<br>
<div id="divBioBotto m">
content
</div>
Line 3<br>
</body>
</html>
Regards,
Robert

Jul 20 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
12056
by: Mark | last post by:
Sorry, I'm a newbie to php ;) I was thinking about using php to write the script file, something like: <script type="text/javascript" src="http://insert_url_here.com/myScript.php"></script> The php file then echo'ing the source code. If that works then how can I stop the php file being loaded directly, that is the user browsing
4
2175
by: Julie Siebel | last post by:
Apologies...I'm sure this has been asked before, but I can't seem to come up with the correct Google search terms. While my problem is with stylesheets, the errors are being caused by my javascript, so this seemed a more appropriate place to post. I'm using a media=print style sheet to do a version of a web page that I am building. Currently, I'm working on the IE version. I have an HTML page and 2 style sheets which all validate...
3
10405
by: dricks dr | last post by:
Hi, I'm using the AxWebBrowser Control from microsoft in a C# application. It works fine, but i have many problems to hide the javascript error windows that appear when u visit a website with... javascript errors :) I can catch errors coming from website that does not use frames using : private void NavigateComplete(object sender,AxSHDocVw.DWebBrowserEvents2_NavigateComplete2Event e) {
4
1738
Coldfire
by: Coldfire | last post by:
I know javascript code executes at client end i.e. at browser, BUT is there any way to hide ur javascript functionality?
8
4444
by: Ciaran | last post by:
I have a piece of code that I'd rather google's spider did not follow. Is this possible please?
6
1629
by: mic123 | last post by:
Other than not using them...?
47
65336
by: SOLAV | last post by:
This is the only working way to completely hide your JavaScript code from the client just like PHP or ASP code. Here we'll need the help of PHP. Here is the code: index.php ________________________________________________________ <?PHP @session_start(); //Start our session. if(@!session_is_registered('PrintTheJavaScript')){ //If the session is not registered (and it's not). @session_register('PrintTheJavaScript'); //Register the...
3
1070
by: Prefers Golfing | last post by:
I'm using AJAX and creating dynamic javascript for an iframe. I want to hide the javascript. What is the best way?
1
1589
by: dylanb | last post by:
Hi can anyone tell me how to alter this script so it will works on classes and id's; <script> function showhide(id){ if (document.getElementById){ obj = document.getElementById(id); if (obj.style.display == "none"){ obj.style.display = ""; } else { obj.style.display = "none";
15
5139
by: londres9b | last post by:
I have this on my css style: <style type="text/css"> #container {visibility:hidden; width: 1000px; position: relative; margin-top: 0px; margin-left: auto; margin-right: auto;
0
8305
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8823
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8726
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8503
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8603
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7320
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5632
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
2726
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1604
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.