Vbscript event handling with frames & document.write

Posted on 2006-04-19
Last Modified: 2010-08-05
I have a HTLM page using frames.     In one frame, I have some VBSCRIPT that has a form, and in response to user input on the form, triggers an event handler script.      The event handler uses document.write    to write a new page.       Everything works perfectly (so far).       [The pages I am referring to are not ASP, just HTML]

The issue is that I would like to have the form in frames(1), and have a new page produced in response to the form (as currently), BUT I would like the resulting page that gets written to be displayed in frames(2).

I have tried lots of variations on the syntax (such as parent.frames(2).write ... )   but I haven't been able to make this work.       Another technique I tried was to write the event handler onto a page in frames(2), hoping it would detect the event produced in frames(1).

I can't believe it isn't possible to do this, but I can't seem to figure out a way.      Can someone please advise me?   thanks!

          Peter vB
Question by:PvBredow
    1 Comment
    LVL 9

    Accepted Solution

    To write in your frame 2, use: parent.frames["frame2"].document.write("Hello World"), where "frame2" is the name of your frame.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Course: Create Mobile App Prototypes with Adobe XD

    This is a project-based course: we go through all the steps of creating a prototype from start to finish, using all the tools and features currently available in Adobe XD. You can complete the course in less than a day, plus all project files and fonts are included.

    Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
    Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
    In this tutorial viewers will learn how add a full-size background image to a webpage using CSS3. Create a new HTML document with an internal stylesheet.: In CSS, define the html element to have a background image. Use a high resolution image.: In t…
    In this tutorial viewers will learn how to embed Flash content in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <object> tag to embed Flash content.: To specify that the object is Flash content, d…

    760 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    9 Experts available now in Live!

    Get 1:1 Help Now