img 1 « Development « Javascript HTML CSS Q&A

Home
Javascript HTML CSS Q&A
1.animation
2.audio
3.background
4.browser
5.button
6.canvas
7.checkbox
8.Cookie
9.Development
10.DIV
11.dom
12.dropdown
13.editor
14.element
15.Event
16.Firefox
17.flash
18.font
19.Form
20.frame
21.hide
22.hyperlink
23.IE
24.iframe
25.image
26.innerHTML
27.json
28.layout
29.Library
30.localStorage
31.Menu
32.mobile
33.onclick
34.popup
35.Render
36.scroll
37.scrollbar
38.svg
39.tab
40.table
41.tag
42.text
43.TextArea
44.TextBox
45.validation
46.video
47.window
48.xml
Javascript HTML CSS Q&A » Development » img 1 

1. IMG without src    stackoverflow.com

My JS code includes some images that are empty at the beginning (without src attribute specified at all + display:none). When added to sites with CSS1 compatibility I see broken image icon ...

2. change img src using select    stackoverflow.com

I'm using the select form to navigate around a page.

<form name="form">
  <select name="menu1"  onChange="MM_jumpMenu('parent',this,1)">
<option value="#" selected>SELECT</option> 
<option value="#a">location A</option>
<option value="#b">location B</option> 
</form>
I'd like the select form to have the ...

3. Javascript set img src    stackoverflow.com

I am probably missing something simple but it's quite annoying when everything you read doesn't work. I have images which may be duplicated many times over the course of a dynamically ...

4. what is a good method to insert a into a in HTML page?    stackoverflow.com

use javascript or other method ? have any recommendation?

5. Opera: Altering img src attribute does not automatically update display?    stackoverflow.com

When using javascript to swap images the HTML is updated fine but what Opera actually displays is not unless you scroll or resize the window. A picture of what happens when ...

6. IE - Javascript to change IMG SRC cancels existing loading bar    stackoverflow.com

I've come across an obscure problem where many of the pages on my company's website take several seconds up to several minutes to load. Ordinarily, one would expect a browser's ...

7. JavaScript replace img path    stackoverflow.com

Hello JavaScript guru's. I have a simple JS question on how to replace all IMG src path's on a page. Currently, my IMG tags look like:

<img src="path/to/image.jpg" alt="" />
Output desired:
<img src="../image.jpg" alt="" ...

8. I want to implement fire-and-forget request for in img src in JavaScript    stackoverflow.com

I'm trying to implement fire-and-forget on an img src=... call from a web page, and am looking for the most solid method. Why? In most Web tracking systems like Omniture or Coremetrics, ...

9. Why is Firefox is requesting a bogus URL from an IMG src in JavaScript code?    stackoverflow.com

I'm getting weird 404 errors on my site for the following URL:

GET /%27%20+%20item.icon%20+%20%27 HTTP/1.1
I've got some corresponding code in my HTML file:
<script type="text/javascript">
  function foo(item) {
     ...

10. adding img in js    stackoverflow.com

I'm using javascript to create an image element like so:

var img = document.createElement('img'); 
What would I do to give this img a width of 100%?

11. why is the alt attribute not always properly displayed    stackoverflow.com

So I have this php script that output an html table with data about some files (like filename, filesize, etc...) I have this javascript function that displays the picture when you hover ...

12. javascript check if img src is valid?    stackoverflow.com

I have something like:

document.getElementById('MyPicture').src = 'attempted.png';
If the client cannot get that resource, I would like to replace it with:
document.getElementById('MyPicture').src = 'error.png'
I know I can put onError=function() in the image tag, but ...

13. Performance of setting img src to unchanged value?    stackoverflow.com

If I have an img tag like

<img src="example.png" />
and I set it via
myImg.src = "example.png";
to the same value again, will this be a no-op, or will browsers unnecessarily redraw the image? ...

14. Customize the tooltip    stackoverflow.com

I was wondering is it possible to customize the tooltip that we get after setting the title attribute in an img tag? Now I get a standard rectangle with blue background ...

15. Javascript not working IE 8 on Windows    stackoverflow.com

I have 4 images that I use as a navigation menu, when I click on one it lights up (changes image) and the current goes out, and so on so forth. It ...

16. Decrease the latency of showing tips (like img's title)    stackoverflow.com

When you move your mouse over a link with title, after a while it will show the title as a tip. Is it possible to remove this delay or change it ...

17. Javascript img onload    stackoverflow.com

I have something like this:

<img class="side_image right" id="side_image" src="http://path/to/file_large.jpg" width="300" 
height="210" onload="document.getElementById('loading_gif').style.display = 'none';"  />
My problem is how to tell if the image does not exist. This block of code ...

18. Why can't I do ?    stackoverflow.com

It works if the html file is local (on my C drive), but not if the html file is on a server and the image file is local. Why is that? Any ...

19. is there any way similar to to display contents of a .txt file    stackoverflow.com

I have some html and javascript that implements a slide show for a set of images. Now I'd like to include .txt files. Is there anything in html or javascript that ...

20.  Attributes    stackoverflow.com

I've got some java script code that implements a kind of slide show. It uses a series of img tags as a table to control its actions. I probably used ...

21. SOLVED - CSS: img falls behind object(embedded youtube vid) with z-index attribute    stackoverflow.com

Im trying to place a png image over an object element containing a youtube video here:

<object>
scripts...
</object>

<img src='src' style='position:absolute;top:-10px;z-index:99;'/>


the position property is not applied to the object and yet once the embedded video ...

22. Javascript If/Else statement change img src    stackoverflow.com

I've got a drop functioning dynamic drop down menu that I'd like to add a little more functionality to. The menu is the page navigation and hovering over a link changes ...

23. Javascript code for serial img loading    stackoverflow.com

I am new to javascript. I want a javascript code with which i can load an image which is named for every day/month/year. in a serial i have the following code :

var ...

24. if statement with img.src    stackoverflow.com

The problem: whenever, if i have the single '=' the variable will show up and be fine.. but it completely ignores the if statement. if i only do the double ...

25. Regular Expression for img src using javascript    stackoverflow.com

I want RE for this string pattern:

src="http://www.prphotos.com/f/1335/CSM-001335/Robert-Pattinson,-Reese-Witherspoon-Water-for-Elephants-New-York-City-Premiere---Arrivals.jpg"  border="0"
I am using:
<img.[\w+\s+\d+\W]*/>
Also do I have to write different RE for different languages like javascript,PHP etc?

26. JS: accessing img attributes that were assigned randomly    stackoverflow.com

I have a page with a block of thumbnails (small images) and I would like a bigger version of the image to appear when a small image is clicked on. Both ...

27.  scale to closest fit aspect ratio    stackoverflow.com

I want to make the logo (in the top left corner) always keep its aspect ratio, but I also want it to stay in the right place, for any browser. Here's ...

28. why can't I set an ascii reference in an img title attribute using js?    stackoverflow.com

I'm having trouble using an ascii character reference (&reg;) in an image title. It works fine when you set it via the html body, but when trying to do the same ...

29. Positioning an img with javascript: it wont move    stackoverflow.com

I have some javascript to set the offsetLeft attribute of an img element. But my javascript doesn't move the HTML element, what do you think I can do to make it ...

30. Different img src for pikachoose carousel    stackoverflow.com

I have a pikachoose script installed and working properly but I need to have the thumbs named in this form: imagename-100x120.jpg Currently the script takes the src of which lies ...

31. Pull img src from this html grabbed with javascript    stackoverflow.com

I am extracting an image from a part of the document using:

var  theImg = document.getElementById('imageDiv').innerHTML;
This returns something like
theImg = <img src="http://website.com/image.jpg?&image-presets&" alt="foo" style="z-index: 1" />
How could I grab just ...

32. CKEditor 3 - how add img to link (generated by plugin link)    stackoverflow.com

I trying add to link in ckeditor/lugins/link/dialogs/link.js:

if(N.length==1&&N[0].collapsed) {

   var O = CKEDITOR.dom.element.createFromHtml('<span><img src="/images/elfinder/fileicon/exampleimages.png" />text</span>',w.document);

   N[0].insertNode(O);

   N[0].selectNodeContents(O);

   M.selectRanges(N);       ...

33. how to get "real" url from img src in javascript    stackoverflow.com

I have piece of offline html like so:

<img src="../img/button.png"/>
and when I try to access the src attribute in JS, I get a different value than what's written in the html:
var s ...

34. using stringByEvaluatingJavaScriptFromString to extract the src of an img then assigning the url to a NSString OR NSURL    stackoverflow.com

I'm using a WebView in my cocoa application, I would like to extract an image's url from the WebView. I've been trying to use stringByEvaluatingJavaScriptFromString to extract it with no avail.

NSString *imageURLString ...

35. javascript to refer to img url: best practices?    stackoverflow.com

I have written a tiny bit of javascript which uses two images. inside the code it does something like

str+='<img src="left.jpg"></img>';
...
str+='<img src="right.jpg"></img>';
...
The script works very well. The problem is that depending which HTML ...

36. html img problem with base url    coderanch.com

Hi guys, I have this simple problem with html that I can't seem to figure out. I have a page with items, if you click on an item a popup shows. This popup contains a html page with an image. The image is not shown. This is my problem. Now I know why, but I don't know how to solve this. ...

37. Inserting IMG Links    codingforums.com

So my goal was to insert a mini ICO image (of an R) and have it be a link to an external news page for each individual player on a fantasy team. The code below gets the proper link to each player and inserts the image and corresponding link one at a time though a couple different functions. I have inserted ...

38. Javascript problem, editing img src with javascript    codingforums.com

"); echo ($exploded[1]); //total page in the comic $pagecount = (int)$exploded[1]; //Take last posted value, process it right away echo ('

'); echo ('"); ?>

39. img as data    codingforums.com

Hi, I have a div "bigPicture" which contains an image of Thai food. Image can change based on a users onclick of thumbnails. Each image as it passes through div "bigPicture" needs to have the values: price, description and Date,Time associated with it. How do I assign those values and use them later in a Shopping Cart environment. I have tried ...

40. Updating img.src does not work    codingforums.com

I had tried the alert, and it shows the correct path. Even in live server, I checked with firefox and it is showing the page properly. So, it does look like the issue is compatibility with IE6. ckeyrouz, The code is not owned by me and I am not allowed to post it as per company policy. Sorry about that. Anyone ...

41. "get_img_binary() is not defined" error    codingforums.com

42. declaration overtaking img    codingforums.com

43. Switch IMG Src using JavaScript    bytes.com

44. using mutiple img ids    bytes.com

45. Passing "img" of img.src as argument    bytes.com

OK, I now have the argument passed in correctly so that i can identify the src of the img, however, i'm not sure how to edit that src (i used getElementById(c)) to find the src) i assume i could use this.src to edit it, but in the scope of the function this.src is not defined, is there a way to make ...

46. can't show img in IE ?    forums.digitalpoint.com

47. Please Help Me --My question --    forums.digitalpoint.com

You can change the value of the .src property on image objects, so you could replace that value to a "loading" message images as your intended images load by testing the .complete property with a setTimeout() function. I thought about writing some example code, but I felt it was better to avoid the issue in the first place. Just make your ...

48. please help me in this javascript img load code    forums.digitalpoint.com

49. img src in javacript    forums.digitalpoint.com

50. See img with the link made in JavaScript ...    forums.digitalpoint.com

51. Change img src with passed html parameter    forums.devshed.com

OK, upfront i'll apologise for this trivial and im sure very simple task but I am a complete novice. I have downloaded 2 html pages that give me page1 with a drop down box for a list, and a 'show' button. this then passes dropdown value to page2 and JS presents the text on the page, but I want to use ...

52. Passin from function in external javascript    forums.devshed.com

__________________ Three gigs for the secretaries fair Seven gigs for the system source Nine gigs for the coders in smoky lairs One disk to rule them all, one disk to bind them One disk to hold the files, and in the darkness grind'em --------------------------------------------------- It is by caffeine alone that I set my mind in motion. It is by the beans ...

53. Img.src    forums.devshed.com

it's using an image call to pass data to a server script. the server script returns the binary data for a blank image, but takes the input data and does something with it. it's a useful technique to silently send information to a server, since the background-load of the image source has no effect on the page. HTH - derelict

55. Adding a link to an img object.    forums.devshed.com

58. OnError change IMG SRC    forums.devshed.com

59. Programmatically changing src, filepath    forums.devshed.com

60. Get img src    forums.devshed.com

61. Not refresh the img.....HOW???    forums.devshed.com

One question: what the heck are you doing? I'm serious-- I missed the problem altogether... I thought I would be able to find out, but by your code you've provided, I only was confused more. With the code that you have already posted, you are adding the same exact HTML elements and function to the parent node ("copying"). What is this ...

62. Get img coordinates    forums.devshed.com

91. Object Doesn't Support This Property or Method - img id problem in IE only    sitepoint.com

Colour:

...

93. Change IMG title or alt with Javascript    sitepoint.com

94. Apply IMG Style to JavaScript Slide Show    sitepoint.com

The document.images.SlideShow.style.border = "solid 4px #000000" worked perfect!!! Thank you very much. To be honest, I thought this would prevent code from going down this path for older browsers but to be even more honest, I am not sure what it does for me any more. I just have old code that has it in it and when I copy and ...

95. Img don't work in FireFox    sitepoint.com

96. Appending parameters to img file call    sitepoint.com

I'll take a swing at it. It would appear that another script has modified the window object to have a 'google_ad_url' property. The first line of code checks to see if the string that is the value of that property contains a question mark and, if so, determines its position in the string. Presumably, that is to ascertain whether the value ...

97. Img max-width script for IE    sitepoint.com

Hi all, I've got a fixed width site, and I'm implementing a heavily customised version of Simple PHP Gallery over there. Some of the images in the gallery are wider than the site itself. My solution to this is to simply let CSS do its thing, and set a max-width on them (if the user wants to see them full size, ...

98. replacing the src of an img after loading    sitepoint.com

hi I'm sure this can be done.... just need a little help to figure out how! What I want, is the code to look for a particular ID of an img, and then change the filename (but not the whole path) of the image. For instance... if the path was "../images/headin.gif", the javascript would find this by the ID, and change ...

99. What wrong with this simple swap img?    sitepoint.com

100. Javascript "next img" problems.    sitepoint.com

java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.