src

Iframe changing according to javascript and php

hi everyone! I'm attempting to reload an iframe when a onChange event occurs heres what i got in javascript tags in the header ` function getSchedule(oEvent) { var n = document.getElementById("wantedTherapist"); var newn = n.options[n.selectedIndex].value; window.frames['schedule'].src = "schedule.php?therapist="+newn; }...

changing src reference based upon https

I'm adding a facebook comment widget to a website. I'm placing this widget in a file that is included on everypage. The navigation is relatively linked so it switches back and forth from http and https. But for some reason the comment widget only shows up if both the src linked file and webpage is secure or both the src linked file an...

getting the path of a javascript file

Hi, In a javascript file (e.g. script.js) I need a variable that contains the absolute path to this file. How can I do this dynamically? Thanks. ...

why my image path is not taken?

Hi I am getting the image path from database in this foreach foreach($image as $row){ $value = $row['dPath']; $imgpath =base_url()."images/".$value;//this is not taken $imgpath = base_url()."images/con_icon.jpg";//this$imgpath is taken echo $value; when i give $imgpath as $imgpath = base_url()."images/con_icon.jpg"; it ...

Javascript problem when setting src for img element in FireFox - string parsing error?

I'm having problems with image's on the page. I'm using Javascript to create the elements, and in FireFox it seems the string that I'm using to set the innerHTML is not being parsed correctly. I'll see this when the server page is requested with invalid GET variables. They look like this (from the PHP script's error handler): GET[] ...

webview loaddata in android does not load a picture from img src

I use loadData method to load some html content into a webview, but when it encounters something like this : <a href="http://www.anywebsite.fr/"&gt;some text</a><img src="http://www.anotherwebsite.fr/thewantedpicture" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /> I only get this in t...

JQuery slideToggle replace image src

Hi, This function is called when an up/down arrow is clicked to slide hidden div. If the div is hidden, the arrow points down and changes to up when the div is shown. If the div is shown, the arrow points up to hide div and changes to down when the div is closed. I just wanted to know if there was a more efficient way of doing this or...

Javascript to change image form submit button src not working.

I'm trying to change the src of an image form submit button using an onclick, but it doesn't seem to be working correctly. Am I missing something? <input class="submit_image" id="my_form_button" onclick="$('my_form_button').src='/images/buttons/submitting.gif'" src="/images/buttons/submit.gif" type="image" /> I've also tried using t...

Paths for images using Apache with Windows

I have a problem with links testing locally using Apache with Windows. The final links have the following format: file:///C:/Documents and Settings/USUARIO/My Documents/xampp/htdocs/my_website/images/january/my_image.jpg The images do not show. However, if I directly copy the src from the img tag and paste it into the browser (Firefox)...

IF/ELSE statements on IFrame Source attribute

Hi Everyone, I am currently defining the src attribute of my Iframe with the URL + a ID (of specific person) that I am retrieving from a database. It returns a picture that is stored at a repository for each person. For people that currently do not have a pic I would like the URL to be URL+00000 instead of the 404 error page. I'm tr...

Missing IMG src leading to multiple unknown server requests

Hey my application has a map that is drawn with custom marker images rendered on OpenLayers VectorLayer. The problem here is that I see a lot of requests to the page that has this map and this comes to the server and all the server side code written for that page is executed and HTML is returned to the client and I get an error saying ...

Image SRC From PHP Script on IIS - Not Displaying Consistently

Last week I converted my page img src values from pointing at image files to using a PHP script to serve up the images. The primary reason was to accommodate both files and database BLOBs as the actual source. Now when a user goes to a page, sometimes images show and sometimes not. If not, and the page is refreshed\reloaded, then the im...

iframe location in javascript

In this example, alert is blank; I want to read the location of iFrame, I am using object.src for this but it work only if I set its src attribute. But I set iFrame's location using window.open method and in this case it is not working. What I do ? <body> <iframe id="location" name="address" style="width:700px; height:700px;"> </i...

HTML/Javascript use src string in onclick without retyping?

I want to use the same string in my img "src" in my "onclick" as a parameter to a function. What's the easiest way to do this? It works fine if I type it out both times but it doesn't look nice. Here is an example so you can see what I mean... <img src="/images/image1.jpg" onclick="doStuff('/images/image1.jpg')"/> I'm wondering if th...

Create an interval to change image in jQuery?

Hello I have a working script like this: jQuery(document).ready(function(){ $('.video-thumb img').bind('mouseover',function(){ var new = $(this).attr('src').replace(/default.jpg/,'1.jpg'); $(this).attr('src',new); }).bind('mouseout',function(){ var default = $(this).attr('src').replace(/[0-9].jpg/,'defa...

Obfuscate Img Src in HTML

I need a way my image sources to be hard to read. Currently I have <img id="testImg" src="http://images.mydomain.com/sample.png /> and I need it converted to something like: <img id="testImg" src="javascript:xorDecode('3233435jh45h3232kl232kl2323', '32434mfr')"/> Is this possible? P.S. And I want to to so for around 200 KB variou...

img, empty src make influance on php working in IE?

i hate situations, when i can't explain the behavior of compiler. So help me please to understand, how it possible... i have two php files - index.php, and admin.php. in index.php i make registration, and captcha checking, and if they are correct, i set the value of session variable to somevalue,(at first it has anothervalue) and redire...

Redirect PHP page to IMG

I have a blog background website. We provide some HTML code that the user can insert into his page, and it has something like this: <img src="http://site.com/img.jpg" /> Unfortunately, I have had to relocate the images from time to time. Each time I have to relocate the image, the image no longer works for the people who have put the...

How to Find Img Tags Having src null. and deleting it

I need to delete or hide the Img tag or its parent when Img have src="". I have a script but it is not working.. window.onload=function(){ var imgs = document.getElementsByTagName("img"); for(var i = 0; i < imgs.length; i++) { var img = imgs[i]; if(img.src==""){ img.parentNode.removeChild(img); ...

Why getting image via PHP does not work ?

I'm working with WampServer Version 2.0 on Windows XP and FireFox 3.6.8. I'm trying to get image content via PHP script like this: HTML: <img src='temp_get_file.php' alt='picture not found' /> PHP: (temp_get_file.php) <?php header('Content-Type: image/png'); $img = imagecreatefromjpeg("1.png"); imagejpeg($img); imagedestroy($img); ...