Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Java Script or what

 
ishaq aziz
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have "IFrame" in my HTML page now i want to pass diffirent values to "src" from diffirent buttons or Hyperlink?

can i do this???


<iframe id=src="about:blank" frameborder=0 width="100%">

</iframe>



the BOLD section is the part i want to pass value to this through .JS


functions will be as following

1) click on first link open a URL in Iframe
2) click on second link open a other URL in same Iframe.
3) click on third link open another URL in same Iframe.
4) so on.......

please find me solution in this regard.

thanks and best regards
[ December 18, 2008: Message edited by: ishaq aziz ]
 
Treimin Clark
Ranch Hand
Posts: 757
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ishaq,

Welcome to JavaRanch.

You should use JavaScript for this.

This forum is intended for questions and comments about this web site, http://www.javaranch.com.

It is not for questions about the Java language - that's what all our other forums are for.

This will be moved to the appropriate forum shortly.
[ December 18, 2008: Message edited by: Treimin Clark ]
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Give your iframe a name and on the links add target="youriframename"

Eric
 
ishaq aziz
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i assigned "ihif1" to this frame the name but still it won't work?

now what do i have to do with this following line???


<iframe id=ihif1 src="about:blank" frameborder=0 width="100%">
</iframe>

what should be the script for this Iframe having name "ihif1"

the BOLD section is the part i want to pass value to this through .JS


functions will be as following

1) click on first link open a URL in Iframe
2) click on second link open a other URL in same Iframe.
3) click on third link open another URL in same Iframe.
4) so on.......

please find me solution in this regard.

thanks and best regards
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And how are you referencing the iframe with the id?

Eric
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic