FacebookTwitter
Hatrack River Forum   
my profile login | search | faq | forum home

  next oldest topic   next newest topic
» Hatrack River Forum » Active Forums » Books, Films, Food and Culture » HTML JavaScript Mayfly

   
Author Topic: HTML JavaScript Mayfly
Blayne Bradley
unregistered


 - posted            Edit/Delete Post 
What I want to do is when someone Clicks on an item in a Dropdown list box, it refreshes an iframe to open a link at a different page then before.


So basically click on Drop down box, scroll down items, click, and then the open box frame place refreshed with information from a different htm.

as the tag for an iframe is bracket iframe url="something" endbracket im not sure how to get it to change it, maybe set it to a variable?

I'ld prefer a simpler way.

IP: Logged | Report this post to a Moderator
scifibum
Member
Member # 7625

 - posted      Profile for scifibum   Email scifibum         Edit/Delete Post 
Blayne, meet http://www.w3schools.com/

Or: take your pick

Posts: 4287 | Registered: Mar 2005  |  IP: Logged | Report this post to a Moderator
Blayne Bradley
unregistered


 - posted            Edit/Delete Post 
I'm bad with google, how am I supposed to know Dynamic is the proper search term in theory?

My thought process goes like this "This is what I want to do, but I have no idea of how to express it in such a way google cans earch for it"

IP: Logged | Report this post to a Moderator
scifibum
Member
Member # 7625

 - posted      Profile for scifibum   Email scifibum         Edit/Delete Post 
Dynamic was just my first guess. You could also find it using terms like:

onchange iframe load
iframe source based on selection
menu for iframe

(I'm now 4 for 4 on choosing search terms that return relevant content. Not to brag. Oh, I guess that IS to brag.)

But the question you're asking is about a very straightforward and common element of page design, which is why I included a link to w3schools. If you read their tutorials on Javascript and the DOM, and use their decent reference pages for the DOM (or the actual W3 standards documentation), then you'll be in a place where answering this kind of question is pretty trivial - it's just like looking up the definition of a word.

Nothing wrong with asking here, but it really will be faster for you in the future if you learn to use that kind of resource.

Case in point: on W3Schools, I clicked on DOM, then on DOM Iframe, found the src property, and then clicked on it: and it explains exactly how to set the property with javascript.

http://www.w3schools.com/htmldom/prop_iframe_src.asp

[ April 02, 2009, 01:47 PM: Message edited by: scifibum ]

Posts: 4287 | Registered: Mar 2005  |  IP: Logged | Report this post to a Moderator
El JT de Spang
Member
Member # 7742

 - posted      Profile for El JT de Spang   Email El JT de Spang         Edit/Delete Post 
It'll be even faster if our local coders can resist showing off and just link Blayne to the google results.

The reason he comes here is pure laziness, and because it works. We can't do a thing about the former, but we can certainly affect the latter.

Posts: 5462 | Registered: Apr 2005  |  IP: Logged | Report this post to a Moderator
scifibum
Member
Member # 7625

 - posted      Profile for scifibum   Email scifibum         Edit/Delete Post 
There's nothing wrong with laziness, IMO, when it comes to "what's that syntax?", but it strikes me as inefficient to come here.
Posts: 4287 | Registered: Mar 2005  |  IP: Logged | Report this post to a Moderator
Lisa
Member
Member # 8384

 - posted      Profile for Lisa   Email Lisa         Edit/Delete Post 
Blayne, as much as I hate doing this, I have a page up that does exactly what you're asking. Have a look at the source, if you like.

http://www.starways.net/comics.html

This is what I use to read my webcomics every morning.

Posts: 12266 | Registered: Jul 2005  |  IP: Logged | Report this post to a Moderator
Blayne Bradley
unregistered


 - posted            Edit/Delete Post 
Now now, outside of politics we have *very* much in common.

The Foe Yay subtext is kinda creepy.

IP: Logged | Report this post to a Moderator
Blayne Bradley
unregistered


 - posted            Edit/Delete Post 
Hmm, the iframe could be bigger, but damn, nice.

Also your missing The Order of the Stick, 8-Bit Theater, Chris&Trilby and Drow Tales.

IP: Logged | Report this post to a Moderator
Blayne Bradley
unregistered


 - posted            Edit/Delete Post 
Grr curses, my STAGE supervisor keeps asking for more and more complicated additions to the site, damnit man, why can't people be happy with whats simple!!!??
IP: Logged | Report this post to a Moderator
Lisa
Member
Member # 8384

 - posted      Profile for Lisa   Email Lisa         Edit/Delete Post 
quote:
Originally posted by Blayne Bradley:
Hmm, the iframe could be bigger, but damn, nice.

Also your missing The Order of the Stick, 8-Bit Theater, Chris&Trilby and Drow Tales.

How could the iframe be bigger? Other than the strip across the top, it's as big as it gets. And it resizes with the browser.

Do you have URLs for those webcomics? I'll take a look at them and maybe add them.

Posts: 12266 | Registered: Jul 2005  |  IP: Logged | Report this post to a Moderator
Strider
Member
Member # 1807

 - posted      Profile for Strider   Email Strider         Edit/Delete Post 
Lisa, check out your page in firefox.
Posts: 8741 | Registered: Apr 2001  |  IP: Logged | Report this post to a Moderator
scifibum
Member
Member # 7625

 - posted      Profile for scifibum   Email scifibum         Edit/Delete Post 
The dynamic properties you use to set the frame width and height only work in IE (but not in IE8).
Posts: 4287 | Registered: Mar 2005  |  IP: Logged | Report this post to a Moderator
Lisa
Member
Member # 8384

 - posted      Profile for Lisa   Email Lisa         Edit/Delete Post 
Huh. You know, I rarely bother with crossbrowser stuff. All the stuff I do at work is IE only (and I have to warn my boss now not to let any of our customers move to IE8). And that's what I use at home.

Sorry, Blayne. It didn't even occur to me to check in other browers.

Posts: 12266 | Registered: Jul 2005  |  IP: Logged | Report this post to a Moderator
Blayne Bradley
unregistered


 - posted            Edit/Delete Post 
You might want to put in the code to make it cross platform capable, i havent tried it myself but allegedly its not hard.
IP: Logged | Report this post to a Moderator
scifibum
Member
Member # 7625

 - posted      Profile for scifibum   Email scifibum         Edit/Delete Post 
I was imprecise - IE8 still supports it in IE7 or IE5 mode, whatever that means. (haven't tried ie8 yet myself)
Posts: 4287 | Registered: Mar 2005  |  IP: Logged | Report this post to a Moderator
El JT de Spang
Member
Member # 7742

 - posted      Profile for El JT de Spang   Email El JT de Spang         Edit/Delete Post 
quote:
Originally posted by Lisa:
It didn't even occur to me to check in other browsers.

I was going to be :shocked: by this, but then I realized that I've never coded anything meant to be used by only me.

If I did, optimizing only for the browser I used would be the smartest and most efficient way to go. Carry on.

Posts: 5462 | Registered: Apr 2005  |  IP: Logged | Report this post to a Moderator
   

   Close Topic   Feature Topic   Move Topic   Delete Topic next oldest topic   next newest topic
 - Printer-friendly view of this topic
Hop To:


Contact Us | Hatrack River Home Page

Copyright © 2008 Hatrack River Enterprises Inc. All rights reserved.
Reproduction in whole or in part without permission is prohibited.


Powered by Infopop Corporation
UBB.classic™ 6.7.2