How can I change the src attribute of an img tag using javascript?  <img src="../template/edit.png" name=edit-save/>   at first I have a default src which is "../template/edit.png" and I wanted to change it with "../templa...
I am trying to change an <iframe src=... > when someone clicks a radio button. For some reason my code is not working correctly and I am having trouble figuring out why. Here is what I have:    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML...
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 possible workarounds?...
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"...
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...
I'm trying to do something like a C #include "filename.c", or PHP include(dirname(__FILE__)."filename.php") but in javascript. I know I can do this if I can get the URL a js file was loaded from (e.g. the URL given in the src at...
At the moment I am coding in sharepoint(office 360), and I am having so many issues with the site considering that its my first week to use it. First of all when i tried to use a < script > tag in my codes, sharepoint seems to block this, and d...
I read this nice article on how external scripts block the UI thread but it wasn't clear to me whether the blocking is actually due to the presence of the <script> tag or the src='/myscript.js' src attribute.  My question is does in...
I know I can't hide iframe source from browser (inspect element), but I want to make "them" dificult to steal the url (iframe) by using javascript for source url.  If I have:  <iframe width="420" height="315" src="/...
I'm self teaching myself CSS HTML and now Javascript.   The idea behind this small project of mine is to have an user enter an URL for an img, when the user hits a button the img should then be inserted into a new <div> within the page.  I...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.