*
The moose likes HTML, CSS and JavaScript and the fly likes Java Script or what Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Java Script or what " Watch "Java Script or what " New topic
Author

Java Script or what

ishaq aziz
Greenhorn

Joined: Dec 18, 2008
Posts: 2
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

Joined: Nov 12, 2008
Posts: 757
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

Joined: Nov 08, 2001
Posts: 15376
    
    6
Give your iframe a name and on the links add target="youriframename"

Eric
ishaq aziz
Greenhorn

Joined: Dec 18, 2008
Posts: 2
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

Joined: Nov 08, 2001
Posts: 15376
    
    6
And how are you referencing the iframe with the id?

Eric
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Java Script or what