Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within HTML Pages with CSS and JavaScript
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Paul Clapham
Ron McLeod
Jeanne Boyarsky
Tim Cooke
Sheriffs:
Liutauras Vilda
paul wheaton
Henry Wong
Saloon Keepers:
Tim Moores
Tim Holloway
Stephan van Hulst
Carey Brown
Frits Walraven
Bartenders:
Piet Souris
Himai Minh
Forum:
HTML Pages with CSS and JavaScript
change src of iframe
Rekha Pande
Ranch Hand
Posts: 145
posted 16 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
I'm trying to load a page into the iframe after clicking on the check box but it's giving me the error,
document.sample.fram is null or not an object....??
Why is that happening??
My code is below
---------------------
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <title>New Page 2</title> </head> <body> <form name = "sample" method="POST" action="--WEBBOT-SELF--"> <p> <input type="checkbox" name="C1" value="ON" onclicking = "document.sample.fram.src='file.htm'"> <input type="text" name="T1" size="20"></p> <p><iframe name="fram"> Your browser does not support inline frames or is currently configured not to display inline frames. </iframe></p> <p> </p> <p> </p> <p> </p> <p> </p> <p><input type="submit" value="Submit" name="B1"><input type="reset" value="Reset" name="B2"></p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> </form> <p> </p> </body> </html>
Please help!!!
Thanxs.
Rekha Pande
Ranch Hand
Posts: 145
posted 16 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
I have changed the onclick to onclicking coz it was giving me problem is posting the message. Please ignore the 'onclicking'
Eric Pascarello
author
Posts: 15385
6
posted 16 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
with name
<iframe name="if1"></iframe>
parent.if1.window.location.href;
with id
<iframe id="if1"></iframe>
document.getElementById("if1").window.location.href;
Eric
I'm thinking about a new battle cry. Maybe "Not in the face! Not in the face!" Any thoughts tiny ad?
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
Spring Login problem "Request processing failed; nested exception is java.lang.NullPointerException"
servlet problem
Need Help With Dynamic text box in JSP
Problem Resetting Fields
Creating-deleting rows in HTML(URGENT)
More...