I am making a PHP-MySQL site which has an image gallery page that generates thumbnail-sized versions of images (the paths are all in the DB) using the width= tag. I have it so that when you click on the thumbnail, a fixed-size window pops up with the actual-sized version of the image. The new window just displays the image itself with .jpg in the address bar, and not an HTML or PHP file that contains the image tags and path in it. Is there any way I can have the new window automatically adjust to the size of the image, or is it strictly a one-size-fits-all dealy?
I have a page where users click on a small thumbnail image to view a larger version of the image in a new window. But instead of just viewing the image file, I want them to view an HTML page that contains the image and a "Close Window" button. I know how to do that, and I know how to specify the size of the popup window. But...
What I'm trying to do is make the popup window just big enough for the image and the button, with perhaps a 10 pixel border around it. Since the images will vary in size, I can't hard code the width and height properties of the popup window. I need to have JavaScript measure the height and width of the image to calculate the dimensions for the popup window (and presumable this would have to be done before it opens the new window).
I didn't write much of this code, but basically, it opens an image in a new window. The problem is that the new window can either be the whole page, or a certain set size. I would like to make the window height and width determined not by a pixel number, but by a percentage of the size of the image I am opening in the new window.
here is the piece of code I think is pertinant.
// Strip file name from image src var spath=targ.getAttribute('src'); wholePathLength=spath.length; strippedPathLength=spath.substring(0,spath.lastIndexOf("/")).length;
I am appending an image via Javascript but IE6 will NOT consistently resize the image to its natural width and height. The exact dimensions of the image vary but are always 100x100 or less.ave tried using CSS like {width:auto;height:auto;} but this is not reliable. I append "?" + now.getMilliseconds() to the image SRC to prevent the browser caching it (because the image can change but the filename doesn't). If I omit this query string, then IE6 seems to resize the images correctly.I also have to float the image and I've noticed that removing the float fixes the problem. I tried to use display:inline instead of float but it didn't work.
I'm trying to make my sidebar show 3 images then scroll to the next 3 automatically every 3 seconds or so. (vertically)
how to do it or show a snippet of code?
I've looked up various scripts for scrolling the pictures I have on the right vertically, but I can't seem to implement any of the ones I've found. I'm not trying to ask for you to code it all for me (unless you really want to)
This is my first venture in this forum and also my first attempt at some programming for a fair few years and I have run into a problem i cannot for the life of me see the answer to. I am fairly sure I am just missing something stupidly obvious, but like I said its been a few years since I did any programming so I'm a bit behind with my knowledge!
What I am trying to do is using a combination of HTML & Javascript (well actually JQuery), is to automatically update a cell in a table without the user doing anything. The changes to the content are based on changes to a database by other users. I have written the following code which auto updates text in the DIV, the question is how do I ammend this text to automatically switch between pictures?
I'm trying to make my sidebar show 3 images then scroll to the next 3 automatically every 3 seconds or so. (vertically)Can anyone help me out with a reference I could look at how to do it or show a snippet of code?I've looked up various scripts for scrolling the pictures I have on the right vertically, but I can't seem to implement any of the ones I've found.
I'm using AJAX to auto-refresh a chatroom. You can see it on the right of the following site: http:[url]...
The problem is, when large images are placed in the chatroom via BBCode, (temporarily disabled) when the chatroom refreshes, they flicker! This is caused by the AJAX reloading the content, which in turn reloads the image.Is there a workaround for this? I want to allow images in the chatroom, but I don't want to turn off the auto-refresh. Below is the code I am running to refresh the chatroom:
Javascript Code: Original - Javascript Code function update() {[code]....
Basically, what it does is reloads chatQuery.php and currentlyOnlineQuery.php every 5 seconds, or when a chat message is submitted.
What I am trying to do is create a slider that auto scrolls 3-4 images from right to left with no controls. And if the user hovers over it, it stops so they can read the content that is featured. Everywhere I search there are bunch of plugins i.e. easyslider, s3slider, etc. that have tons of code that is greek to me. I tried using the easyslider code and changing things around for it to do what I want, but I was unsuccessful.
I've been using pop-ups for some time now and I still can't figure out how to get the image to fit perfectly in the new window. There's always a few pixels of background showing and I have to increase the size of the window just to have the spaces around the image to even out. Is there any way to completely remove the vertical and horizontal spaces in pop-ups?
I've been trying to use HTML text that will scale up or down using the Internet Explorer 6.0 menu ViewText Size. I'm using CSS to set the sizes and weight.
When I use ViewText Size Medium and CSS the results are
Product line - font-size: medium - result bolded Pricing line - font-size: small - normal
When I use ViewText Size with any size not medium and CSS the results are
Product line - font-size: medium - normal Pricing line - font-size: small - normal
If I use font-weight bold for the Product Line I end up with double bolding when ViewText is set to Medium.
This inconsistant behavior of bolding makes it hard to have consistant looking fonts where the Product Line should be bolded.
If I use a set point size the text will not scale.
Is there a way of setting up fonts so that the results across the ViewText Size options is consistant?
Is it possible in Javascript to Size an element to its contents?
I have resizable divs with overflow=auto, and I'd like to plot them initially with fixed width and at the minimum height which will avoid the appearance of y-scrollbars.
I would be fine if I could find the actual total length of the included document given the current width of the div. (Calculating it would seem to be difficult, given unknown wrapping algorithms, empty lines, etc.)
Or somewhat less fine, even if I could question whether there is overflow, or clipping, or whether scrollbars have been added to the div, given the current height.
I could then hack the height till the overflow or clip or scrollbars went away. (Yuk!)
But I can't find any css or other read-only properties I could query that would give me any of those values.
I assume that YOffset or scrollY wouldn't help, since they would be 0 when the bottom is clipped off. (I don't even know if they're even defined for divs.)
I haven't been able to find a "scroll Object" that would say whether the scroll bar is showing.
I am trying to get frame re-sizing to work in Netscape 6, using the following JavaScript function:
function bannerframesize() { if (!document.all) {top.document.getElementById("cars_r_set").rows="40,*"} else {top.document.all.cars_r_set.rows="40,*"} }
The document.all method works for IE4 & IE5/5.5 and the document.getElementById method works with IE5.5 (I've proved this, although in the above function the document.all would take precedence with IE5/5.5), but it does not work with Netscape 6 (I can read the rows property value using this method, I just can't write to it). I've tried using both top.document.... and parent.document....
My JavaScript Bible (by Danny Goodman) states that the getElementById should work with Netscape 6 and that one can read AND write the <FRAMESET> rows property in Netscape 6.
I am building a webpage built with a column on the left, a header, and a main iframe which is the main content of the page. The content of the main iframe can get to be long, and I want the iframe to resize its height to fit the content. I know javascript can do this. I have seen many live examples of it working online. My problem is when I try and use the code myself (even if I leave the live example pages unchanged, but just save them and run them offline) it doesn't work. That is, the iframes work, the page works, but the iframe doesnt fit it's content.
Now, the page that I'm building is fully offline right now and I don't know if my javascript will work just fine if hosted on a domain and accessed online, but as it is it's not working and I don't know why. As an example here is some code, and the page it was taken from
I am new to jQuery and not an experienced programmer. I downloaded the accordion widget and it works fine. I have one small problem: the content box instances 2 and3 onwards, seem to be sizing themselves depthwise to the size of the first content box and not dynamically to the number of lines of text I enter in each. Can I make it dynamic with alterations to the CSS? If so whichproperty do I alter and to what?
I have a very simple PHP script that is reading a plain-text CSV file and parses it out into into a HTML table to display the data. No biggie.
What I want to do is while keeping the browser window for that page open and minimized, i want to be able to maximize the window when the text file has been update. This is a small script that is being used for some dispatchers at a taxi company and the popup window is supposed to be their list of customers to pickup. The company has several dispatchers who are constantly updating a proprietary system, and this system has a special program that spits out the data for customers who need to be picked up. Every dispatcher has a link to this PHP webpage to display the next available pickups. The only problem is that they want to be able to minimize the browser window and have it open automatically when a name has either been added or removed from the pickup list.
Is is possible to integrate a javascript function to do this with PHP?
I have a popup window that the user opens, and then after say 10 seconds I want it to redirect the parent window that opened the popup to another page.
As im sure you know, the usual way of redirecting after a set time is:
Is there a way to setup in the header that all links on a page with class="myclass" will default to a small popup window with X parameters and size? So I don't have to do an onclick on each <a href>??
I have an <input type="file"> field and I would like the file chooser dialog to open automatically after the page loads, for example on onload(). I have found a trick with executing click() in js on the file element but it seems to only work in IE. Are there any methods that would work in FF and other browsers as well?
I would like to be able to resize my current window to 1024x768 and center it at the same time. I know how to resize (window.resizeTo(1024,768)) but I don't know how to center the window. The only examples I can find are opening new windows such as this:[URL] I'm restricted in that I have to have the script on one page and I cannot open new windows e.g. open a new popup window and close the opener.