Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Window.ShowDialog with tree menu

Posted on 2004-10-25
9
Medium Priority
?
802 Views
Last Modified: 2008-01-09
Have anyone done a Dialog popup with a tree menu like this one?
http://www34.brinkster.com/lilpuffball/ee/test8.htm

The tree menu works fine with a regular popup but when the popup is dialog type then it doesn't work.
0
Comment
Question by:awu25
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
  • +2
9 Comments
 
LVL 8

Expert Comment

by:sigmacon
ID: 12398149
I have done something similar in a 'simulated' popup - using a div.

If with popup dialog type you mean alert(), confirm() or prompt(), then this tree is not going work there.
0
 
LVL 1

Expert Comment

by:krishnaashu
ID: 12398580
ur question is not clear? do you want to send a alert / popup message onclick on menu option??? if yes pl send me ur javascript i will send it to you after changing it otherwise send me menu option

regds

ashu krisna
0
 
LVL 15

Expert Comment

by:justinbillig
ID: 12399318
i think he wants to open a modal dialog ( window.showModalDialog( ) ) and open the tree view
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 

Author Comment

by:awu25
ID: 12400092
The popup tree menu dialog contains checkboxes and after user select the checkboxes the popup should send the checked values back to the original parent page.
0
 
LVL 8

Expert Comment

by:sigmacon
ID: 12400856
please post code, so we can give it a shot.
0
 
LVL 2

Accepted Solution

by:
jlisenberg earned 2000 total points
ID: 12404533
You can't communicate between windows when one of them is a Dialog. I'm sorry, but you will need to make that window a regular one, with window.open. I assume you need a Dialog because of their hability of being over any other nagivator window, am I right? Well, that's exactly why you can't communicate between windows, because when the Dialog is open, the other windows are blocked.
0
 

Author Comment

by:awu25
ID: 12407041
jlisenberg, or anyone else, if I can't use dialog do you have any suggestion for me?

sigmacon, I downloaded a treeview javascript from here http://www.treeview.net/treemenu/3fr_checkbox.html and here is my code.
Page 1(Parent page):
<form name="test" method="post" action="">
<a href=javascript:window.showModalDialog("test.asp")>List check boxes</a>
</form>

Page2(Dialog page):
<html>

<head>

<style>
   BODY {background-color: white}
   TD {font-size: 10pt;
       font-family: verdana,helvetica;
         text-decoration: none;
         white-space:nowrap;}
   A  {text-decoration: none;
       color: black}
</style>
<script src="ua.js"></script>
<script src="ftiens4.js"></script>
<script src="demoCheckboxNodes.js"></script>

<script>
// This function depends on the actual prependHTML strings used in the
// configuration file (dmeoChackboxNodes.js). If you change that, you will
// have to change this
function generateQueryString() {
      var retStr
      //getElById is defined in ftiens4.js and help with cross-browser compatibility
      retStr = "BOX1=" + getElById('BOX1').checked
      retStr = retStr + "&BOX2=" + getElById('BOX2').checked
      retStr = retStr + "&BOX3=" + getElById('BOX3').checked
      retStr = retStr + "&RD1=" + getElById('RD1').checked
      retStr = retStr + "&RD2=" + getElById('RD2').checked
      retStr = retStr + "&RD3=" + getElById('RD3').checked

      return retStr;
}
// If you are not using a frameset layout, this function will have to
// change from reloading the right frame to reloading the self window
function submitTreeForm() {
      alert(getElById('BOX1').value);
      //window.open("demoCheckboxRightFrame.html?" + generateQueryString(), "basefrm")
}

</script>
<title>Checkbox Tree JavasScript</title>
</head>
<body topmargin=16 marginheight=16>

<!-- Corporate users or any others that want to remove the next link should check
       the online FAQ for instructions on how to obtain a version without the link -->
<!-- Removing this link will make the script stop from working -->
<div style="position:absolute; top:0; left:0; ">
<table border=0>
<tr>
      <td>
      <font size=-2><a style="font-size:7pt;text-decoration:none;color:silver" href="http://www.treemenu.net/" target=_blank>Javascript Tree Menu</a></font>
      </td>
</tr>
</table>
</div>
<form name=ft method="post">
<input type="hidden" name="tVal">
<script>initializeDocument()</script>
<noscript>
A tree for site navigation will open here if you enable JavaScript in your browser.
</noscript>
<CENTER><input type=button onClick="submitTreeForm()" value="Get Values"></CENTER>
</form>
</body>
0
 
LVL 2

Expert Comment

by:jlisenberg
ID: 12407160
Why can't you do the same but with a normal pop-up, like window.open('test.asp'):

<form name="test" method="post" action="">
<a href=javascript:window.open("test.asp", "Test", "width=500, height=500, top=50,left=50")>List check boxes</a>
</form>

If you also need the parent page get blocked while the tree-window is open, you must work with events
0
 
LVL 8

Expert Comment

by:sigmacon
ID: 12415860
I want to concur with everybody who recommended NOT using showModalDialog and give one more reason for it:

windows.showModalDialog is ONLY implemented by IE 5.5. and 6

ASFAIK
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In my daily work (mainly using ASP.net), I need to write a lot of JavaScript code. One of the most repetitive tasks I do are the jQuery Ajax calls. You know: (CODE) I don't know if for you it's the same, but for me is soooo tedious to write the …
In this blog, we’ll look at how improvements to Percona XtraDB Cluster improved IST performance.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

610 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