Jump to content

tebrown

Members
  • Posts

    114
  • Joined

  • Last visited

Everything posted by tebrown

  1. I played around with it for a while but easnt working still. I then looked into this forum post: http://stackoverflow.com/questions/8585361/jquery-dialog-box-passing-variable-value-from-php-to-jquery-function So i tried out the iFrame, i got it to work and it now shoes the id for each link. But iFrame's seem to take away my css styling. I've lost all my style within the modal itself. jQuery(function ($) { // Load dialog on click $('#basic-modal .basic').click(function (e) { e.preventDefault(); // Display an external page using an iframe var src = $(this).attr('href'); $.modal('<iframe src="' + src + '" height="450" width="400" style="border:0">', { overlayClose:true }); return false; // not sure why you're doing this }); // end of click handler }); // end of document.ready
  2. Thanks. It doesn't seem to open up the modal though. jQuery(function ($) { $('#basic-modal .basic').click(function (ev) { ev.preventDefault(); $('<div />').load($(this).attr('href')).modal(); }); }); });
  3. Sorry i didn't see that you provided the second piece of code above. Would i put it together like this: jQuery(function ($) { $(document).ready(function () { $('#basic-modal input.basic, #basic-modal a.basic').click(function (e) { e.preventDefault(); var content = '#' + this.id + '-content'; $(content).modal(); }); }); // Load dialog on click $('#basic-modal .basic').click(function (e) { $.get("schedule.php?id=" + this.hash.substr(1), function (data ){ $('#content-one').modal({ overlayClose:true, opacity:40 }); }); return false; }); }); When i did this, it doesn't even open up properly. Cheers tebrown
  4. Hmm, right. May i ask what this actually does? - I'm sure im very close with what i have got at the moment. Its just not identifying the id.
  5. Javascript is not my best skill in programming, but would i implement this into my current javascript that opens the modal?
  6. Damn, im running on localhost. I dont think its a database problem, its defiantly something to do with the javascript. Quick rundown. The 2 links are displayed on schedule.php. They both have an id (24, 25). When the user clicks one of these links, it will open up the modal (lineup.php), which will then show the id depending on what link the user clicked.
  7. Nope there not, the id's of them are 24, 25. Even when i hover over the links it shows down the bottom left corner of my screen: schedule.php?id=24 schedule.php?id=25
  8. Ok i made the changes and its working, but its only showing one id for both. From the code i showed above, it outputs to results id 24 and id 25. They are then displayed. When i click id 24 it opens the modal and shows the id 24, but when i open up id 25 it shows 24 also....
  9. Ok sorry, i should have showed the other code. Let me show you it. schedule.php <?php $fixture = "SELECT * FROM `fixtures` WHERE `club`='".$_SESSION['club']."' AND `team`='".$_SESSION['team']."' AND `status`='1' ORDER BY time ASC"; $resultfixture=mysql_query($fixture); while($rows = mysql_fetch_array($resultfixture)) { $id=$rows['id']; $status=$rows['status']; $date = $rows['time']; $saved=$rows['saved']; $date = $rows['time']; $fixturedate = date('M jS, g:ia', $date); ?> <div class="updates-team"> <div style="height: 100%; width: 3px; background-color: #85BC77;"> <div class="padding-team"> <table width="600px" cellpadding="0"> <tr> <td width="148"><?php echo "" . $rows['home'] . " vs ". $rows['away'].""?></td> <td width="120"><?php echo "" . $rows['where'] . "" ?></td> <td width="120"><?php echo $fixturedate; ?></td> <td width="100" rowspan="2"> <div href="#" class="small-icon-edit"><i class="icon-bar-chart"></i></div> <div id='basic-modal'><a href="schedule.php?id=<? echo $rows['id']; ?>" class='basic'><div class="small-icon-edit"><i class="icon-edit"></i></div></a></div> <div href="#" class="small-icon-tick-incomplete"><i class="icon-ok-sign"></i></div> </td> <tr style="font-size: 11px;color: #9B9B9B;padding-top: 5px;"> <td colspan="1"><a href="#" id="sample">Mostly Overcast</a></td> <td colspan="1">New Plymouth</td> <td colspan="3">Saturday</td> </tr> </table> </div> </div> </div> <? } ?>
  10. I did find this forum post: http://forum.jquery.com/topic/simplemodal-parsing-variable-from-original-php-to-modal-popup I made the following changes, but it still doesn't grab the id from the specific link i click. shedule.php <a href="schedule.php?id=<? echo $rows['id']; ?>" class='basic'>Open Modal</a> Javascript jQuery(function ($) { // Load dialog on click $('#basic-modal .basic').click(function (e) { [b]$.get("schedule.php?id=" + this.hash.substr(1), function (data ){[/b] $('#content-one').modal({ overlayClose:true, opacity:40 }); }); return false; }); }); lineup.php (grab the id and echo it out) <? $id=$_GET['id']; echo $id; ?> I still get the Notice: Undefined index: id in /Users/Tim/Sites/2012MP/modals/lineup.php on line 17 Cheers Guys
  11. Im still unable to retrive the $id from the link. Notice: Undefined index: id in /Users/Tim/Sites/2012MP/modals/lineup.php on line 17 <div id='basic-modal'><a class='basic' href=\"lineup.php?id=".$rows['id']."\">Open Modal</a></div>
  12. Thanks for you reply there, I found a similar modal which allows you to have multiple modals on one page. I'm still having trouble. I've got this below link which activates the modal box and opens it, but im trying to get the $id variable although I cant seem to get it to work. schedule.php <div id='basic-modal'><a href="lineup.php?id=<? echo $rows['id']; ?>" class='basic'>Open Modal</a></div> lineup.php <? $id=$_GET['id']; echo $id; ?> Here is the javascript that im using to open it: jQuery(function ($) { // Load dialog on page load //$('#basic-modal-content').modal(); // Load dialog on click $('#basic-modal .basic').click(function (e) { $('#content-one').modal({ overlayClose:true, opacity:40 }); return false; }); }); Any help much appreciated.
  13. Ah ok. I don't need those. I just need multiple modals that can be clicked on one page that will show content within the specific modal.
  14. Using this lightbox service, would i be able to have multiple modal links on one page? For example: Modal One Link Modal Two Link Modal Three Link Each modal contains different content... Cheers
  15. Hey Guys, Originally i had a page called fixtures.php - this page had all my fixtures for my upcoming season. Each fixture had a icon that allowed the manager to click this link and create the lineup for this fixture. It would then take them to a page called lineup.php with a php variable attached like this: lineup.php?id=45 Now, i have modified my site and have changed it so that when the user clicks a specific icon to create the lineup it would open up a modal dialogue box. The link to open this modal dialogue box is as follows: <a id="go" rel="leanModal" name="modal9" href="#modal9"></a> Before it had allowed me to switch pages from fixtures.php to lineup.php where i could pass the variable within the link. Now it wont let me do that becuase the modal dialoge box opens without refreshing. So what i need to do now is somehow pass the php variale (id) to this modal dialogue box and grab it so i can then show results from the database depending on the $id variable. How could i go about doing this? Cheers tebrown
  16. Still goes to junk... $headers = "MIME-Version: 1.0".PHP_EOL; $headers .= "--PHP-mixed-".$uid."".PHP_EOL; $headers .= "Content-Type: multipart/alternative; boundary=\"PHP-alt-".$uid."\"".PHP_EOL; $headers .= "--PHP-alt-".$uid."".PHP_EOL; $headers .= "Content-type: text/html; charset=utf-8".PHP_EOL.PHP_EOL; $headers .= "Content-Transfer-Encoding: 7bit".PHP_EOL; $headers .= "To: \"".$name."\" <".$to.">".PHP_EOL; $headers .= "From: ".$from." <".$from.">".PHP_EOL; $headers .= "Reply-To: ".$name." <".$from.">".PHP_EOL; $headers .= "Return-Path: ".$from." <".$from.">".PHP_EOL; $headers .= "X-Priority: 3".PHP_EOL; $headers .= "X-Mailer: PHP". phpversion() ."".PHP_EOL; $headers .= "X-MSMail-Priority: High\n"; $headers .= "Importance: High\n"; Mate, you can go to bed, don't want to keep you up. I can wait for a response. Cheers.
  17. If i send to gmail, it goes to inbox, i think its just Hotmail that marks it as spam/junk?
  18. If i was not to use PHP mailer, would you know whats wrong with the above code in regards to why its sending to junk mail? was not*
  19. Hmm, yeah its still sending to junk. This is really annoying aye. Also why does it show the content within the actual message? <? $subject = mysql_real_escape_string($_POST["subject"]); $body = mysql_real_escape_string($_POST["message"]); $to = "[email protected]"; $uid= md5(uniqid(time())); $name = "".$_SESSION['name'].""; $from = "".$_SESSION['email'].""; $headers = "MIME-Version: 1.0".PHP_EOL; $headers .= "--PHP-mixed-".$uid."".PHP_EOL; $headers .= "Content-Type: multipart/alternative; boundary=\"PHP-alt-".$uid."\"".PHP_EOL; $headers .= "--PHP-alt-".$uid."".PHP_EOL; $headers .= "Content-type: text/html; charset=utf-8".PHP_EOL.PHP_EOL; $headers .= "Content-Transfer-Encoding: 7bit".PHP_EOL; $headers .= "To: \"".$name."\" <".$to.">".PHP_EOL; $headers .= "From: ".$from." <".$from.">".PHP_EOL; $headers .= "Reply-To: ".$name." <".$from.">".PHP_EOL; $headers .= "Return-Path: ".$from." <".$from.">".PHP_EOL; $headers .= "X-Priority: 3".PHP_EOL; $headers .= "X-Mailer: PHP". phpversion() ."".PHP_EOL; //message headers mail($to, $subject, $body, $headers); ?>
  20. So i should replace that with the original 'To:'? - and then create 2 new variables ($to_name, $to_email)?
  21. Yes it was still not working even without the SMTP info. I'll look at those examples now. Here is a screenshot of what its like in my hotmail:
  22. Yeah its good practice though! - i tired the headers without SMTP - it still goes to junk?
  23. I just looked at my settings in my web hosting. This is what it says. Mail Server Username: info+rugbymanager.co.nz Incoming Mail Server: mail.rugbymanager.co.nz Incoming Mail Server: (SSL) mail.emailserver.co.nz Outgoing Mail Server: mail.rugbymanager.co.nz (server requires authentication) port 26 Outgoing Mail Server: (SSL) mail.emailserver.co.nz (server requires authentication) port 465 Supported Incoming Mail Protocols: POP3, POP3S (SSL/TLS), IMAP, IMAPS (SSL/TLS) Supported Outgoing Mail Protocols: SMTP, SMTPS (SSL/TLS)
  24. No worries, here it is. I've replaced my site name with domain. Has not been released yet that is all. $subject = mysql_real_escape_string($_REQUEST["subject"]); $body = mysql_real_escape_string($_REQUEST["message"]); //specify your SMTP domain ini_set ( "SMTP", "mail.domain.co.nz" ); // Please specify an SMTP Number 25 and 8889 are valid SMTP Ports. ini_set("smtp_port","25"); //if password auth is required ini_set("username" , "[email protected]"); ini_set("password", "********"); $subject = mysql_real_escape_string($_REQUEST["subject"]); $body = mysql_real_escape_string($_REQUEST["message"]); $to = "[email protected]"; $name = "".$_SESSION['name'].""; $from = "".$_SESSION['email'].""; $headers = "MIME-Version: 1.0".PHP_EOL; $headers .= "Content-type: text/plain; charset=utf-8".PHP_EOL; $headers .= "To: ".$to."".PHP_EOL; $headers .= "From: ".$name." <".$from.">".PHP_EOL; $headers .= "Reply-To: ".$name." <".$from.">".PHP_EOL; $headers .= "Return-Path: ".$from." <".$from.">".PHP_EOL; $headers .= "X-Priority: 3".PHP_EOL; $headers .= "X-Mailer: PHP". phpversion() ."".PHP_EOL; mail($to, $subject, $body, $headers);
  25. Ok i made the changes, even the headers. It still goes to junk email in hotmail. How do you know if your actually connect to your mail server?
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.