Results 1 to 2 of 2

Thread: Dynamic Html urgent!!

  1. #1
    Join Date
    Mar 2005
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Dynamic Html urgent!!

    Hi All

    I am very new to DHTML and I have very strange requirement. Here is code snippet
    document.forms[0].target = 'myPrintWin';
    var winLeft = (screen.width - 800) / 2;
    var winTop = (screen.height - 675) / 2;
    windowName = "myPrintWin";
    var windowFeatures = "width=800,height=675,status=no,scrollbars,location=no,menubar,resizable,left=" + winLeft + ",top=" + winTop
    var x=window.confirm("Click on Ok button to select html format of report and cancel to select text format of report")
    if (x)
    {
    document.forms[0].format.value = 'html';
    }
    else
    {
    document.forms[0].format.value = 'text';
    }
    document.forms[0].submit();
    newWindow = window.open('',windowName,windowFeatures);
    return true;

    Here instead of javascript confirm I want to open a new window and add radio buttons with label text and html. Once user clicks on any of these radio buttons i want to close this window and open another window newWindow = window.open('',windowName,windowFeatures); whichsubmits the form and before that I need to set one field(you can see in my code format field to radio button selection .ie text/html) in my struts jsp. I have a problem as I can't do this using javascript as I will have to get input from user after clicking on text or html and I don't want to open window by giving url(Html page containing code for radio buttons).

    I am planning to do this by using dhtml : once I click on print button in JSP using dhtml I will show window using div/class tag which will contain radio button code and then once user clicks in that window open anohter window and set the format field. Any help is highly appreciated.

    Thanks in advance for your help..

    Regards,
    Bunty
    Last edited by bunty; 03-29-2005 at 04:59 AM.

  2. #2
    Join Date
    Mar 2005
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    HI all

    I could solve this..and learnt bit of DHTML..

    Thanks
    Bunty

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
  •