Note that there are some explanatory texts on larger screens.

plurals
  1. POFancyBox PHP form submit issue
    primarykey
    data
    text
    <p>Okay, so I've been having a problem for the past four days, and a couple hours ago, I think I may have solved part of it (fancybox example #5, on their site, seems to be something that I want), however, I cannot get any part of it to work.</p> <pre><code> &lt;? if($_GET['page'] != "startTime"){ ?&gt; &lt;script type="text/javascript" src="http://code.jquery.com/jquery-1.4.2.min.js"&gt;&lt;/script&gt; &lt;script type="text/javascript" src="/./fancybox/jquery.mousewheel-3.0.2.pack.js"&gt;&lt;/script&gt; &lt;script type="text/javascript" src="/./fancybox/jquery.fancybox-1.3.1.js"&gt;&lt;/script&gt; &lt;link rel="stylesheet" type="text/css" href="/./fancybox/jquery.fancybox-1.3.1.css" media="screen" /&gt; &lt;script type="text/javascript"&gt; $(document).ready(function() { $("#startTime").fancybox({ 'padding' : 0, 'scrolling' : 'no', 'titleShow' : false, 'onClosed' : function() { $("#login_error").hide();} }) }); $("#startTimeForm").bind("submit", function() { if ($("#year").val().length &lt; 4) { $("#login_error").show(); $.fancybox.resize(); return false; } $.fancybox.showActivity(); $.ajax({ type : "POST", cache : false, url : "downTime.php?page=ajax", data : $(this).serializeArray(), success : function(data) { $.fancybox(data); } }); return false; }); &lt;/script&gt; &lt;? } ?&gt; &lt;? if($_GET['page'] == "ajax"){ var_dump($_POST); } ?&gt; &lt;? if($_GET['page'] == "startTime"){?&gt; &lt;div style="width:250px" class="new"&gt; &lt;table cellpadding="0" cellspacing="0" border="0" width="100%" class="new"&gt; &lt;tr&gt; &lt;form id="startTimeForm" method=post&gt; &lt;p id="login_error"&gt;Please, enter data&lt;/p&gt; &lt;tr&gt; &lt;td&gt;Enter Year&lt;/td&gt; &lt;td&gt;&lt;input class="czas" id="sec" name="year" type="text" size="5" maxlength="5" value="00" /&gt;&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td colspan="2" align="center"&gt;&lt;br /&gt;&lt;input class="czas" type="submit" name="newTime" value="Set Start Time" /&gt;&lt;/td&gt;&lt;/tr&gt; &lt;/form&gt; </code></pre> <p>I also had used a javascript function, below, and I'd eventually like that to work in the code above, but I cannot get the above to work properly. It just does nothing. Firebug also reports no errors.</p> <pre><code>&lt;script&gt; function closeFB() { &lt;? $unix = mktime(0, 0, 0, 1, 1, $_POST['year']); ?&gt; $("#startTimeDiv").html("&lt;div id='message'&gt;&lt;/div&gt;"); $("#message").html("&lt;p&gt;Contact Form Submitted!&lt;/p&gt;") .append("&lt;p&gt;We will be in touch soon.&lt;br&gt;&lt;? echo $unix; ?&gt;&lt;/p&gt;"); $.fancybox.close(); } &lt;/script&gt; </code></pre> <p>So, any help would be appreciated. Please tell me what I'm doing wrong.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload