posted
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?
posted
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 |
posted
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.
posted
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 |
posted
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 |
posted
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 |
Blayne Bradley
unregistered
posted
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 |
posted
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 |
posted
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 |
Blayne Bradley
unregistered
posted
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 |
posted
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 |
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 |