User Profile

Collapse

Profile Sidebar

Collapse
Jezternz
Jezternz
Last Activity: Mar 17 '12, 11:40 PM
Joined: Jan 5 '08
Location: New Zealand
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Jezternz
    started a topic How to obtain non-computed css style?

    How to obtain non-computed css style?

    Hi,

    I would like to obtain the non-computed style property of an element

    examples:

    jquery:
    Code:
    $(element).css("width")
    // will not work, as it will return the computed width (in pixels), when it is set to 'auto' I do not want the width in pixels, I want the actual property (auto).

    Code:
    element.style.width
    // Also not acceptable as this will only retrieve inline properties.
    ...
    See more | Go to post

  • Thanks for the help.
    Did a bit more googling on "Margin Collapsing" and found the following seems to work:
    • display of the child is set to: inline-block
    • float of the child is set to: left/right
    • clear is not set to none.
    • zoom (transformation ) of the child is set.


    source

    Cheers, J
    See more | Go to post

    Leave a comment:


  • Why does margin-top not work as expected? How to fix this?

    Okay,
    So I have been working with HTML and CSS for a number of years, and recently I came across something I did not realize would happen.

    When you have a parent division (relative/static), and you have a child division with "margin-top:40px".

    What will happen is the parent division will actually be pushed down 40px from its parent and the child div will actually just sit on the top.

    What confuses...
    See more | Go to post

  • Jezternz
    started a topic How to access Local page in iframe?

    How to access Local page in iframe?

    Hi,

    I would like to access, an iframe from javascript. Which is fine and I am able to do this, however chrome is displaying an error.

    The error is as follows:
    Unsafe JavaScript attempt to access frame with URL file:///C:/<filename2> from frame with URL file:///C:/<filename>. Domains, protocols and ports must match.

    When I host this on a webserver it does not display an error, only when...
    See more | Go to post

  • Thanks for the tips, I was really just wondering if there was a parameter you could set on it, to not force children to be wrapped. I will look into jquery tabs, cheers.
    See more | Go to post

    Leave a comment:


  • Thanks Sudaraka, Yep was meant to be .page there.
    I understand what you are saying, and that would work, however because I want to have a dynamic number of '.pages' I would prefer not to have a static width, as it could be any possible number. So I guess I could set the width to 9999px, but this seems rather messy, is there anyway I can get it to run with a width:auto?

    Cheers, J
    See more | Go to post

    Leave a comment:


  • How to make divs remain on a single line within a hidden div

    Hi,
    So what I want to do, is create a file tabs like bar. This will include a list of all pages open in my web app. There is likely to be more open then what fits on the page bar, so they will need to be scrolled along.

    My current setup is as follows, it is a container, with overflow hidden, a scrolling container, and all the pages open 'page'. The scrolling container has width:auto and can be scrolled along by setting the left...
    See more | Go to post
    Last edited by Jezternz; Jan 15 '11, 05:26 AM. Reason: fixing mistake

  • Jezternz
    replied to Simple Update Statement
    Thanks for the quick response Atli,

    As this is more for a trial then actual practical use, efficiency is not really a concern.
    I would however be interested in an efficient one. If you have any links or anything that would help with writing a more efficient one, that would be great.

    Cheers, J
    See more | Go to post

    Leave a comment:


  • Jezternz
    started a topic Simple Update Statement

    Simple Update Statement

    Code:
    UPDATE items i, cartitems c 
    SET stock = (stock-1)
    WHERE i.id = c.itemid AND c.userid = '7';
    Okay so I have a table for 'items' and a table for 'items in a users shopping cart'. I want to decrement the stock field in the items table once for every instance of that same item in the 'items in shopping cart' table.

    The code above, will unfortunately only decrement a maximum of once in stock...
    See more | Go to post

  • Jezternz
    replied to Jquery mousedown button
    Okay, Cheers, will give that a go!
    See more | Go to post

    Leave a comment:


  • Jezternz
    started a topic Jquery mousedown button

    Jquery mousedown button

    So I want to create a button, that changes its background image when the user presses down on it. My button is a division. Now I could simply use mousedown() and mouseup(), however there are many problems that can arise from this. For example a user could push the mouse down then move the mouse off the button. The user could also press alt-tab or something after mousing down. Either of these events would cause the button to stay pressed down even...
    See more | Go to post

  • Jezternz
    started a topic relative element inside absolute element?

    relative element inside absolute element?

    Okay so I want to place a relative division inside an absolutely positioned division.
    Code:
    <div style="position:absolute;left:50px;right:50px;top:50px;bottom:50px">
        <div style="position:relative;margin:0 auto;height:100%;width:500px;">testing123</div>
    </div>
    This isn't the code from my website but is good enough for demonstration. So I want to absolutely...
    See more | Go to post

  • I would like to apologize, I had something wrong with my code. I was under the impression the onmouseout event would not register on the window object, when infact it works perfectly.

    Sorry for any time I wasted, Josh
    See more | Go to post

    Leave a comment:


  • thanks for replys,
    The problem I am having is, when I attach the mouseout event to the window or the body, it does not fire the event unless, I move the mouse off the window very slowly (so it is not really plausable, as often you will move the mouse out of the window in a fast motion). So are there any other ways I can go about this?

    cheers, Josh
    See more | Go to post

    Leave a comment:


  • I am not so concerned with the event code, I have been using these functions I made (doesn't matter if its on<event> or <event>):
    Code:
    function addEvent(elem, etype, func){
    	if(!etype || etype.constructor != String || !func || func.constructor != Function)return false;
    	[U]if(etype.indexOf("on") == 0)etype.replace("on","");[/U]
    	if(window.addEventListener)elem.addEventListener(etype,func,false);
    ...
    See more | Go to post

    Leave a comment:


  • How can I detect when the users mouse leaves the document (body)

    Okay,
    so I am working on a web application, that has lots of events, and I need to be able to trigger a function (probably through an event firing). Whenever a user leaves the page with the mouse. I have a timer being triggered every x milliseconds and I want to be able to cancel this interval when the users mouse leaves the page.
    I have tried the onmouseout, onblur on the window, document, body and the web application division (note...
    See more | Go to post

  • Jezternz
    started a topic problem with simple iteration

    problem with simple iteration

    Okay, so basicly I have an array of functions, these functions are used to setup different menu's.
    The very first function sets up the main menu and links to other menus/pages.
    Note I have written addEvent, and it is self explanatory and has been tested and works.

    Code:
    var buttons = ["MenuX", "MenuY", "MenuZ", "MenuZZ"];
    var menu_page_generators = [
    		function(m,
    ...
    See more | Go to post

  • Thanks for the reply Josah,
    I am quite new to vector math, so I was wondering if you could give me a bit more detail. When you say average of a vector (subject), do you mean the normalised version of it?
    Once I have this, I don't quite get the last line either, what do you mean by translate the subject towards the origin O.
    cheers, Josh
    See more | Go to post

    Leave a comment:


  • Jezternz
    started a topic Question regarding Camera Position in a 3D Scene
    in Java

    Question regarding Camera Position in a 3D Scene

    Okay, so I have setup a scene in Java.
    I have 2 points. The first point is always 0,0,0.
    The second point is the camera position and can be any positive or negative values for x,y,z.
    Now what I want to do is have a function 'centerCameraVi ew' which will modify the camera angle values, and will put the first point (0,0,0) in the center of the camera's view.
    So I guess as much as anything I am looking for pseudo code. Any...
    See more | Go to post

  • Jezternz
    replied to Run Method on elements in a Vector
    in Java
    Thanks heaps, here are the two lines that need to be changed for generics use.
    Code:
    Vector<ClassX> xv = new Vector();
    and
    Code:
    ListIterator<ClassX> it = objlist.listIterator();
    while(it.hasNext()){
        ClassX temp = it.next();
        temp. doThis();
    }
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...