Results 1 to 5 of 5

Thread: How to pass scalars and arrays to dialog boxes?

  1. #1
    Join Date
    Aug 2006
    Posts
    287

    How to pass scalars and arrays to dialog boxes?

    Hi friends,
    I have just learned to create the dialog boxes. In that I have created the modal dialog box. I somehow successfully managed to do that. The problem is that now I have been told to pass scalars and arrays, which I don't know much. So thought that you guys would help me..!! Please tell me how to pass scalars and arrays to dialog boxes.?? Hoping some help from you.!@
    Dimension 1100 (FMY032J) mini-tower
    2.53ghz Intel Pentium 4
    80 gig nfts HDD
    512 RAM
    Main circuit board: Dell 0CF458
    BIOS: Dell A00
    Display: Intel(R) 82865G Graphics Controller [Display adaptor]
    Multimedia: Sound MAX Integrated Digital Audio
    Windows XP Home SP2

  2. #2
    Join Date
    Aug 2006
    Posts
    227

    Re: How to pass scalars and arrays to dialog boxes?

    Instead of directly going to the coding for passing the scalars and arrays, you will have to understand some basic concepts that might be useful while creating the coding. You will have to specify whether a model that calls this model passes this model's scalar inputs by value. Since, I know some good tips I would like to share that with you. This model allows passing roots by value to read its scalar inputs from register or local memory. This process is faster than reading the inputs from their original locations. But the drawback is that passing roots by value can lead to incorrect results if the model's root scalar inputs can change within a time step.
    I do to dead flowers what people at morgues do to dead people. Suck all the moisture out, dip them in plastic, paint them up pretty and put them in a nice frame.

  3. #3
    Join Date
    Aug 2006
    Posts
    235

    Re: How to pass scalars and arrays to dialog boxes?

    You should know about the functions showModalDialog() because you can pass the scalar, array, string, etc. as an argument from this function. The syntax for the showModalDialog() :
    Code:
    window.showModalDialog(param1, param2, param3)
    The second argument of the functions showModalDialog() and showModelessDialog() can be of any type: scalar, array.
    3.2 (northwood)
    2gig ram
    ATI AIW X800xt 256mb
    Gigabyte GA-8knxp 875p Chipset
    Optiwrite 8X DVD Burner
    Win XP PRO Sp2 (Works Perfectly)
    2 SATA Raptor 74gig Raid 0
    2 7200 IDE 320gig HD

  4. #4
    Join Date
    Nov 2008
    Posts
    996

    Re: How to pass scalars and arrays to dialog boxes?

    Since, you have created the dialog box. I would like to tell you some easy steps for passing scalars and arrays to dialog boxes. First, you will have to create a dialog box with below statement :

    Code:
    window.showModelessDialog('demo.html','Doc JavaScript');
    The page demo.html includes some text and the following script :
    Code:
    <SCRIPT LANGUAGE="JavaScript">
    <!--
      alert(dialogArguments);
     -->
    </SCRIPT>
    The window object property dialogArguments is set to the second parameter passed by showModelessDialog(). Hope that this helps you.!

  5. #5
    Join Date
    Mar 2008
    Posts
    672

    Re: How to pass scalars and arrays to dialog boxes?

    While calling the function showModalDialog() and showModelessDialog(), there are at least two ways to pass addresses. You can pass it as an array and an object. You can pass array in the following manner :
    Code:
    <SCRIPT LANGUAGE="JavaScript">
    <!--
      var arr = new Array;
      arr[0]="one";
      arr[1]="two";
      arr[2]="three";
    // -->
    </SCRIPT>
    You will have to pass the array arr to the dialog box :
    Code:
    window.showModelessDialog('demo.html',arr);

Similar Threads

  1. Dialog boxes are appearing too big, not able to access them
    By Kardashian in forum Windows Software
    Replies: 3
    Last Post: 01-12-2010, 05:06 PM
  2. Replies: 1
    Last Post: 19-10-2010, 08:36 AM
  3. How can I use parallel_for to pass two dimensional arrays
    By Tamonash in forum Software Development
    Replies: 7
    Last Post: 08-10-2010, 12:04 AM
  4. Replies: 9
    Last Post: 30-08-2010, 04:57 PM
  5. How to nest boxes inside parent boxes in CSS?
    By Dilbert in forum Software Development
    Replies: 5
    Last Post: 11-05-2010, 04:41 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,750,433,701.92994 seconds with 16 queries