Win a copy of Escape Velocity: Better Metrics for Agile Teams this week in the Agile and Other Processes forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Paul Clapham
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Frank Carver
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • fred rosenberger

frames and forms

 
Ranch Hand
Posts: 4716
9
Scala Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a frameset with a top, left, and right frame. There is a form in the right frame. I want two buttons. "yes" button should display a html page in right frame. "no" button should change to a new frameset with only left and right frames(with different relative widths than this frameset), and different content. At first I thought I needed to call another servlet but I dont, so this is what I have so far.
<HR></BLOCKQUOTE>
I hope that displays properly.
Perhaps I dont need a form at all?
I would also like suggestions on implementing the quiz. I am thinking of using an applet(make the client do part of the work), but I could use JSP or SSI(or a servlet like I first concidered). I am also thinking about using JDBC and hold the questions in a database. But I think an applet holding all questions and answers is better.
PS: this chunk of code is the only thing holding me up from compiling and installing new servlets.
OK I think I figured it out:
<HR></BLOCKQUOTE>
but what about the action of the form? I dont need it. Is it optional?

[This message has been edited by Randall Twede (edited January 31, 2001).]
 
Randall Twede
Ranch Hand
Posts: 4716
9
Scala Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
OK I tried it. I am having problems with the javascript.
This line gives a script error: 'Frameset' undefined.
"<input type='button' value='Sure, why not!' onClick=\"Frameset.frames[1].location='http://javaguy.yi.org/examples/Quiz.html'\">" +

and on this line I need the parent of the parent.
"<p><input type='button' value='No, I have enough gold.' onClick=\"parent.location.replace('http://javaguy.yi.org/examples/MagicItems.html')\"></form>" +
here are my framesets:
<HR></BLOCKQUOTE>
Should I nest the framesets instead?
[This message has been edited by Randall Twede (edited January 31, 2001).]
 
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think that the frames array lives in the current window. You should be able to reference it directly like this:

[This message has been edited by Bodie Minster (edited January 31, 2001).]
 
Randall Twede
Ranch Hand
Posts: 4716
9
Scala Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks, I got it. I ended up nesting the framesets.
I hate javascript!
Sometimes it is whats needed though.
 
On top of spaghetti all covered in cheese, there was this tiny ad:
Garden Master Course kickstarter
https://coderanch.com/t/754577/Garden-Master-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic