Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Facebook Sign In with Google Sign In with OpenID

Categories

We have migrated to a new platform! Please note that you will need to reset your password to log in (your credentials are still in-tact though). Please contact lee@programmersheaven.com if you have questions.
Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

programmaticaly activate link

JustTJustT Posts: 6Member
Hi,
I just wondered if there's any way to programmaticaly activate a link.
What I want to do is after pressing a button, change the content of one of the frames on my HTML page.
Then when that frame is loaded with the new HTML context, I want to automatically have another frame change it context...
Any idea how I could do this?

Comments

  • zibadianzibadian Posts: 6,349Member
    : Hi,
    : I just wondered if there's any way to programmaticaly activate a link.
    : What I want to do is after pressing a button, change the content of one of the frames on my HTML page.
    : Then when that frame is loaded with the new HTML context, I want to automatically have another frame change it context...
    : Any idea how I could do this?
    :
    You can use the onLoad() of the first frame for that. In the newly loaded fram place a function in its onLoad(), which updates the frame with the button.
  • JustTJustT Posts: 6Member
    : : Hi,
    : : I just wondered if there's any way to programmaticaly activate a link.
    : : What I want to do is after pressing a button, change the content of one of the frames on my HTML page.
    : : Then when that frame is loaded with the new HTML context, I want to automatically have another frame change it context...
    : : Any idea how I could do this?
    : :
    : You can use the onLoad() of the first frame for that. In the newly loaded fram place a function in its onLoad(), which updates the frame with the button.
    :

    Could you please give a bit more details about the last part. I understand the onLoad() functionality, but I still don't know what the syntax is to change the content of a frame.
    Normally you have a hyperlink and there you define a target and href, but I don't know how to do this programmatically

  • zibadianzibadian Posts: 6,349Member
    : : : Hi,
    : : : I just wondered if there's any way to programmaticaly activate a link.
    : : : What I want to do is after pressing a button, change the content of one of the frames on my HTML page.
    : : : Then when that frame is loaded with the new HTML context, I want to automatically have another frame change it context...
    : : : Any idea how I could do this?
    : : :
    : : You can use the onLoad() of the first frame for that. In the newly loaded fram place a function in its onLoad(), which updates the frame with the button.
    : :
    :
    : Could you please give a bit more details about the last part. I understand the onLoad() functionality, but I still don't know what the syntax is to change the content of a frame.
    : Normally you have a hyperlink and there you define a target and href, but I don't know how to do this programmatically
    :
    :
    Here is a page from a great javascript tutorial, which explains the code you need: http://www.pageresource.com/jscript/jframe2.htm. It also includes a working example.
  • JustTJustT Posts: 6Member
    Yep, I got it and it works well.
    Thank you
Sign In or Register to comment.