Results 1 to 8 of 8

Thread: DHTML Window and forms

  1. #1
    Join Date
    Feb 2013
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default DHTML Window and forms

    1) Script Title:

    DHTML Window widget (v1.1)

    2) Script URL (on DD):

    http://www.dynamicdrive.com/dynamici...ndow/index.htm

    3) Describe problem:

    My question is about how to get a DHTML window to work with forms. A DHTML window can gain access to the form of the loader page; however, a DHTML window can not participate in the setting for form inputs. For example, let us say you have PHP pull some data from MYSQL and the loader page is the results of that search. If you were to have a DIV that you manually display that has filtering criteria for that search it works; however, once you create the same DIV via DHTML window Widget the filter settings no longer work as if the inputs in the DIV don't exist. I have tried it with leaving the DHTML window open and submitting the form, closing the window and just minimizing the window. In all cases the DHTML window filter inputs will not work - even though they do work if you show the DIV through a separate javascript display method.

    Is there a way to make the DHTML window work?

    Thanks.

  2. #2
    Join Date
    Aug 2004
    Posts
    9,890
    Thanks
    3
    Thanked 964 Times in 953 Posts
    Blog Entries
    15

    Default

    Firstly, are you using the IFRAME option of the script to load pages inside the DHTML window? Secondly, do you have a quick online example of the issue?
    DD Admin

  3. #3
    Join Date
    Feb 2013
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by ddadmin View Post
    Firstly, are you using the IFRAME option of the script to load pages inside the DHTML window? Secondly, do you have a quick online example of the issue?
    No I am using the 'div' flag. The window is created using the following command:

    Code:
    $fieldname			= 'filters';
    $Field_name		= 'Field_MM'.$fieldname;
    onClick="divwin_<?php echo $fieldname;?>=dhtmlwindow.open('sorting_controls_div', 'div', 'sorting_controls', 'Search Filters', 'width=250px,height=150px,left=200px,top=150px,resize=1,scrolling=1'); return false"
    it makes no difference if I remove the 'return false' statement or not.

    the code for the actual div is:

    Code:
    <div style="display:block;left:500px;top:300px;position:fixed;z-index:50;width:250px;height:150px;" name="sorting_controls" id="sorting_controls" />
    				<table width="100%" class="perp_mainmenutable" />
    					<tr>
    						<td>
    						<?php
    						// Load Control Buttons
    						_tp_control_sortby_joined($tbl_show_joinedsort		,1				,$en_joined		,$en_turned_off	,$en_active		,$en_notactive	,'frmjoined'		,'frmjoinedactive'		,'notused'		,$frmjoined);
    						_tp_control_sortby_archieved($tbl_show_archivedsort	,1				,$en_archived	,$en_turned_off	,$en_active		,$en_notactive	,'frmarchives'		,'frmarchivesactive'	,'notused'		,$_POST['frmarchives']);
    						_tp_control_sortby_closed($tbl_show_closedsort		,1				,$en_closed		,$en_turned_off	,$en_active		,$en_notactive	,'frmclosed'		,'frmclosedactive'		,'notused'		,$_POST['frmclosed']);
    						_tp_control_sortby_duplicate($tbl_show_duplicatesort,1				,$en_duplicate	,$en_turned_off	,$en_active		,$en_notactive	,'frmduplicate'		,'frmduplicateactive'	,'notused'		,$_POST['frmduplicate']);
    						_tp_control_sortby_date($tbl_show_datesort			,$tbldatesort	,$en_start_date	,$en_turned_off									,'frmstartdate'								,$uifrmstartdate,'Calendar1');
    						_tp_control_sortby_date($tbl_show_datesort			,$tbldatesort	,$en_end_date	,$en_turned_off									,'frmenddate'								,$uifrmenddate	,'Calendar2');
    						
    						_tp_control_sortby_text($tbl_show_textsort			,$tbltextsort	,$en_textlike	,$en_turned_off									,'frmtextlike'								,$frmtextlike	,'not used');
    						_tp_control_sortby_page($sql						,$sql_failsafe	,$en_select_page		,$tblpagationgroup	,'pageation'		,'formoptionpageation'	,$_POST['formoptionpageation']);
    						_tp_control_function_submit();
    						?>
    						</td>
    					</tr>
    				</table>
    				</div>
    Last edited by jscheuer1; 02-13-2013 at 10:42 AM. Reason: Format

  4. #4
    Join Date
    Jan 2011
    Location
    Southeastern CT
    Posts
    594
    Thanks
    43
    Thanked 28 Times in 28 Posts

    Default

    Please post a link to your page .this will help determine the problem
    Thanks,

    Bud

  5. #5
    Join Date
    Feb 2013
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by ajfmrf View Post
    Please post a link to your page .this will help determine the problem
    It is all in a production environment on my computer. Not sure how I want to open that for inspection...

  6. #6
    Join Date
    Aug 2004
    Posts
    9,890
    Thanks
    3
    Thanked 964 Times in 953 Posts
    Blog Entries
    15

    Default

    Hmm with the "div" mode, you risk the chance of all sorts of problems if the markup has JavaScript functionality tied to it, since in this case you're basically duplicating the markup from one part of the page to the next whilst probably not modifying your JavaScript to take into account that.

    Is switching to the IFRAME mode an option (so the form is stored inside its own page and embedded on the loader page and DHTML window that way?
    DD Admin

  7. #7
    Join Date
    Feb 2013
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    There is javascript that controls how some of the controls work, and there is an assciated ajax call to refresh the page on one control as well. if I did change it to an iframe call, how would you suggest I rework the form inputs that control how the loader page is displayed?

    I'll check the javascript errors and see what is applicable to the DHTML window failing. If I fidn anythign I'll let you know.


    Thanks.

  8. #8
    Join Date
    Aug 2004
    Posts
    9,890
    Thanks
    3
    Thanked 964 Times in 953 Posts
    Blog Entries
    15

    Default

    Quote Originally Posted by thunderai View Post
    There is javascript that controls how some of the controls work, and there is an assciated ajax call to refresh the page on one control as well. if I did change it to an iframe call, how would you suggest I rework the form inputs that control how the loader page is displayed?


    Thanks.
    Without seeing the actual rendered page/form in action, it's hard to give specific advice, though in general, I reckon you'd include the form onto the loader page using either SSI or PHP, and for the DHTML window, obviously via IFRAME.
    DD Admin

Similar Threads

  1. Replies: 1
    Last Post: 03-02-2011, 05:53 AM
  2. Problem with submitting forms using the DHTML Window Widget
    By parucleo in forum Dynamic Drive scripts help
    Replies: 2
    Last Post: 01-18-2009, 11:06 AM
  3. Close event DHTML window interferes with DHTML tooltip II?
    By Emile in forum Dynamic Drive scripts help
    Replies: 10
    Last Post: 06-21-2007, 06:47 PM
  4. Replies: 2
    Last Post: 04-14-2007, 12:39 PM
  5. Popup window and html forms
    By robburne in forum JavaScript
    Replies: 0
    Last Post: 03-14-2006, 10:19 PM

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
  •