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...
As this answer suggested, I want to modify a little bit office.js.  So I copied the content of https://appsforoffice.microsoft.com/lib/1/hosted/office.js to local, such that https://localhost:3000/static/office.js shows well the content.  Then, I mak...
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="/...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.