Changing Iframes With Javascript
Jul 4, 2006
I have bigpage.html that has the text "click" in it. Also, it contains the iframe small.html.
In small.html there is the text "visible"
How do you get it so that when you click on "click", "visible" changes from black(default) to red?
View 1 Replies
ADVERTISEMENT
Apr 18, 2010
My javascript function for changing src of iframe does work in Opera, but it doesnt work in firefox or IE. I tried several ways, and now i have no other way, just ask.
function showMap(srcs, ine, ind, link){
if(document.getElementById(ind).style.display == 'table-row'){
document.getElementById(ind).style.visibility = 'hidden';
[code].....
View 4 Replies
View Related
Jul 20, 2005
I want to load a javascript file on a root page with various iframes,
then call the javascript functions from the root page to be displayed
in the iframes. Any idea how to do this?
View 2 Replies
View Related
Jun 20, 2006
I have a webpage with some divs and iframes in them, I have some Javascript code in another page in one of the iframes that when activated, will change the page within the other iframe. The code I have throws the following error:
'null' is null or not an object
and it is complaning abou the following bit of code:
var obj = document.getElementById("frame2");
obj.src = new_src;
But I am not sure if the code is the correct code anyway. Can anyone assist please?
Please find below my complete code, hopefully you can spot what's going on. Here is my 'index.htm' file: Code:
View 2 Replies
View Related
Mar 12, 2002
I'm starting to use some iframes in a div layer. I want to know if i can use javascript to change the size of the iframe (from the parent page containing the iframe).
In IE i can use 100% width and height to fit the iframe to the layer, but in Netscape 6 the iframe doesn't appear if the height is set in % values - hence the need to be able to specify it dynamically as the layer wil change size.
View 1 Replies
View Related
Oct 24, 2010
is there a way to create iframes using cookies and javascript? What i need to do is to have a way to create a cookie on page one, and use the info on page two to create the iframe.Users will see a list of "external links", once they click on a link, they will be redirected to a page that will generate a iframe of the chosen link.My guess is that if there is a way, it must need to use cookies to store the info (url) to get used by the script that will create the iframe on the page that will be used to show all iframes.
View 1 Replies
View Related
Nov 25, 2009
First the code:
Code:
Looking at the code, you might assume (as I did) that clicking the button on page1.htm would load page2.htm. However for some reason, when calling a parent function, the function runs with the calling file's path rather than the path of the parent.
So it is actually trying to load /files/files/page2.htm! How do I force all calls to parent.function() to run with parent.hta's path as the root?
Realize that this is a simplistic example and simple solutions such as putting all the files in the same path, or dropping the "/files" in the loadPage2() function are not valid solutions.
Essentially I need to call parent.loadPage2() and have it run the function with the root path = parent.hta's path.
View 3 Replies
View Related
Jul 19, 2010
I'm new to this forum and am trying to find answers to a few issues I've been having. I'm building a website for my music (I'm a novice with web design so bear with me) and I'm having trouble with this page - [URL]...
As you can see, when you click on the "Filter By" buttons, the relevant gallery opens in the iFrame and the Titles (such as Latest Photos and Live Photos) are altered onclick by using the changeText function. The problem with this is that when I use the browser "Back" button, the iFrame goes back, but the "changeText" doesn't go with it.
So I've been trying to find solutions to this. Someone on another forum suggested hiding the album titles in a hidden element on each gallery page, and the title in when you click on the Filter By buttons. They suggested first putting some code such as: <input type="hidden" name="AlbumTitle" value="Live Photos">
[Code]...
View 9 Replies
View Related
Aug 24, 2006
Basically, I'm trying to make a "chat-like" updater with javascript.
html.html includes the following:
<html>
<head>
<script>
var t;
function getData () {
document.getElementById("dataStore").href = "test2.html";
}
function update (message) {
getData ();
document.getElementById("txt").innerHTML= message;
t = setTimeout ("update ()",1000);
}
</script>
</head>
<body onload="getData()">
<div id="txt">hello</div>
<script id="dataStore" type="text/javascript"></script>
</body>
</html>
The file that it should get variables from is from test2.html, which is below:
var updateData = "hello!dasd";
update (updateData);
For this example, basically - I want javascript to change the "hello" in test.html to "hello!dasd" found in a variable in test2.html. This should keep asking for new updates from test2.html (which will be dynamic with php).
View 1 Replies
View Related
Mar 29, 2006
This should be simple, but can I change parameters like the url coming
in:
www.testpage.com?test1=a
<script>
document.setParam("test1", "b");
</script>
something like that? I want the parameter to change based on the code..
View 6 Replies
View Related
Feb 17, 2005
I am looking at ways of altering the appearance of web pages by calling alternate external stylesheets. This has obvious use in catering for accessibility issues.
There are existing sites that offer the facility to change font size, font colour, background colour, but these use server-side code. I would like to do this using client-side code, because I want to intergrate this with an HTML-based virtual learning environment (VLE) that is unlikely to accept server-side code.
I can obviously call a second stylesheet, which overrides that called in the <head> part of the HTML code. However, I cannot do this by user control using an <a href "javascript" ... call.
What is going wrong? As I have indicated in the comments in the file, the 'document.write' statement works in its own right to call a new CSS file. The function also works in its own right. However, the href doesn't do what I expected.
However, that is just the start. If I can get this to work, I would like a way of passing the 'new' stylesheet to other pages, so that the user selects their options once and then sees the same appearance in all pages in the VLE.
View 3 Replies
View Related
Mar 23, 2006
I have a small problem this my javascript. I want it to change the url/src of an iframe I have on the screen, but I can't find anything that works.
var newiframepath = "http://newURL.htm";
frames['iframeName'].location.replace(newiframepath);
I also have this (again doesn't work):
var newiframepath = "http://newURL.htm";
iframeName.location.replace = (newiframepath);
Can anyone help?
View 1 Replies
View Related
Jul 29, 2006
I have a border around some images. Basically what I need it to do is change colors when you click on one, and deselect the old one.
View 4 Replies
View Related
Jul 23, 2005
Is there a way to change the displayed text on a web page using some
combination of Javascript and DHTML? NOT in a text box. As far as I
know (with my limited knowledge) the only way you can do this is with
a textbox or images, which is not what I'd like to do. There's gotta
be a way to do this, right?
View 3 Replies
View Related
Jul 20, 2005
I would like to be able to write some code in Javascript preferably
(PHP is also all right) which allows the admin of a website to be able
to change stylesheet attributes from a GUI browser interface without
having them to change the text file themselves. (i.e., working on the
supposition that the admin is IT illiterate). Simple things like
table heading colours, backgrounds, font sizes need to be changed this
way.
The browser should then read from the changed textfile the next time
the site is refreshed and it should therefore be permanent. Is this
at all possible? If so, how do I update the textfile?
View 6 Replies
View Related
Apr 22, 2006
This may seem like a very strange question but is there a way to change to a random song in itunes using javascript?
View 4 Replies
View Related
Sep 27, 2006
I have the following code:
<script language="JavaScript">
function func1() {
alert("func1 invoked");
}
function func2() {
alert("func2 invoked");
}
function changeFunction() {
var img = document.getElementById('img');
if (window.addEventListener) { // Mozilla, Netscape, Firefox
img.addEventListener('click', func2, false);
}
else {// IE
img.attachEvent('onClick', func2);
}
}
</script>
<img id="img" src="test.jpg" width="10" height="10" onClick="func1();"></img>
when the image is clicked with the mouse, function func1 is invoked as expected. When I call function changeFunction, I want to change the code that is invoked when the image is clicked from func1 to func2. Instead, both are invoked because addEventListener and attachEvent add an additional handler instead of setting one.
I am looking for a way to change the handler from one function to another. Can anyone think of a solution probably using removeEventListener?
View 2 Replies
View Related
Jan 31, 2007
I want to change from:
a:hover { text-decoration:none; color:black; }
to
a:hover { text-decoration:underline; color:blue; }
using javascript ....
View 2 Replies
View Related
May 22, 2002
how would i go about changing the background of a row in a table that has colums when a check box is clicked...i can change the colour of a single column but how can i change all the columns in a row? ive heard about this "get prarentnode" thing but i dont know how to use it.
View 7 Replies
View Related
Jul 20, 2005
I have a question if it is possible to manipulate the settings of
character encoding in Ms Internet Explorer 5.0, 5.5 and 6.0. The
problem is that the default instalation of Ms IE seems to have hard
selected default encoding to "Western European (ISO)", which means
iso-8859-1. When browsing pages with some Central/Eastern European
characters these are converted to iso-8859-1 so displayed wrong.
I would suppose the "auto-select" option should be default, so the
browser can select the right encoding according to the meta-tags in
the head of webpage. But this is apparently not true.
Please, is it possible to use JavaScript or Java applet to get the
information about the current client character encoding settings
and/or change it to the "auto-select" value ? How to do this ?
View 10 Replies
View Related
Oct 17, 2007
I have two text boxes one with months in "January, Febuary..." but as not every month has the same ammount of days i need the second select box to change to instead of having options 1-30 it has 1-28 or what ever depending on what month is selected.
View 1 Replies
View Related
Jul 23, 2005
does anyone know of any script which can edit the group attributes in
active directory.
for use this script to set the group setting such that this group only
has access to a specific folder.
View 1 Replies
View Related
Sep 25, 2004
For a application I am writting I need to make some table columns apear and disapear by clicking on a link. I do this by changing the "style" property in the <td> tag.
The HTML is generated by ASP.NET, which automaticly sets the style property of the <td> tag to the right value. and makes links to the right Javascript function call to change a specific property.
This is the HTML output of 2 table columns: Code:
View 1 Replies
View Related
Sep 12, 2005
I believe that different browsers treat frames/iframes differently, and this
is one of the reasons to avoid using them in websites/applications.
Are there any other reasons to avoid them?
In my experience I find them clunky and messy to implement using javascript
and prefer to keep the whole web page as a single page.
View 1 Replies
View Related
Aug 29, 2006
Code:
Currently, I have one of the iframes working. When you click on it text
below appears with information about the jewelry.
I would like an iframe to open up (immediately to the left of the
image) and show an enlarged image of the thumbnail (yes I know right
now the images are not thumbnails, but my friends are working on the
graphics).
View 1 Replies
View Related
Aug 8, 2007
I have a mainpage and it contains iframe (myFrame). A js function validatedata() is on iframe. before submitting mainform in mainpage i am calling validatedata() function as below. mybool = document.myFrame.validatedata();
This works in IE 6.0 but fails on mozilla firefox.
View 2 Replies
View Related