Skip to Content
author's profile photo Former Member
Former Member

Navigation - form - target stuff.

Hi,

I have a BSP-site which includes frames.

frame1 and frame2

I need the "GetVendor" stuff to go to frame2. and the other to frame1

I tried some stuff with Javascript. No success.

I need to use 1 form tagg.

Any ideas ?

<form name="mainform" method="POST">

<input type="submit" name="onInputProcessing(GetVendor)" value="Submit">

<input type="submit" name="onInputProcessing(Submit)" value="Submit">

</form>

Event Handler:

if event_id eq 'Submit'.

navigation->goto_page('k1.htm').

else

navigation->goto_page('k2.htm').

endif.

//Martin

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Posted on Feb 16, 2005 at 02:47 PM

    Hi Martin,

    you can realize that by either using the Model-View-Controller concept (MVC) or by creating 3 pages.

    The first page embeddes the frames while the other two pages are for the two frames. You can have a form tag in each page.

    Regards,

    Rainer

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Feb 16, 2005 at 02:47 PM

    As far as I understood, you want to have two submit buttons which will submit the same form to the different frames?

    Sounds a little strange 😊

    Anyway the BSP event handler cannot help here. It is called when the form is already posted.

    To post the form into another frame you have to set the 'target' attribute for the form. This can be done dynamically with javascript.

    Additionally the 'action' attribute also must be changed to point to second page.

    Example:

    <form <i>id="form1"</i> name="mainform" method="POST">

    onclick="form1.target='frame2'; form1.action='k2.htm'" type="submit" name="onInputProcessing(GetVendor)" value="Submit">

    <input type="submit" name="onInputProcessing(Submit)" value="Submit">

    </form>

    Add a comment
    10|10000 characters needed characters exceeded

    • I am going to make a guess and here is what i think is the issue.

      He has got a main page(1.htm) and within that got two frames holding two different pages (2.htm(frame a) and 3.htm(frame b)).

      If action eq 'X' from page 1.htm he wants to load 2.htm (in frame a) and else load 3.htm (in frame b).

      This can be handled this way.

      oninput processing of page 1.htm set a varialbe to some value (for e.g X or Y).

      And in the layout of 1.htm i have a code something like this

      <% if variable = 'X' . %>

      <script>

      window.open('2.htm' , target="a");

      </script>

      <% elseif variable = 'Y' . %>

      <script>

      window.open('3.htm' , target="b");

      </script>

      <% endif . %>

      Regards

      Raja

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.