Jump to content
Killersites Forums

Search the Community

Showing results for tags 'dialog'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Community Lounge and FAQ
    • Forum News
    • Open Forum
    • New Members Forum - Start Here!
  • Entrepreneurship, Business and Marketing
    • Social Media Marketing & Web Marketing
    • Entrepreneurship
    • Career Questions - Asked and Answered
  • StudioWeb
    • StudioWeb
    • StudioWeb News
    • StudioWeb Projects
  • Programming
    • Python
    • Javascript
    • PHP
  • Web Design
    • Beginners Web Design
    • HTML/XHTML
    • Dreamweaver
    • CSS
    • Advanced Web Design
    • Business of Web Design
    • Web Design News
  • Miscellaneous
    • Cybersecurity
    • Miscellaneous Software
    • Blogs and CMS
    • Web Accessibility
    • Peer-to-Peer Reviews
    • Website Templates
    • Web Design Jobs
    • Test Forum
  • Archives
    • Beginners Web Design
    • Course: The Complete Entrepreneur
    • Web Accessibility
    • Photoshop
    • CSS
    • Forum Rules and Etiquette
    • Flash
    • ASP
    • General Programming
    • Expression Web
    • Beginners Ruby
    • Killersites University
    • Actionscript

Calendars

  • Community Calendar

Categories

There are no results to display.

There are no results to display.

Product Groups

  • Business & Entrepreneur Courses

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website


LinkedIn


Facebook


Twitter


AIM


Yahoo


Other


Location


Interests

Found 1 result

  1. I am playing with a simple example where I have a 2 pages Working code in Plunker One page is a simple Form page. That uses jQuery submit() to fire up an alert ("yayyy for summitted") when the form is submitted. Page two, places this form in an iframe and loads it into a jQuery Dialog that has a SAVE and CLOSE button I want to be able to trigger the form Submit using the SAVE BUTTON in the Dialog. Since the form is in a iframe, I have no idea how to successfully fire up that alert ("yayyy for summitted"). Been stuck on this for a couple of days. So some help would be nice, thanks... Dialog Page <!DOCTYPE html> <html> <head> <title>iframe in Dialog</title> <link rel="Stylesheet" type="text/css" href="https://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css" /> <script type="text/javascript" src="https://code.jquery.com/jquery-3.6.0.min.js"> </script> <script type="text/javascript" src="https://code.jquery.com/ui/1.12.1/jquery-ui.min.js"> </script> <script type="text/javascript"> $(document).ready(function () { $('a#pop').on('click', function (e) { e.preventDefault(); var pagetitle = $(this).attr("title") var page = $(this).attr("href") var iframe = $('<iframe id="myiframe2" style="background:#EEE9E7; border: 0px; " src="' + page + '" width="100%" ' + 'height="100%"></iframe>'); var dialog1 = $('<div></div>').append(iframe).appendTo('body').dialog({ autoOpen: false, modal: false, height: 625, width: 500, title: pagetitle, close: function (e, ui) { alert('pressed'); $(this).remove(); }, buttons: { "Save": function () { alert('Dialog SAVE pressed but for has not yet been subbmitted'); var commentForm = '#commentForm'; var iFrameDOM = $("iframe#myiframe2").contents(); // NOT WORKING iFrameDOM.contents().find('form').submit(); }, "Close": function () { $(this).dialog("close"); } } }); dialog1.dialog('open'); }); }); </script> </head> <body> <!-- Form Page must reside in same domain --> <br /><br /><a id="pop" href="http://localhost/test/formtest" title="Hello World!!!">click me for the Form</a> </body> </html> Form Page <!DOCTYPE html> <html> <head> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.0/jquery.min.js"> </script> <script> $(document).ready(function(){ $('#commentForm').submit(function(e){ e.preventDefault(); alert("yayyy for summitted"); console.log("submitted"); }); //$("form").submit(function(){ // alert("form is submitted."); //}); }); </script> </head> <body> <h2>A very Simple Forrm</h2> <p>On Submit we use jQuery submit() Method and pop up an alert</p> <form id="commentForm" name='commentForm' method="get" action="/"> Your Name: <input type="text" name="name" value="Santa Clause"><br> Your Age: <input type="text" name="age" value="35"><br><br> <input type="submit" name="submit" id="mybutton" value="Submit"> </form> </body> </html>
×
×
  • Create New...