However this only seems to be working sometimes in Opera . No luck in firefox or chrome (dunno about IE)
Anyways to do it?
I thought of maybe using an Ajax call, but then the imgLink cannot be a relative position, which would be difficult to parse due to some address like http://example.com/directory as i tried to get everything before the last /
I've written some javasript code to resize an image tag. While the page loads the image tag is display: none so a large image wont break the stylesheet before I have a chance to shrink it. onload I call function load1 and you can follow the rest from the code below. This is working in Firefox and Chrome and appears to be doing absolutely nothing in any version of IE.
In one folder i've put all pics, but they are not all the same size. i've got as many links as pics and clicking on link popUp opens showing that pic. now, i would like to have one function that opens popUp window but in different dimension for different pic....
i am working on a project that will involve displaying a long list of product information. this will include images and description of the product. knowing fully well that users must have uploaded images with different dimensions, i want to display the images such that they will all have same dimensions without having some of them lose aspect ratio. i want it to look like the way facebook displays facepile (your friends), it may only hide a portion of it,
I would like to set the height of certain #div elements on a page based on the height of the user's current window state. It should draw the elements based on the size of the window at onLoad, and also respond to the onResize event.
I've got a small problem here. I'm trying to write some code that would generate a drop-down menue for me, where I'd just need to enter the menu- and submenu items into an array. The items are to be displayed as text. Now, I want to have the layers with the submenues to appear more or less under the appropriate main menu items. For this I need to be able to calculate how many pixels a given text uses up on the screen of the user. That's all fine with IE and an unproportional font like courier. The problem is, there is this nice setting that allows you to change the diplay size of the text - which is pretty much disfunctional in IE, but in mozilla, it works. Which means that I can't just say that one letter in courier, size 2, is 4 pixels wide and be happy with my calculation, because then somebody can just pop up with another text diplay size and *boom* - my calculation is wrong again.
Now, is there a realistic way to find out how many pixels _exactly_ a piece of text takes up on the user's screen? Or can I make the given piece of text a DIV and then have some kind of document.divname.left that gives me the actual location of this text?
I'm making a survey where every question has a numeric value assigned to it, and as the user clicks on a checkmark button to approve (or uncheck to disapprove) the values add or subtract to give a total at the bottom of the page.
Basically, it's a spreadsheet but with fixed values for each row instead of being able to type them in.
I can do this easily with php, but only if the user clicks the submit button. I was hoping to find a way to do this real-time.
I'm not looking for someone to do this for me, but can someone point me in the right direction of a tutorial or something that is similar so I can build this into my program?
I have a form that is using HTML and PHP to make calculations for an order form. One of the fields is asking for a total number of workstations. I would like this field to be a real-time total of five other fields in this form.
I have been using the jquery countdown plugin made by [url] for a while and while I am pretty familiar with it, I haven't been able to accomplish what I want for one of my projects.
I want to be able to add hours/minutes/seconds to a countdown in real-time by clicking a button.
Let's say I have 2 countdowns. They both get their ending date from a mysql db, e.g: 2010-09-26 00:00:45 and 2010-09-27 14:45:00
When I click a button, I want the countdown Y to increase by the X amount of hr/min/sec, update my ending date in mysql, and update my counter for every visitors to see without having them refresh the page. I have tried messing with ajax, but wasn't able to accomplish anything close. (I got it to update every 1 sec but it would flicker then)