I have inherited a web application that uses tables to layout the whole web application. This is a rather large web application and I would like to migrate it to using divs for layout instead of the current birds nest of tables.Does anyone have any good suggestions for the best way to migrate the web site to using divs (That would convince the boss that it's worth doing).This is a asp.net web application where most of the html is done through response.write.EditI have been working with the site for a while now and would have to say that even a site with a badly nested div layout would be better than using table layout.
I was just after some help to put the following code into a loop. I have 6 div's with id's ImgDetails1 - ImgDetails6 and 6 buttons with id's 1 - 6
if 1 is pushed it should hide the other divs but ensure div1 is shown. the same applies for every other div.
I can do this the long way writing logic for each div but I am not the best with js and have failed at each attempt to put the code in a 1 - 6 loop to hide all divs except the one selected and make sure that is shown.
i know that using tables as layout is a big problem..Why don't professional web designers use tables for layout anymore? and what are the alternatives in CSS that i can use and will be the best alternative to tables??
This layout should work fine with first row columns should have width of 70 and 30% resp and second row should have width of 50 and 50 resp. But the output what i see different. what could be the problem and how to fix it. I couple of solutions for it
1. defining width at column level will work 2. defining a blank row with four columns above or below.
We got a requirement to implment following structure of table (It's a sample; data source is dynamic). Notice that there are intermediate Total (sum) values for the month. If we have the data source (Date and Amount) besides Total, which is calculated out, generate this kind of table-style layout dynamitcally?
Date Amount ========================== 1 Nov 300 22 Nov 500 30 Nov 200 Total 1000 5 Dec 100 28 Dec 200 Total 300
I couldnt test the page in Safari, dont have a way to get around the cert error since its our dev server. Either way the page looks like crap on everything but IE.
I have 3 small tables on a page.. small as in 4 rows and 3 columns when viewed in the 3 browsers, the columns seem to push over to the left and fall under the first.. so when you view the page what should be 4 rows and 3 columns now looks like 7 rows.. that only way i can explain it.
I need to generate a table from a List(Of Students). My Student class has properties for AcademicYear, TeachingSet, Surname and Forenames, is sorted in that order and also properties for ID and start date. The table should nest TeachingSets within AcademicYears and then the students within the TeachingSets, as shown in the table I've mocked up at http://www.ifslearning.ac.uk/files/student-table.jpg
Using a repeater I get 08-10 students B74394 Mzejb Bsppn 08-10 students B74395 Lbuifsjof Bvti 08-10 students C68924 Epoob Cmpblf 08-10 students D41468 Ipxbse Dbwfz
This is bizarre and seems like a bug to me.Using a table in SSRS, I have a details row, with a parent group and finally a header row. For my header row, I am referencing a particular cell in the parent group.I am doing this so that i can have the header row repeat on each page of the group.his works fine when I'm not in Print Layout mode. However, when i switch to print layout mode, or print the report itself, the data that is presented on the screen is different then what is presented when not in print layout mode. WHAT THE F*!@!?? I've been battling this for a while now and i'm at my wits end. Has anyone else experienced different results from when you are in print layout mode as opposed to being in print layout mode?
That can be setup to display certain number of records per page and allow paging.
I have tried the repeater, but having issues with paging since its linked to a SQLDatasource.
I have done a search on "Paging Repeater" and all examples are setup with XML and other datasources and im not able to figure out how to modify that to work with my SQLDatasource.
You'll have to excuse my ignorance, I'm coming at this from a front-end perspective, and don't really know how to deal with data views in ASP.NET.
Basically, I'm trying to change the layout of some repeated data from a straight table, to something more design-heavy. It's the same data, just re-organised slightly. The current ASP.NET code looks like this:
[Code]....
However, I want to replace all of this, such that each 'row' of data renders like this:
[Code]....
How is this done? Can I just edit the code above, or would I need to do something more advanced in terms of not using a data grid and using some other control instead? Is it something that can be done in just a .aspx file or would it need to be done in C# and compiled?
How can I access the datalist at run time to create, a table layout but with the first cell having a rowspan of 2? Below is the HTML source code to demonstrate.
I am developing a CompositeDataBoundControl that is basically a 'table' inside a 'div', in order to limit the size of the Control and use the scrolling capabilities of the 'div' tag ('RenderBeginTag("div").
So essentially the control is; <div style="overflow:auto;width:400px;height:300px;"> <table style="table-layout:fixed;">
I am having a problem floating div's inside the AJAX TabContainer. The content I place inside the TabPanel is jumping outside the border. Here is the code:
I'm sure I've seen examples somewhere before, but I can't seem to find them. I have a page which has 5 buttons. I'd like each button to load up a different form, without refreshing. I could use UpdatePanels, but it sounds overkill for this (and bandwidth-costly). I'd like to load all the forms in one go, so clicking through the buttons essentially hides/shows the relevant forms. I can't do this using the html() method (as-is) since the forms can be quite complicated and contain ASP.NET controls which postback to the server. Instead, I've put the forms in individual divs. I tried doing something like this:
case "button1": $(".current_form").show(); $("#divForm1").prependTo($('.current_form')); break; case "button2": $(".current_form").show(); $("#divForm2").prependTo($('.current_form')); break;
The problem with this is that the old form always remains there, rather than being replaced. Is it possible to attach a div to a given container in JQuery? Or is there another method which may be better?
full code <script type="text/javascript"> $(document).ready(function() { $("button").button(); $("button").click(function() { switch ($(this).attr("value")) { case "button1": $('.current_form').empty().show(); $("#divForm1").clone().prependTo($('.current_form')); break; case "button2": $('.current_form').empty().show(); $("#divForm2").clone().prependTo($('.current_form')); break; } return false; //prevent postback }); }); </script>
I'm testing with these divs:
<div class="current_form"> <div id="divForm1" > This is div 1 </div> </div> <div class="current_form"> <div id="divForm2" > This is div 2 </div> </div>
I have 2 divs with 2 nested divs in them. Let's say div1 contains div11 and div12 and div2 can also contain div11 and div12. I know that this is not normally allowed but I am using jTemplates and they do allow you to print the div11 and div12 twice or more on the same page. The HTML looks like this:
How do I ensure that I only have one div with the unique ID loaded on the page, so I don't get in any duplicate DIVs. The result should look like this:
<DIV1> <DIV11>Some text</DIV11> <DIV12>Some text</DIV12> </DIV1> <DIV2> Some other text </DIV2>
Is there any way to check for a duplicate ID in either jQuery/javascript language and remove all but one using each or some other method?
I'd like to have a div as a canvas, where users would choose images to show, out of a list. They will choose what background it would have, icons, and they will upload an image which will appear in this canvas too.I'm looking for solutions in PHP or ASP.NET.
Problem in code adds to the same div? I need it to add multiple divs of the same id.Atm it takes all the seperate entitys or colums in my database and places them in the one div called I was hoping it would add for each record in my database which is equal to the userid in my sqlsyntax.
How can I achieve this?
Code:
using (OdbcCommand cmd = new OdbcCommand("SELECT Wallpostings FROM WallPosting WHERE UserID=" + theUserId + "", cn))
using (OdbcDataReader reader = cmd.ExecuteReader()) [code]...
Searching on google, i deffinitly can't find a non-javascript way to show and hide my panel/updatepanel.I do have panels and updatepanels, I want to show/hide them on the fly, after a button click, preferably without javascript, or if so, with jQuery.All the examples I found consumes a lot of code and honestly I don't want to crap out my code just because of this.
I was playing around with ASP.NET Web Parts which has a "drop down" div. It's all the way to the right of the page. When I click to bring it up, it goes off the window. Usually anything off the viewable area will trigger the bottom scrollbars. How is this possible?
Edit: It's Internet Explorer 8. Below is the markup with some context. The relevant one I think is id=WebPart_wp774658725VerbsMenu. By default it doesn't display. When you click on the td/span Verbs/span VerbsPopup (it could be any), it shows the "dropdown". In Developer Tools I don't see any JavaScript attached to those elements, but if I debug it I see it running some.
I have a bunch of divs that are widgets. I am using a custom role provider and I need to hide the divs based on roles. Is it better to add a "runat=server" attribute to the div so that I can hide/unhide in the code behind? Should I hide/unhide on the aspx page or do i use panel controls and hide/unhide in the code behind?
I have created a horizontal menu using <UL> and <li> tags. Hovering over a top level <ul> causes the lower lever <li>'s to drop down. This works well but there are two narrow <div>'s below that act as decoration. These disappear when the drop down submenus lay over them. I have played with the z-index properties of both lower <div> and of the menu items but have not resolved the issue. I want the submenus to drop down over the <div> but for the <div> to remain visible outside of the covering sub-menu.
I've googled all over for a solution but I cannot seem to find it or understand it if I have looked at. What I want to do is click a link that I generated from txt data that will unhide my div and generate a new series of links. In order to generate these links I need to pass an argument. Then I want to click a generated link (now the 2nd level) to unhide another div and generate another list of links (now a 3rd level) with an argument.
It sounds simple but once I click the 2nd level link (the 2nd generated link) I lose everything as the page reloads. I understand that when I click the 2nd level link it is posting back to the page and wiping out my variables maintaining my generated links. Below I've attached some code that simulates my problem (minus the file calls for generating links). The first link(generated and placed in a panel) reveals div with another set of links based on an argument. The third link (the second link hides the first div) is suppose reveal another div with the message "YAY". The third link does not display the second div but instead refreshes the page.
The first one shows the page with a form which has an updatepanel around it. The second one shows what the page looks like for half a second when clicking the submit button in firefox.
Every <div> tag inside the updatepanel go grey (the background color of <body>) creating weird flickering... How can this be avoided? It seems the div's go transparent but they don't show the white background color of the div surrounding the form, it show the body background color.
I need the updatepanel around the form for some of the validation controls to be displayed so not letting it span the whole form is not an option.