|
Create a CSS class and apply the same class to the containing div and to the table.
|
|
|
|
|
Brady Kelly wrote: Oh, woe, the pains of layout
Welcome to the wonderful world of web development!
|
|
|
|
|
Actually, styling's the FUN part for me!!!
_________________________________________________
Have a great day!!!
-- L.J.
|
|
|
|
|
Use explicit rules for it then. Rather than doing something like:
.myDiv
{
font-size: 11px;
font-weight: bold;
} use:
.myDiv input, .myDiv textarea
{
font-size: 11px;
font-weight: bold;
} This keeps the requirement that affected elements are descendants of your div, but specifies the types of elements that are to be affected rather than relying on them to inherit them from the div itself (which may not, and in this case are not, children of the div itself).
Of course, don't forget that fixing a font size in pixels might cause issues for users of older browsers (IE) that don't let users increase the size of fonts that use non-relative sizes.
|
|
|
|
|
Thanks shog, it's these bits of help that are slowly getting me to actually like wek development. This and David Flanagan's JavaScript, The Definitive Guide.
I've used the pixel sizing because I'm trying to emulate the styling of the public facing site of the same client I'm doing this little intranet site for. My immediate, prototyping solution is to examine their layouts using Firebug and apply the same styles. Them being a huge corporate, I would also imagine all their staff users will be on a fairly current browser, probably IE 6.
|
|
|
|
|
Where can I find out how to have a floating div and inside the DIV it is another HTML file?
Basically I want to press a button (or link) and open another page in the center of the current one but don't want it to be another internet explorer or tab. Basically I want a div to pop up in the middle and display another html file.
|
|
|
|
|
|
Check out ThickBox[^], under examples have a look at the Inline Content and iFramed Content demos.
|
|
|
|
|
Yes the thickbox is exactly what I am talking about. Thanks so much. The Iframe will work as well. Thanks for both your help!
|
|
|
|
|
|
Following techniques described at http://tinyurl.com/25762x , I can retrieve a binary file in Firefox and retrieve it from the responseText field of the request response object. However, in IE, the responseText field is empty and the data I'm looking for is in the responseStream field. When running the Microsoft Script Editor, I can view this property and it shows as an array of BYTE with the correct length. However, I can't access it from JavaScript which doesn't have a BYTE data type. I'm looking for 1) a pure JavaScript technique which can get the binary data as a String as in Firefox or 2) a method to convert the BYTE array to a JavaScript String object using a small add-in such as an ActiveX control. Thanks for any advice you can provide.
|
|
|
|
|
Dave_ wrote: http://tinyurl.com/25762x
Please supply the proper URL - THere could be anything behind that URL.
|
|
|
|
|
|
How to avoid 'error on page' in IE's status bar while running ASP.Net website application?.This error is not a bug...But it is not looking nice when the web page is loading...If anybody knows answer me....
thanks,
emer
|
|
|
|
|
Ida_merry wrote: How to avoid 'error on page' in IE's status bar
why not fix the error?
led mike
|
|
|
|
|
table_ref = document.getElementById(table_name);
var table_row_ref = table_ref.rows[1];
new_row = table_row_ref.cloneNode(true);
table_ref.appendChild(new_row);
It adds the new row. But, table_ref.rows.length does not change to reflect the newly added row. I am using cloneNode so that all the styles are copied to the new added row.
Is this a known problem? Is there a solution to this issue?
I am considering creating a large table with a large number of rows, and show/hide depending on requirement. But, that feels soooo wrong.
modified 29-Aug-18 21:01pm.
|
|
|
|
|
I solved the problem in the following way.
<code>table_ref = document.getElementById(table_name);
row_innerHTML = table_ref.rows[1].innerHTML;
new_row_ref = table_ref.insertRow(table_ref.rows.length);
new_row_ref.innerHTML = row_innerHTML;
</code>
Since I use insertRow, the rows.length now reflect the correct row count after any number of inserts and deletes.
This said, I am still interested in other solutions that may be better than this one.
modified 29-Aug-18 21:01pm.
|
|
|
|
|
The previous solution that I listed worked only in FireFox, not IE7. The following code works in both browsers.
table_ref = document.getElementById(table_name);
var table_row_ref = table_ref.rows[1];
new_row_ref = table_ref.insertRow(table_ref.rows.length);
cellcount = table_row_ref.cells.length;
for (cellindex = 0; cellindex < cellcount; ++cellindex)
{
new_col_ref = table_row_ref.cells[cellindex].cloneNode(true);
new_row_ref.appendChild(new_col_ref);
}
I have not tested in Opera/Safari yet You can watch out for new versions of this. I am enjoying this javascript adventure.
modified 29-Aug-18 21:01pm.
|
|
|
|
|
I have a persistent build error that I'm finding very difficult to track down. Basically, I have a Default.aspx page that defines a drop-down list like so:
<br />
<asp:dropdownlist id="ddl_userName"><br />
runat="server" <br />
DataSourceID="user_data_source"<br />
DataTextField="user_name" <br />
DataValueField="user_name" <br />
AutoPostBack="true" ><br />
</asp:dropdownlist><br />
Then, in the code-behind (C#), I attempt to assign the value of the selected item to a string variable like so:
<br />
string username = "";<br />
username = ddl_userName.SelectedValue;<br />
This generates a CS0103 error that says:
The name 'ddl_userName' does not exist in the current context
It seems like a scoping error, but the code file is correctly identified in the page directive, and everything appears to be correct. Any ideas?
Thanks
|
|
|
|
|
Do you have id="ddl_userName" on your <asp:dropdownlist>?
C# is also case senesitive.
- S
50 cups of coffee and you know it's on!
|
|
|
|
|
ARRGGHH -- yes, the name is on the drop-down lists ID property. I thought I proofed that post, I'll have to put up the actual code tomorrow. But the name is the same in both the .aspx and the .cs file. I typed it the same, I copied - pasted it in, and I chose it from the intellisense options. All three ways produced the same error.
my co-worker actually may have found the problem, I'll check it in the morning and post it here if he's right.
|
|
|
|
|
I know I've had this happen to me before, just can't remember the circumstances off the top of my head. Possibly the name of the class in the .cs file doesn't match the inherits attribute on the page tag? Let us know what you find out.
- S
50 cups of coffee and you know it's on!
|
|
|
|
|
OK, the code in my original post should have looked like this:
aspx:
<br />
<asp:DropDownList ID="ux_ddl_userName" <br />
runat="server" <br />
DataSourceID="user_data_source"<br />
DataTextField="user_name" <br />
DataValueField="user_name" <br />
AutoPostBack="true" ><br />
</asp:DropDownList><br />
.cs:
<br />
string username = "";<br />
username = this.ux_ddl_userName.SelectedValue;<br />
The file names were Default.aspx and Default.aspx.cs, and the class name was _Default. The code-behind and the class were correctly identified in the Codefile and inherits properties of the page directive.
The "fix" ended up being to change the file names to DevDefault and change the class name to DevDefault. The original file and class names were generated by the IDE. I did find in the project, that there was a Default3 file that identified the same class in a different file, so that may have been where the conflict was. If it was looking at that _Default class, then the error would have made sense, since it was essentially empty. In fact, I'm sure that's what it was, since typing the control name didn't bring up the intellisense listing, but preceding the control name with "this" did bring it up. It was a name clash.
Thanks.
|
|
|
|
|
Hi All,
I have a page in which I am using ''. That page get called from many places and some thimes in the '' and some times in the normal window page. the position of <div> is at certain place by assigning the top position. i.e '<div style="top:150">'. This is causing problem when the page get opened in iframe. I am thinking that instead of placing the hard code value for top position of <div> let's place it at run time at the time loading the page. The problem is that I am not able to find out the top position of object in which the page is getting opened. Can any one please suggest, How I can perform this?
Thanks,
RK
<div class="ForumMod">modified on Thursday, March 20, 2008 3:58 AM</div></div></div></div>
|
|
|
|
|
I can't see the code that you posted. Use the "Ignore HTML" option when you are posting markup code.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|