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
B

Bjoern Graf

@Bjoern Graf
About
Posts
30
Topics
1
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Javascript form validation
    B Bjoern Graf

    Hockey wrote: What I want to know is does something similar already exist? http://phrogz.net/tmp/FormAutoValidate/formautovalidate_docs.html[^] is a nice one, though it will make XHTML validation fail...

    Web Development question javascript

  • javascript error...
    B Bjoern Graf

    Never ever submit a form onchange of a select! Reasons:

    1. the user is not able to select options with the keyboard
    2. when the user uses the mouse wheel and the select has focus the form is again submitted by accident
    3. the form will not be submitted if the user has JS disabled

    Having that said here's another programatically correct approach:

    <script type="text/javascript">
    function doSubmit(frm) {
    frm.submit();
    }
    </script>
    ...
    <select onchange="doSubmit(this.form)">

    Web Development javascript com json help question

  • Dynamic View Support Detection
    B Bjoern Graf

    While I'm not sure how the dynamic view feature for Mozilla is implemented I assume it to work for Safari, too. Ok, Safari ain't really the browser of choice for the intended audience, I'm currently forced to browse the web via MacOS X. And being a pedantic x-browser JS advocate (or something in this direction, greetings to irc://irc.efnet.net/#javascript), I'd like to see my favorite development site to do feature detection the right way, testing for feature support instead of browser version/name. This way, the site would support future browsers out-of-the box, too :cool:

    Site Bugs / Suggestions javascript csharp testing beta-testing announcement

  • Javascript text
    B Bjoern Graf

    But don't use an IE only DOM 0 thingy (hint: document.all) if it's possible to stay compatible with most (actually all) browsers by using document.getElementById(id).innerHTML = text;.

    Web Development javascript question

  • opening new page in same window
    B Bjoern Graf

    Give the window a name, eg. var myWin = open(pape, 'MyWindow');. Later, when the main document hasn't changed, you can use the window object to open a new page (if(myWin && !myWin.closed) myWin.localtion.href = 'foo.html';); form a different page, using open with the same name (MyWindow) will load the url into the same window.

    Web Development javascript help tutorial

  • beginner question
    B Bjoern Graf

    See Making Pop-up Windows Accessible[^] for valid (and good, if that is valid in conjunction with popups :cool: ) way todo popups.

    Web Development question javascript html help learning

  • javascripts help
    B Bjoern Graf

    This would work if the fields all have the same name (serial in this example). But here the fields include an increasing number so he needs to use: for(var i = x; i < y; i++) { document.formName["serial" + i]; } where x is the number of the first field and y is the number of the last.

    Web Development help data-structures

  • how do I remove a node?
    B Bjoern Graf

    Kinda expensive solution :) DOM1 defines the removeChild method, so why not use it:

    var parent = document.getElementById("anelement");
    var child = document.getElementById("anotherelement");
    parent.removeChild(child);

    IE DOM0 implements the removeNode method:

    var child = document.getElementById("anotherelement");
    child.removeNode(true);

    Web Development html question

  • JAVA SCRIPT fullscreen with no scrollbars and so on
    B Bjoern Graf

    This method is bad: http://blog.tom.me.uk/2003/07/09/why_using_javascript_to_open_fullscreen_windows_is_stupid.php[^].

    Web Development java tools tutorial question

  • CSS with input elements
    B Bjoern Graf

    In CSS2 one can match attributes (see Attribute selectors[^]). But IE doesn't support CSS2, one have to go with style classes :)

    Web Development question css architecture

  • How to Perl script in Windows 2000 Pro?
    B Bjoern Graf

    Have a look at ActiveStates[^] ActivePerl[^], which supports ISAPI, Perl in WSH and more.

    Web Development perl question sysadmin windows-admin tools

  • Programmatically adding multiple functions to one event handler (JS)
    B Bjoern Graf

    First, don't use eval. Never ever as it'll recompile the current script plus the stuff inside the eval :) To attach more than one event handler to an element, use the method attachEvent (IE) or for w3c browsers addEventListener[^]: var el = document.getElementById("foo"); el.attachEvent("onclick", foo); el.attachEvent("onclick", function () { alert("2nd handler"); }); function foo(event) { alert("1st handler"); }

    Web Development javascript csharp tools tutorial question

  • Abusing JavaScript
    B Bjoern Graf

    Logdar wrote: What do you think is it OK or it is very stupid idea? Yap, it's very stupid idea :cool: See http://www.tom.me.uk/scripting/[^] for the reasoning. Logdar wrote: Are there many people who use these browsers or disable JavaScript? http://www.thecounter.com/stats/2003/May/index.php[^]

    Web Development javascript question discussion

  • The Hand Cursor in IE5.0
    B Bjoern Graf

    Use both. Browsers that don't understand a css property are supposed to ignore that one, so cursor: hand; cursor: pointer; will do the trick.

    Web Development html tutorial question

  • How to use format-number() function?
    B Bjoern Graf

    I never tried it with a full XPath but I think you need to add apostrophs around the format string, e.g.: <xsl:value-of select="format-number(<XPath>,'###.##&apos)" /> Hope this helps, Bjørn.

    XML / XSL question help tutorial

  • IXMLDOMDocumentPtr and IXMLDOMDocument ?!?!
    B Bjoern Graf

    They basicly the same. The COM interfaces without the trailing Ptr are the raw interfaces, while the ones with the ptr are smart pointers which free the COM object if the interfaces isnt referenced anymore.

    XML / XSL html xml question

  • My friend has written a function 831 lines long.
    B Bjoern Graf

    I have to maintain a project that has been converted from VB to MFC :suss: And most of its functions have way more than 831 lines :omg:

    The Lounge question

  • CString with ATL/WTL 7.0
    B Bjoern Graf

    It's quite obvious - and mentioned in the help for CStringT ;) #include <atlstr.h> Bjørn.

    ATL / WTL / STL c++ help question

  • Can someone please shoot me for my oversight?
    B Bjoern Graf

    Project Properties->Linker Settings->Input->Additonal Dependecies Thats all :) Bjørn.

    The Lounge csharp visual-studio tutorial question

  • Is this the right place to curse the non-class wizard in VS.NET?
    B Bjoern Graf

    Joe Woodbury wrote: How do you delete member variables like the VC6 class wizard did? Hmmm, a good design doesnt require to delete a memeber variable :cool: Seriously, go to the header file and remove it manually seems to be the only way :~ Joe Woodbury wrote: How do you view a list of the control IDs of a dialog and what member variables and messages have been associated with them? Select the class in class view, r-click -> properties and then click on the events button in the properties. Last words: Take a look at the "Where Are ClassWizard and WizardBar in Visual C++ .NET?" topic in the help files - the truth is out there :-D

    The Lounge csharp visual-studio c++ design agentic-ai
  • Login

  • Don't have an account? Register

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