Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
M

Mattias Olgerfelt

@Mattias Olgerfelt
About
Posts
33
Topics
4
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • C# WMI Connection
    M Mattias Olgerfelt

    Hi, I have a similar problem. Did you solve this? In that case I would really appreciate your help. /M

    C# csharp sysadmin help

  • How to find out when or who updated my Database.
    M Mattias Olgerfelt

    The most common way of doing this is to use triggers on the table you want to check for changes in, and then save date and username in an other table. You can also add two fields, last modifiedBy and lastModifiedTime to each table you want to check for changes in, in addition you add a trigger and copies these values to an other table eg: TableNameLog if the original table was named TableName. If you do not wan to use triggers you have to save the information in two places when a save occurs. You can use client-code or storede procedrues in the database. /M

    Database csharp asp-net database tutorial announcement

  • C# Question with Generics
    M Mattias Olgerfelt

    GenericStaticMethod .(args); Does not work? /M

    C# csharp question

  • How to add controls to OpenDialog box?
    M Mattias Olgerfelt

    Is this what you are looking for? this.regsiterStartupScript("tjoff", "window.open('url', '_blank');") /M

    C# tutorial question

  • Connecting to a remote SQL Server in WinXP SP2
    M Mattias Olgerfelt

    How does the connection string looks like...? note that the SQL-server supports several instances and that that might be a peoblem if the instance nto is specified... /M

    Database help database sql-server sysadmin question

  • All character from column not getting! Any setting should i change?
    M Mattias Olgerfelt

    check the prameters for the procedure.. they has to be the same as for the table... /M

    Database help database xml question

  • Unicode problem
    M Mattias Olgerfelt

    Dont't use concated SQL... for this. Create a procedure and just add the value as paramter.. Also.. beaware of the collation... /M

    Database database sharepoint help question

  • T-SQL
    M Mattias Olgerfelt

    Hi there... this is the problem... U have to have an apostorph after like an you dont... so change the code to: set @sql = @sql + N' and (summary like ''' + '%' + @keywords + '%' + ''')' /M

    Database database help question

  • Architecture question
    M Mattias Olgerfelt

    Go for the one-shot. It is more effective... Give up about the entity-objects... they are useful when the colexity is very high, else use the database for what the databse is effective and good about... /Mattias

    Database database question architecture

  • CheckedListBox is not available in asp.net
    M Mattias Olgerfelt

    Sorry... don't understand your question... try again... /M

    ASP.NET csharp asp-net tutorial

  • Problem redesigning the CSS way
    M Mattias Olgerfelt

    David O`Neil wrote: One thing I have noticed is that on your revision the corner jpg does not show up in Firefox, although I see Explorer presents yours very nicely. You can count with that IE is doing wrong and FF is correct... :sigh: /M

    Web Development question javascript html css com

  • Problem redesigning the CSS way
    M Mattias Olgerfelt

    David O`Neil wrote: One thing I have noticed is that on your revision the corner jpg does not show up in Firefox, although I see Explorer presents yours very nicely. You can count with that IE is doing wrong and FF is correct... :-( /M

    Web Development question javascript html css com

  • Problem redesigning the CSS way
    M Mattias Olgerfelt

    Hi, again... corrected some small fuzzes... new version is downloadable... /M

    Web Development question javascript html css com

  • Problem redesigning the CSS way
    M Mattias Olgerfelt

    Hi... There are some differences between your code and mine... Mine is general, you don't have to maintain a root-path. And it is a little easier to add events and styles to the elements in my code. About the page load, you don't need to worry; it is a lot faster then the web browsers are rendering the page. However… I have looked into making your page not using tables. Well it is possible but not with the exact look... There are differences between how tables (and table-cells) behaves and how div and span elements behave. Here are some of them. A table cell always fills out the rest of the cell if the table has a size and the rest of the cells have size. That is currently not possible using CSS. (Quite annoying actually). It is not possible to align a span or div between each other in the way cells are aligned to each other. A span or div does not change size like a table and cells changes size. So, if you want this very dynamic behavior of changing size you are stuck to table. However, I have made a little recoding of your page. You will find it here: http://www.olgerfelt.se/MonkeyCode/Monkey.zip[^] Note also that you have to replace the corner image to get the look you want. /Mattias

    Web Development question javascript html css com

  • Javascript, Remote Window Close, Firefox and IE
    M Mattias Olgerfelt

    Hi, this will work in IE... It is not a public standard so I don´t know how it works with FF. var gRemoteWin function openWindow() { gRemoteWin = window.open("Test2.aspx", "remote"); timer = setTimeout("checkClosed()", 5000); } function checkClosed() { if (!gRemoteWin.closed) { alert('exists...' + gRemoteWin); timer = setTimeout("checkClosed()", 5000); } else { alert('does not exist ...'); } } /M

    Web Development javascript html tools help announcement

  • Problem redesigning the CSS way
    M Mattias Olgerfelt

    David O`Neil wrote: That will only repeat the background IN THE AREAS WHERE TEXT APPEARS. For this reason it won't work if you want the header to automatically expand itself to the right edge of the page. (If your line of text is: "My Text", and it is displayed in 10pt, the background will only be about 1" in width, and will end right after the final 't'.) Well, that depends on what type of element you have... If you show me the code that is not working I will fix it for you... About the path to stuff... Aha, you want the the path to be relative but varying... Ok.. here is what i sugest... Add a container DIV to your page holding the menu. Create a Javascritpt function that crates the meny... Load the script in the page tag (onLoad="buildMenu();") Something like this... .menuItem { width: 100px; clear: both; float: left; BACKGROUND-COLOR: #FFF; border: #CCF; border: none; margin: 1px;} .menuMouseOver { width: 100px; clear: both; float: left; BACKGROUND-COLOR: #CCC; border: solid 1px #CCF; margin: 0; } .menuKeyDown { width: 100px; clear: both; float: left; BACKGROUND-COLOR: #444; border: solid 1px #CCF; margin: 0;} #menu { height: 200px; } function initNavigation(sElementId, iLevel) { if (!document.getElementById) return; var sDir = ''; var i; for (i=0; i<iLevel; i++) { sDir += '../'; } var arrNav = new Array(); arrNav[arrNav.length] = ['Main', sDir + './Page1.htm']; arrNav[arrNav.length] = ['Medit', sDir + './medit/Page1.htm']; // etc... // Create Menu var elm = document.getElementById(sElementId); for (i=0; i<arrNav.length; i++) { var r; r = document.createElement('span'); r.className='menuItem'; r.innerHTML = '<a href=\''+arrNav[i][1]+'\'>'+arrNav[i][0]+'</a>'; r.onmouseover = function () { this.className = 'menuMouseOver'; } r.onmouseout = function () { this.className = 'menuItem'; } r.onmousedown = function () { this.className = 'menuKeyDown'; } r.onclick = function () { this.className = 'menuKeyDown'; document.location.href = this.childNodes[0].href; } elm.insertBefore(r,null); } }

    <div id="menuContainer"></div> Level specifyes how deep the page is. By the way... I think that you realy shouldn't use absoulte path's to files and images. Instead use relative paths. /M

    Web Development question javascript html css com

  • Problem redesigning the CSS way
    M Mattias Olgerfelt

    1. ok, change the attribute: BACKGROUND-REPEAT: no-repeat to BACKGROUND-REPEAT: repeat-x 2. Well.. I am using a CSS-file. and the path is relative to that CSS-file. In C# I am able to specify which CSS to use in my page with the following code. in the client-page.. in the Codebehind... protected System.Web.UI.HtmlControls.HtmlGenericControl styleLink; private void Page_Load(object sender, System.EventArgs e) { string style = HttpContext.Current.Request.ApplicationPath + "/" + System.Configuration.ConfigurationSettings.AppSettings["GeneralStylePage"]; style = style.Replace("//","/"); styleLink.Attributes.Add("href", style); /Mattias

    Web Development question javascript html css com

  • Html elements visibility (important)
    M Mattias Olgerfelt

    Well.. You can check the size of the window and then check the position of the image. Note however that the position of the image is reltive to the child element if that has the attribute position: set to "realtive" or "absolute". Yea.. and you have to check how much the window has scrolled also... The functions to use are: // window size. document.body.offsetWidth document.body.offsetHeight .offsetLeft .offsetTop .scrollLeft .scrollTop .style.pixelLeft .style.pixelTop By the way, these are the Explorer specific functions... /M

    Web Development json question html help tutorial

  • SQL INSERT.. Please Help..
    M Mattias Olgerfelt

    Hi. To make an update you do not need the data adapter. Write like this and you will be happy: SqlConnection con = ... try { using (SqlCommand cmd = new SqlCommand("INSERT ...", con)) { // cmd.CommandType = CommandType.Text; Default is text, ut if you change to something else you should change this here. cmd.ExecuteNonQuery(); } catch (SqlException ex) { // Do stuff... } if (con != null) { con.Dispose(); con = null; } By the way, using is nice, it runs Dispose() on your command-object automatically. :) /M

    C# help database testing beta-testing

  • Problem redesigning the CSS way
    M Mattias Olgerfelt

    Question 1. Could be achieved in many ways. One way is to use the background property of the div. eg: BACKGROUND-POSITION: right top; BACKGROUND-IMAGE: url(../library/images/RCorner.gif); BACKGROUND-REPEAT: no-repeat Question 2. I recommend using relative links my friend. Makes you happier and life easier in the long term. However, you could use some server side code to create the path to your files, reading the path form a config file. That would not work from html tough. /M

    Web Development question javascript html css com
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups