SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Dec 2010
    0 Post(s)
    0 Thread(s)

    PHP interfering with Javascript?

    I have a site where I am using the Sexy alert plugin. I don't know why its not popping up. Its probably something small I am over looking.

    Here is the site: Click here

    Here is the coding:
    HTML Code:
    if ($_GET[Submit] == "Begin Registration") {
    	if ($_GET[checkbox] == "checkbox") {
    		// header(sprintf("Location: %s", ""));
    		echo "<script language=\"javascript\">\"\", \"Registration\", \"toolbar=no,location=no,directories=no,status=yes,scrollbars=yes,resizable=no,width=600,height=600\") </script>" ;
    		} else {
    		// echo "<script language=\"javascript\"> alert(\"Check the box to confirm that you have reviewed the conference requirements and guidelines.\") </script>" ;
    		$error = "<center><strong><font color=red>Check the box to confirm that you have reviewed the conference requirements and guidelines.</font></strong></center>" ;
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    <html><!-- InstanceBegin template="/Templates/v3-subpage.dwt.php" codeOutsideHTMLIsLocked="false" -->
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <title>:: NABA - EASTERN REGION ::</title>
    <link href="/css/default.css" rel="stylesheet" type="text/css">
    <script type="text/javascript">
    startList = function() {
    	if (document.all&&document.getElementById) {
    		navRoot = document.getElementById("navlist");
    		for (i=0; i<navRoot.childNodes.length; i++) {
    			node = navRoot.childNodes[i];
    			if (node.nodeName=="LI") {
    				node.onmouseover=function() {
    					this.className+=" over";
    				node.onmouseout=function() {
    					this.className=this.className.replace(" over", "");
     <script src="" type="text/javascript"></script>
    <link rel="stylesheet" href="" type="text/css" media="all" />
    <script src="" type="text/javascript"></script>
    <script type="text/javascript">
    window.addEvent('domready', function() {
    Sexy = new SexyAlertBox();
    <!-- InstanceBeginEditable name="head" --><!-- InstanceEndEditable -->
    <?php require_once($_SERVER['DOCUMENT_ROOT'] . '/set-body-id.php') ;?>
    <body id="<?=$bodyId; ?>">
    <div id="wrapper">
    	<div id="pageHeader">	
    		<div id="naba-title"><a href="/index.php"><img src="/images/naba-title.jpg" border="0" /></a></div>
    		<?php require_once($_SERVER['DOCUMENT_ROOT'] . '/nav.php') ;?>		
    		<div id="naba-banner"></div>
    	<div id="pageBody">
    		<div id="content">
    			<div id="lft">
    		  	  <p align="center"><a href="" target="_blank"><img src="../images/sponsors/deloitte.gif" alt="Deloitte logo" width="132" height="30" vspace="5" border="0" /></a></p>
    <p align="center"><a href="" target="_blank"><img src="../images/sponsors/prudential.gif" alt="Prudential Logo" width="132" height="31" vspace="5" border="0" /></a></p>
    			  <p align="center"><a href="" target="_blank"><img src="../images/sponsors/ernstAndYoung.gif" alt="Ernest &amp; Young Logo" width="129" height="29" vspace="5" border="0" /></a></p>
    <p align="center"><a href="" target="_blank"><img src="../images/sponsors/kpmg.jpg" width="132" height="50" alt="KPMG Logo" vspace="5" border="0" /></a></p>  
    			 <p align="center"><a href="" target="_blank"><img src="../images/sponsors/pricewaterhousecoopers.gif" alt="PriceWaterHouseCoopers Logo" width="132" height="26" vspace="5" border="0" /></a></p> 
                     <p align="center"><a href="" target="_blank"><img src="../images/sponsors/freddie_mac.jpg" width="132" height="47" alt="Freddie Mac Logo" vspace="5" border="0" /></a></p>                       
    		  	  <p align="center"><a href="" target="_blank"><img src="../images/jpmorgan.jpg" width="132" height="41" alt="JP Morgan & Chase" vspace="5" border="0" /></a></p> 
    <p align="center"><a href="" target="_blank"><img src="../images/thorton.jpg" width="132" height="41" alt="Grant Thornton" vspace="5" border="0" /></a></p>
    <p align="center"><a href="" target="_blank"><img src="../images/mcgladery.jpg" width="132" height="41" alt="McGladrey" vspace="5" border="0" /></a></p>      
    			<!--LEFT END-->
    		    <div id="rgt">			
    		    	<!-- InstanceBeginEditable name="Content" --> 
    					<h1>Eastern Region Student Conference</h1>
    				<h2>Registration Requirements</h2>
    				<p>Before beginning the registration process, ensure that you meet all requirements by reviewing the <a href="/student_conf/">Student Conference Registration Information</a>.</p>
                    <p><strong>Quick Check: </strong></p>
    						<li><a href="index.php">Deadlines</a></li>
    						<li><a href="resume-requirements.php">Resume Requirements</a></li>
    						<li><a href="fees.php">Fees</a></li>
    						<li><a href="help.php" target="_blank">Registration Requirements/FAQs</a></li>
                    <p><strong>ALL Registration questions should be sent directly to</strong> <a href="/feedback.php"><img src="/images/address/registration-email.gif" alt="Contact Registration" width="132" height="12" border="0" align="absbottom"></a>. </p>
                    <p><strong>All Resume questions should be sent directly to</strong> <a href="/feedback.php"><img src="/images/address/interview-email.gif" alt="Contact Interviews" width="118" height="12" border="0" align="absbottom"></a>.</p>
    								<p><strong>Consent to Use of Photographic Images</strong></p>
    								<p>Registration and attendance at, or participation in the National Association of Black Accountants, Inc. (NABA) Annual National Conventions, Regional Student Conferences, DOF Conferences, meetings and other activities constitutes an agreement by the registrant to NABA's use and distribution (both now and in the future of the registrant or attendee's image or voice in photographs, videotapes, electronic reproductions and audiotapes of such events and activities.</p>
    								<p><strong>Your Participation</strong></p>
    								<p>By attending the National Association of Black Accountants, Inc's. (NABA) Annual Student Conference, <strong>October 6 - 9, 2011 in Bethesda, MD</strong>; you agree to release and hold NABA, Inc. its subsidiaries, affiliates, agents and representatives and each of their officers, directors, agents, and employees, harmless from any and all liability whatsoever for any injuries, losses or damages of any kind arising from participation in or in connection with attending the Student Conference.</p>
                    <p align="center"><a href="#" onclick="Sexy.alert('Please note your local professional chapter may be selling registrations at a lower rate. Please check with your local professional chapter prior to purchasing your registration<ul><li><a href='' target='_blank'>Continue to registration</a></li><li><a href=''>Exit and contact your local professional chapter</a></li></ul>'); return false;"><img src="../images/ClickHereToRegister_Large_2Line_round_Black.gif" alt="Register" width="112" height="54" border="0"></a></p>
                    <p class="style1"><strong>Modify your registration.</strong></p>
                    <p> If you have completed or just began the registration process you may edit your 
    information and make payment. Click the above link to login.</p>
          <!-- InstanceEndEditable -->
    			<div style="clear:both"></div>		
    			<!--RIGHT END-->
    		<!--CONTENT END-->
    	<!--PAGE BODY END-->
    	<div id="pageFooter">
    		<div id="siteCopy"> 
    		<script src="/ScriptLibrary/copyright.js"></script>
    		Eastern Region of the National Association of Black Accountants, Inc.  
    		<div id="wnmg-logo"><a href="" target="_blank"><img src="../images/webnet.gif" width="112" height="30" alt="Powered by WebNet Media Group" border="0" /></a>
    <!-- InstanceEnd --></html>
    Any help would be greatly appreciated!

  2. #2
    I meant that to happen silver trophybronze trophy Raffles's Avatar
    Join Date
    Sep 2005
    2 Post(s)
    0 Thread(s)
    Er, one of the main problems is that you're echoing the <script> stuff before the DOCTYPE there. That's going to generate some god-awful mess for the HTML parser. You need to echo that <script> stuff somewhere in the <head>.

    Also, don't use the "language" attribute for the <script> element.

    And the <center> and <font> tags are deprecated (plus they're markup for display, so should end up in the <body>). So is the "align" attribute.

    Once you fix all these issues then your problem may go away, otherwise we can only take it from there.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts