src

set an iframe source without loading new content

Is there any way to set the src attribute of an iframe without the iframe generating an http request? If not, is there a way to format the request headers before the request is sent? edit: I just need the src to match the path of a cookie, but I don't ever want that cookie sent to the server. See my comments on this question. ...

img src won't work with php variables

<a href="'.$productLink.'" alt="'.$productName.'"> <img src="'.$productImg1URL.'" alt="'.$productName.' '.$productType.' "> </a> Hello the img src is actually in a different directory /images I know this is probably super easy but Ive spent an hour on it and nothing. The page works but doesn't show the directory. Please help the roo...

In Email, Image (img) Source (src) Tags are rewritten as relative links. How to fix?

I'm working on sending out an html based email, and every time it sends the image src tags and some of the anchor href tags are modified to be relative url's. Update 2: This is happening between when the body of the email is generated and sent and when it arrives in my inbox. Update: I am using Postfix on a LAMPP server. In addition,...

Variable for img src=

Hi there, I have a question. Firstly, I am not going to pretend that I know what I am talking about here. I am a newbie to http and JavaScript. I think my question may be answered in this post http://stackoverflow.com/questions/116967/img-src-tags-and-javascript but I thought I would explain the exact thing I am trying to achieve in ca...

use Img source with php variable?

hey guys, i have the following code in my detailansicht.php: <div class="file_description_box"> <b>Beschreibung:</b><br /><br /> <?php if(!empty($beschreibung)) echo '<div align="center">'; echo '<img src="$coverlink" alt="Cover">'; echo '</div><br />'; echo fo...

I am having trouble changing my images on click event with Jquery

I am trying to swap image when an image is clicked...here is my jquery so far and it's not working. $(document).ready(function(){ imgFldr = '../../App_Themes/Default/Images/'; $('#smallImg1').click(function(){ $('#smallImg1').attr('src', imgFlder+'belkinSmall4.png'); }); }); And below is an example of my HTML <div> ...

What is my script src URL?

Is there a simple and reliable way to determine the URL of the currently-executing JavaScript file (inside a web page)? My only thought on this is to scan the DOM for all the script src attributes to find how the current file was referenced and then figure out the absolute URL by applying it to document.location. Anyone have other idea...

Pass vars to JavaScript via the SRC attribute

In my HTML file I have linked to the JS with: src="myscript.js?config=true" Can my JS directly read the value of this var like this? alert (config); This does not work, and the FireFox Error Console says "config is not defined". How do I read the vars passed via the src attribute in the JS file? Is it this simple? ...

Scrape FULL image src with PHP

I am trying to scrape img src's with php, I can get the src fine, but if the src does not include the full path then I can't really reuse it. Is there a way to grab the full path of the image using php (browsers can get it if you use the right click menu). ie. How do I get a FULL path including the domain in one of the following tw...

jQuery function attr() doesn't always update img src attribute

Context: On my product website I have a link for a Java webstart application (in several locations). My goal: prevent users from double-clicking, i. e. only "fire" on first click, wait 3 secs before enabling the link again. On clicking, change the link image to something that signifies that the application is launching. My solution wor...

Telling when an iframe is on a new URL

Hi, I am using JavaScript to make a small iframe application, and I cannot seem to figure out a way to update the URL in my URL bar I made when someone clicks a link inside the iframe. It needs to be instantaneous, and preferably without checking every millisecond whether or not the value of document.getElementById('idofiframe').src ha...

Javascript set img src

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 generated page. So the obvious thing to do is to preload it and use that one variable as the source all the time. var searchPic; function LoadImages() { ...

Changing IMG SRC with Javascript

I'm new at javascript and while there are many more complex solutions, I don't understand them and hope I don't have to at this point. I have a main picture... <img src="main-picture.jpg" name="Mainpic" id="image"> ...and I want to be able to change this picture when I click on one of two thumbnails. <a href="" onclick="FirstPic()">...

jQuery: use the "name" as img "src"

Hellou Folks! my question: i have an img tag <img class="myclassname" src="1.jpg" name="2.jpg"> i'd like to change the img source (currently 1.jpg) to the one i wrote in the "name" attribute (2.jpg) using jquery. why this does not work? $(".myclassname").attr("src", $(this).attr("name")); thanks for any help! greets mafka (ps: t...

Opera Bug: src="" generated by asp:image is empty

Hey, I have the following problem with Opera. The following asp.net code <asp:Image runat="server" ID="imgExpand"/> <ajaxToolkit:CollapsiblePanelExtender ID="cpe" runat="Server" ImageControlID="imgExpand" ExpandedImage="<%$ Image:collapse.png %>" CollapsedImage="<%$ Image:expand.png %>" /> generates the following in...

PYTHON: Replace SRC of all IMG elements using Parser

Python Newbie. I am looking for a way to replace the SRC attribute in all IMG tags not using Regular expressions. (would like to use any out-of-the box HTML parser included with default Python install) I need to reduce the source from what ever it may be to: <img src="cid:imagename"> I am trying to replace all src tags to point to th...

.ashx ASP.NET Handler Image not displayed in html img-element

Hi, I have a strange problem. I created an ASP.NET Handler (AccidentMap.ashx) that gets a bitmap and returns it. Here is the handler: using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Services; using System.Drawing; namespace BackOffice.Modules.Insurance_Company { /// <summary>...

JavaScript Source Query

While browsing the code of some websites I sometimes notice that some JavaScript files are included like this: <script type="text/javascript" src="javascripts/jquery.js?1252521516"></script> But I don't see what the jquery.js ?1252521516 part of the src parameter does. Can anyone explain this to me please? ...

Unable to resolve uploaded images paths in partial view on server.

My ASP.NET MVC web app requires the upload of image files. These image files are then displayed via a partial view rendering where the path of the image file is inserted into the scr parm of the image tag. This works great in development mode however when I deploy to the server the images won't display. I have tried many way to specify t...

Opera: Altering img src attribute does not automatically update display?

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 you scroll explains it best. Any ideas? EDIT: The source of the problem seems to be that the image is inside a div that has float right. EDIT2: This http://trac....