Ok so i have this drag and drop code i just did and it seems to work fine everywhere except in IE, after trying an if(document.documentElement.scrollLeft && document.documentElement.scrollTop) i realised the browser doesnt recognise them... what is the solution??
I am trying to make a javascript utility where the user can resize and drag an image. A slider contols the size of image from 0% to 200%. And also the image is draggable and the x and y coordinates of the image are immediately reflected on a text box in the page.
I think that this is possible with jquery or other javascript libraries. But was looking for some direction where I can find the best tutorial or examples.
when I click on a div element an anonymous function gets fired that appends eight handles around the box. Each handle has its over unique anonymous function as well that resizes the div box upon a mouse down and mouse move. Ok all is working fine except when I drag a handle around to resize, other elements on the page become highlighted and the whole resize procedure gets broken or rather stuck. How do I make is so when I drag this handle other elements are excluded from being highlighted by my mouse down and mouse move actions?
I have with the regions on the page. I would like to know how could I resize them... I know there is no HTML or CSS modality, therefore the only solution has to come from Javascript. Image I have four flags on a page and each of those are links to other pages. However, when I resize the page, drag its border lines and so on, everything gets messed up.how to solve this? Or at least other options, like Tables, Divs, anything that can resize and accept links?
Bit of a lengthy topic name, I know - I'm trying to make a sort of really lightweight online t-shirt designer - basically, it'll show a picture of a t-shirt in the background (you'll be able to change the color via selector), and then be able to upload an image, drag it around the t-shirt and resize it. I've found this: [URL]. But I have no clue (after looking at the JS, I'm still pretty new) how to set bounds to keep it in, or how to save/output the image it creates - that is, the uploaded image on top of the t-shirt needs to be saved as a single image and then output, probably via email. I am fairly fluent in PHP, but still pretty new to javascript. What is A, the best way to upload the user image (and give a max file-size) and B, the best way to drag/resize it around the t-shirt, but without moving it off the t-shirt image, and C, save that image then output it?
Everything was fine with my Nivo slider using jQuery 1.5.1.....as soon as I linked to 1.6......it added an inline element size of 1px in height and width to my slider and basically made the slider disappear. I have a width and height specified in the CSS, but it gets overwritten by the jQuery. As soon as I link back to 1.5.1, it works normal again.
Thing is, when I do that, my whole layout messes up, it's as if it is ignoring my stylesheet when it is in the php version of the site, when it is in a normal html file, it pushes my main container to the left and then you can not see the header container properly, only a little bit of it. Everything seems to work fine if I keep it the code like the first shown here but I can not have it like that for xhtml, is there something I am missing here?
On my homepage (only my homepage) in newer browsers (anything but internet explorer), my table (I don't use css) color is not the right color, It's the same as my background color for some reason.Second, my slideshow messes up in newer browsers, and will overlap text that it shouldn't. What I need is either a way to fix the slideshow, or a new one that will work in newer browsers.
I created an aweber pop-over opt-in form and inserted the <script>...</script> code aweber generated.
The site looks fine in Firefox, but it seems that adding this little bit of code messes up the CSS of my site in IE8. Does anyone know what's going on or how to fix this?
Im using the cycle plugin trying to make a banner slide tha is 100% the width of the window, my problem is that when i resize de window the banner does not align center, it stays somo what left align. So is there a way to keep the slides align center after you resize the window usingthe cycle plugin? or is there another plugin that i can do that? I attached a image to ilustrate, the white banner with the cat should align center when i resize the windows but it stays left align.
I'm trying to develop a function to resize a control upon window resize. In regular javascript I would make a global array of control names and append code to the event that cycles through and resizes each control.For example
var proportionalizedImages=new Array(); proportionalizedImages.push(document.getElementById(ctrl)); if (window.addEventListener)[code]....
I'm wondering if there's a more elegant way to do this in jQuery. I've played around with it a bit, but i'm unsure how to get the control object to the resize function triggered by window resize without a global variable.
I'm trying to scale the text with the size of the window (I've also got all the layout sizes in ems, so this should keep the aspect ratio of everything the same as the window is resized). The code that I've got at the moment doesn't do anything -
Is there anyway to make a custom resize function that resizes one of my div elements on the webpage the same amount of pixels as the browser window gets resized?
I am looking to resize my entire webpage down to specific smaller resolution and add it to an iframe. I do not need it to "auto-resize" depending on viewpoint, just shrink it to a smaller size.How can I use javascript to resize the entire page to my dimensions?
I had an interesting idea recently to implement on my dynamic site.
I would like to have the users be able to click on object 1 and drag it overtop of object 2. Object 1 and object 2 should be div tags so that they could go around anything. When the user starts to drag object 1, a parcially transparent object 1 appears wherever the mouse goes (we will call this object 3) and the original object 1 disappears. After the user lets go of object 1 ontop of object 2, object 3 disappears and a javascript occurs (i will add this to the script later). If object 1 is let go not ontop of object 2 then the original object 1 reappears where it used to be and object 3 disappears.
Also, while all this clicking and draging is going on the user should be able to click and drag to scroll the page.
Unfortunately i have no idea how to do any of this. If anyone could help me with this it would be appreciated. This is kind of what you can do to files and folders in Windows XP.
There seems to be a lot out there, but I haven't found a javascript for a click and drag that has been bug free. The last one I had didn't work in Safari.
i want to setup a piece of code that allows me to drag text onto a div, and have that text be recorded into a javascript variable. the text is text brought in from anywhere; website, other website, a notepad text file, etc. basically any text
so, im thinking i need to access the system's clipboard to get that info?
I have a div that I can drag on mousedown. In Firefox the code works as expected. In IE, however, it does not work anymore.
I noticed that if you put the mousemove event listener on the div that I'm dragging that it will get lost if you move the mouse wildly across the screen. So I decided to put the even on the window.
Now you can move the mouse as fast as you want in FireFox. In IE, however, it moves a little then stops - not reacting at all.
I am using YUI's Drag and Drop utility to add some drag & drop functionality to a CMS I'm building.
This works just fine and is very easy to set up, but the thing I'm wondering about, how do I restrict the dragging? In other words; how can I make sure an element gets dragged within the borders of, say, some div and not outside them?