I've about 50`000 jpg images on a dir. Some images have a white frame, other
only 2 white lines, sometimes vertically, sometimes horizontally.
I've to show those image on a darkgrey background, and the result is ugly.
It's there any way to detect those white lines, then change their color for
showing on the screen ? I won't change the color of the frame on the image
itself, but when showing them. Also take in mind that some parts of the image are white, and they must be kept white!
How can I to delete white spaces around parameter that I to pass with HTML forms. For example, if I have 'firstname lastname ' or ' firstname lastname', exist it a builtin function in javascript to obtian 'firstname lastname'?
I have a frame that includes a hidden <div> at first (before any action), the problem is that when opening the page, I have a white space, and i can't reduce the size of the frame because the content of the <div> will not appear!
how to hide the white space of the frame without reducing it's size?
I have a simple page with two frames, left which houses a menu and a right frame which is used for the site content.
On the left hand menu frame I have a simple login system which requires the user to login, when they login a cookie is created called memberCookie to hold their memberid.
When they are logged in one of the options is to logout, on this page is a link to an external JS file called alert.js, which simply prompts the user if they wish to logout in a function called alert_logout Code:
There is a big wide problem that with IE6, PNG images display this horrible grey or white background when it's transparent. It looks ugly, but I can't seem to find a way to solve it. I've searched on google and copied scripts, inserted them in to the document I wish for the png to be completely transparent but it's still not working. I would normally just leave it, but as I want the site to look professional and the transparent png is essential to the data being displayed, I've been trying to find solutions to it.
I realise that most users have upgraded to IE 7 / IE 8 which supports transparent png images but there's got to be a small percentage of users who use IE6. I can't just say "sorry you'll have to upgrade your browser to view the data properly" obviously, so I'm trying to find solutions. I've tried using spacer.gif but that doesnt work (but it does when on table designed pages), so I found some scripts:
I have a frame based wizard. I need to change the image of selected step dynamically. There is a normal and selected image for each step. Here is a javascript function to change image when user selects perticular step. Code:
Right now, I am busy preparing a website on which I want to 'exhibit' some of the paintings I've done in the last few years. Okay, it's only amateur stuff, I think it would be nice to be able to show some of my work to the world. My site will consist of a set of simple frameset pages; in the largest of these frames, I plan to put scans of the actual works, in other frames there will be a title, a menu, some additional texts and so on. Obviously, I want to present my images optimally. But of course, it's quite impossible to predict what size my 'painting frame' will be.
That is why I would <i>love</i> to have a piece of Javascript code 1) That will put my images exactly in the middle of the painting frame (aligned both vertically and horizontally), 2) That will use as much of the available space as possible, and 3) That will keep the aspect ratio of each image intact.
I've tried the nice 'Full Size Image' script that Eddie Traversa once made, but unfortunately, his script just fills up the entire frame space, distorting either the height or the width of the image concerned. You'll onderstand why this is not what I need here. In case you are interested: some of the paintings I did can be seen in a book I am also working on, PANTACYCLOPEDIA [URL] - I've used some of them as illustrations there.
jquery and a button delete, for remove rows of database.The problem is that I do not know how must input checkbox by clickable with click delete button sent to php code?my jquery code:
I have a domain: example.com; which is the parent.And a subdomain: api.example.com; which page 'receiver.html' is being loaded in an iframe, child of parent. Both pages set document.domain = example.com.
I'm trying to adapt this code:[url] but Idon't want to load jQuery from the <iframe> again but I need to have the method $.ajax() working from the <iframe> otherwise it would be a cross-domain request and the browser would abort it. I tried ingenuously to set via $('iframe')[0].contentWindow.$.ajax = $.ajax() and I just got a shortcut to the parent page jQuery method. I also tried to "clone" it using $.expand (true...) but the method doesn't work for me; probably because of the complexity of the objected I'm trying to clone. So is there a way for me to use jQuery to have only a $.ajax() method in the <iframe> ? I've thought even about creating a XHR in the child-iframe and then use that in the $.ajaxSetup ({xhr: THATNEWXHR}) but I couldn't do it. I mean, I want to use the XHR factory from jQuery (which has fallbacks for IE, etc) but it has to be created from the iframe-child.
Maybe there is other way to make the AJAX call come from the child-iframe.
If you're wondering "why don't you load jQuery from <script> in the child-iframe", there is a reason... As I'm using jQuery plugins + my own custom javascripts + other independent scripts I created a compiler which minifies each file and bundle them in one. The advantage of this is the reduction of HTTP requests. So "why don't you load that bundle inside the child-iframe?", because it's ugly and Twitter doesn't... Yeah, I like to take Twitter as a reference and I think if they were able to make it so can I;
I got to work in most browsers except IE and Operaby doing it with pure javascript.
I'm "attaching" the code for you guys to test. If you open it with Chrome, Safari or Firefox you will receive 2 alerts one with the return of $.get() and another with the return of a request made via XMLHttpsRequest object. Otherwise (if you open it with IE or Opera) you'll get 'undefined' in the first alert but the real return in the second.
Im trying to make a back button that reloads the previous page the user was at. The back button will be on a small top frame and the page that needs to be controlled will be in the main frame.
The top frame is just a navigation system, and all pages will be loaded in the main frame. Im trying to use this Code:
I want to have a main image in place and when you click on 1 of the 3 frame options the frame changes showing a preview. Also I would like the add to cart button change its code to add the correct item as well.
i need to pass the data in the textfields from the left frame to the textfields in the right frame of my frameset. (ex: dslnum of frame1 will be pass to txtDSLTN of frame2)[URL]
I have two frames (frameset, let's call it frame1 and frame2). Frame1 has links..., and frame2. When some link in frame1 is clicked, it must be changed content of the frame2. Here's example: click. How to do that? (I don't see any javascript code)
I have a parent document that has a frameset with two frames in it. The first frame is a "header" that runs across the top of the site, and never changes. The second frame contains the "content" of the site. Essentially, I am trying to figure out how to prevent the header appearing above external sites when the user clicks an external link in the "content" frame.
Every time the content frame changes to a new URL, I would like the check that URL and determine if the content frame is changing to an external URL (i.e. different domain in URL) or to an internal link (same domain in URL). If the content is changing to an external link, I want to break out of the frame and just load that external link in the top most document.
I would like all of my javascript to be in the parent document, not spread throughout the individual pages of the site. I was trying to approach this by setting the onunload event handler of the content frame, but I am left with a couple of specific questions: 1. In handling an unload event, can you determine the next URL that the document is loading? Code:
I have a little problem, I structure my site with a main page index.html with a frame in the central whit name CENTRALE, so every other page I will open within this frame. Now I need to have a direct link to these internal pages, give an example I wish it were possible to go to the page clothing giving a direct link to that section of the site type www.indirizzo.com / clothing.html because the state of things if I take the 'direct address to that page I open only the part inside of the frame, but I wish I would open inside the "main frame, there is a solution in javascrip to overcome this problem?
I have a frameset with two frames; topFrame and mainFrame. I have code in topFrame and wish to print the contents of mainFrame. The code that I have used has worked for many years and still works on my localhost Apache Server. However, it has now "stopped" working. When I press the button in topFrame it prints the contents of topFrame The code that I am using is
I use dreamweaver mx html editor to make web sites. I think I know enough Html to get by. My new site uses a frame set so the head and controller don't change reload or move. This works nice, now all I have to do to make a new page is make the content page. But my problem is if I send out a link for someone to look at, it only loads the content page and not the frame set. I thought I could use javascript to determine if the frame set is present and if not load it. But I can't seem to find a way to sent variables from one frame to another. Also if a user clicks a link I would like my flash controller to reflect it.
I need to know how to refresh a bottom frame TO a specific dynamic URL from my top frame (meaning the code has to be in the top frame) say every 5 seconds. The top frame will be a php file as I need DB values. But I believe the frame thing is done via javascript. This ain't working so far, it only loads the first URL at not the rest. Is there the ability to refresh to a specific url in a target frame. Code:
One more question about manipulating iframes. In a script I've looked through to investigate AJAX file uploads, there is this technique for accessing the contents of an iframe:
Code: if(frame.contentWindow) { var thebody = frame.contentWindow.document.body; }else if(frame.contentDocument) { var thebody = frame.contentDocument.document.body; }
I haven't been able to find much info on contentWindow and contentDocument. In fact, other sources I've found talk only about using contentWindow to access an iframe's contents, ignoring contentDocument completely. What is the difference between the two, and what browsers is the contentDocument check targeting? Any modern browsers, or is this a backward compatibility thing?
I am creating a class for all of my code snippets, using a formatted paragraph (and "word-wrap: pre") to keep formayting intact. The problem is that in keeping my HTML files formatted nicely, they are indented, and due to the "pre" formatting the indentation is kept. Code:
What is the best way to white list a set of allowable characters using regex or replace? I understand it is safer to whitelist than to blacklist, but am not sure how to go about it.
A website I've been working on has a black bar across the bottom. Under some conditions, however, there is a gap between the bar and the bottom of the page -- white for the body. The conditions vary between browsers and OSes. To keep things simple, I'll describe what happens with my principle development environment -- Chrome under Ubuntu.
The main body of the website is fixed width, centered against a neutral background. If the browser window is narrowed so that a horizontal scrollbar appears, the gap appears.
I have tried various things to find the gap so I can move the bar down or whatever but nothing seems to work. I tried using the document height but I found that it is greater than the actual display area which probably means that it is including something not visible (which is fine) but how do I reliably determine the extra? Or is there another solution I should be looking at (I won't bother listing all that I have tried)?
i m using the following validation code to validate email id
if (!/^w+([.-]?w+)*@w+([.-]?w+)*(.w{2,4})+$/.test(document.getElementById("customer_name").value)) { msg=msg+"Must Enter a valid Login-id/Email "; document.getElementById("customer_name").focus(); }
now i need that if the email id contains white blank space in front of email id or end of email id then this validation should pass otherwise not.
at present if there is blank space in front and end of email id then the validation doesnt passes and gives alert.
what should i add in it to validate it or how can it automatically remove white spaces before validating.
Right now when someone clicks on my listbox I immediately do an update on the form to populate the selected item.
Is there a way to detect if a user has clicked on some white area of a list box? If my list is sized 8 items but the list only has 4 items, if the user clicks near the bottom of the list where there is no item to select, can I detect that? Currently I get the form updating even if I click on the white area of the list and I'd like the form to update only if I actually click on an item in the list.