473,698 Members | 2,411 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

<div> problem

19 New Member
hello friend,i m using this code
Expand|Select|Wrap|Line Numbers
  1. <div id="get" style="visibility:hidden"><? include "time_title.php" ?></div>
in a php page,i want when page load the inclued page time_tiltle.php should not shown,when i click a button,it should appear.but i don't no wat.s the prob. when i open the page it showing the content of timr_title.php, the <div> visibility is hidden.i call a function in a button in which i m setting the visibilty of <div> 'visible'.but it' not working.second problem is that
if i remove the <div> and call it in a table,the page is shown,but the content of page is not shown,if i run this page (time_title.php ) alone its working fine.but if include it on another page,it not shown,if u thinking about address prob.,there is no prob. of address,because both page r in same folder.also its not displaying over all element of form,means over textbox,combo box etc,the combo box is showing over it.i think u all r getting what i m trying to say.pls help me
Jul 12 '07 #1
2 2520
henryrhenryr
103 New Member
i m using this code<div id="get" style="visibili ty:hidden"><? include "time_title.php " ?></div>
I think you're better off with style="display: none" to hide the div completely.

in a php page,i want when page load the inclued page time_tiltle.php should not shown,when i click a button,it should appear.but i don't no wat.s the prob. when i open the page it showing the content of timr_title.php, the <div> visibility is hidden.i call a function in a button in which i m setting the visibilty of <div> 'visible'.but it' not working.
Are you trying to use AJAX here? Perhaps Javascript would be a much easier solution. Have your button like this:
Expand|Select|Wrap|Line Numbers
  1. <input type="button" onclick="getElementById("get").style.display='block'" />
  2.  
Then your button will change the display of your div from 'none' to 'block'. If you're trying to use AJAX it's pretty complicated - and this is the PHP forum!

second problem is that
if i remove the <div> and call it in a table,the page is shown,but the content of page is not shown,if i run this page (time_title.php ) alone its working fine.but if include it on another page,it not shown,
This must be a typing error. Check your HTML for unclosed tags - I get this all the time. Also if you install the web developer toolbar in firefox you can get a better idea about these errors. Or check the DOM reader in firefox.
also its not displaying over all element of form,means over textbox,combo box etc,the combo box is showing over it
Not sure what this means?

Hope that helps ;) You could post some code and it would be easier to understand the problem!
Jul 12 '07 #2
ak1dnar
1,584 Recognized Expert Top Contributor
hello friend,i m using this code<div id="get" style="visibili ty:hidden"> in a php page,i want when page load the inclued page time_tiltle.php should not shown,when i click a button,it should appear.but i don't no wat.s the prob. when i open the page it showing the content of timr_title.php, the visibility is hidden.i call a function in a button in which i m setting the visibilty of 'visible'.but it' not working.second problem is that
if i remove the <div> and call it in a table,the page is shown,but the content of page is not shown,if i run this page (time_title.php ) alone its working fine.but if include it on another page,it not shown,if u thinking about address prob.,there is no prob. of address,because both page r in same folder.also its not displaying over all element of form,means over textbox,combo box etc,the combo box is showing over it.i think u all r getting what i m trying to say.pls help me

Please Use Clear English to write your question in if possible, try to avoid using abbreviations.
Try Like this.
Thanks.

[PHP]<html>
<head>
<script language="JavaS cript" type="text/javascript">
function showhide(show){
var obj = document.getEle mentById(show). style;
if(!obj.display )
obj.display = 'none';
else
obj.display = '';
}
</script>

</head>
<body>
<input name="btn_show_ hide" type="button" value="show/hide" onclick="javasc ript:showhide(' mydiv');" />
<div id="mydiv" style="display: none;">

</body>
</html>[/PHP]

inc.php
[PHP]<?php
echo 'This Line is there at inc.php'
?>[/PHP]
Jul 12 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

13
3397
by: Mikko Ohtamaa | last post by:
From XML specification: The representation of an empty element is either a start-tag immediately followed by an end-tag, or an empty-element tag. (This means that <foo></foo> is equal to <foo/>) From XHTML specification:
3
84605
by: Paul Thompson | last post by:
When I put a <div ...> inside a <table> specification, functionality is not there. When I put the <table> inside the <div> everything works. Why is that?
8
14463
by: Daniel Hansen | last post by:
I know this must seem totally basic and stupid, but I cannot find any reference that describes how to control the spacing between <p>...</p> and <div>...</div> blocks. When I implement these on a page, there is a huge gap (like 3/8 inch or 25 px) between them. This is driving me bananas. What the hey am I missing? dh ------------------------------------------------ Dan Hansen ------------------------------------------------
61
24480
by: Toby Austin | last post by:
I'm trying to replace <table>s with <div>s as much as possible. However, I can't figure out how to do the following… <table> <tr> <td valign="top" width="100%">some data that will 'stretch'</td> <td valign="top" width="300">some data that won't 'stetch'</td> </tr> </table>
8
5144
by: slim | last post by:
hi again all, i am still working on the website as mentioned in earlier threads and have hit another snag... http://awash.demon.co.uk/index.php http://awash.demon.co.uk/vd.css the php is pulling a name and placing it under the thumbnail (the text is
7
4226
by: Dario de Judicibus | last post by:
System: Windows XP SP1 + all latest patches (no SP2) Browser: IE 6.0.2800.1106.xpsp2.040919-1003 Problem: browser does not show, or partially shows, borders and background color of <DIV> as defined in CSS file. Forzing a drawing refresh by minimizing and restoring browser window or by overlapping another window on browser causes
3
3810
by: Josef K. | last post by:
Asp.net generates the following html when producing RadioButton lists: <td><input id="RadioButtonList_3" type="radio" name="MyRadioButtonList" value="644" onclick="__doPostBack('SitesRadioButtonList_3','')" language="javascript" />
28
5359
by: Kent Feiler | last post by:
1. Here's some html from a W3C recommendations page. <P>aaaaaaaaa<DIV>bbbbbbbbb</DIV><DIV>cccccccc<P>dddddddd</DIV> 2.Although I didn't think it would make any difference, I tried it with the </p>s included as well. <P>aaaaaaaaa</p><DIV>bbbbbbbbb</DIV><DIV>cccccccc<P>dddddddd</p></DIV>
2
3373
by: Richard Maher | last post by:
Hi, I'm trying to use the Visibility Style attribute for a Div to effectively PopUp a lightweight window with some additional context-sensitive information, when a user mouses over a given field(s). The popping-up seems to work just fine; it's the tearing down that's giving me grief. If I stick a onmouseout event on the same input field that caused the onmouseover/pop-up, it starts to flicker 'cos the <divis placed for esthetically...
8
10042
prino
by: prino | last post by:
Hi all, I've written code (in REXX) that takes files in legacy languages (PL/I, COBOL, z/OS assembler, etc) and converts them into HTML in a format similar to what's displayed in the z/OS ISPF editor. A fellow member of the PCG has helped me by creating a bit of Javascript to emulate the scrolling and using Google I've now gotten it into a state where it almost passes the W3C Markup Validation Service. However, the one error, Error Line 166,...
0
8683
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8611
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
9031
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
8904
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
8876
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
7741
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
4624
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2341
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2007
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.