Dany P. Wu wrote:
> Okay, last time I asked a question about HTML I just about got my head
> bitten off. Anyway, I'm game enough to try again in hope I'd get some
> useful comments.
>
> I've got a couple of pages which has a variable passed between them using
> Javascript.
>
> The opening page of the website has a bunch of links that look somewhat
> like:
>
> <a href="geninfo.html?sub_contact.html">
>
> The page geninfo.html contains an inline frame called "frame" and has a
> short script like this:
>
> <!--
> var temp=window.location.split("?");
> var content=temp[1]
> //-->
>
> I am assuming after I clicked the link from the opening page the variable
> "content" now contains "sub_contact.html". Am I correct?
>
> How can I use this variable in my iframe tag?
>
> I've tried this:
>
> <iframe name="frame" height="409" width="580" border="0" frameborder="0"
> src=content scrolling="auto">
>
> but that's obviously wrong since it didn't work.
>
> Can someone please tell me how I can achieve this? I have searched the web
> but none of them really show how I can achieve this. They have a lot of
> examples setting values of various controls on different frames of the
> same page, but not inline frames. This has really got me confused. Some
> assistance would be greatly appreciated.
Your 'src=content' isn't going to be interpreted as javascript, is it?
How is the HTML interpreter to know what it is?
I'm not sure of the exact answer but something like src=javascript
:content
or via a javascript function like src="javascript

penit('content')" is
going to have a better chance of working.