SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Addict buildakicker's Avatar
    Join Date
    Jun 2005
    Location
    NorCal
    Posts
    378
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Thumbs up popup window or alert with PHP vars (code)

    Hi all,

    I have a calendar I am trying to create. I have event's on the calendar that i would like to have show up in a popup window when someone click on them within the calendar. Here is where it happens:
    PHP Code:
    function showEventsCal($eday){
        
    //add event for current day
        
    $fh fopen("events.txt""r+");
        while (!
    feof($fh) ) {
            
    $txtline fgets($fh);
            
    $parts explode('|'$txtline);
            if(
    $eday == $parts[0]){
                
    $d=$parts[0];
                
    $t=$parts[1];
                
    $des=$parts[2];
                echo 
    "<div class='calDayEvent'><a href='#'>"$t ."</a></div>";
            }
        }
            
    fclose($fh);

    I would like the <a href='#' to open an alert or a new window with the data from the $parts[0]... $parts[2]. How do I do this?

    Thanks!
    SKILEASES.COM - FREE rental listings!
    WILDFIREBLOG.COM - Wildland Fire microblog!

  2. #2
    SitePoint Addict buildakicker's Avatar
    Join Date
    Jun 2005
    Location
    NorCal
    Posts
    378
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I feel like I have to create another function to search the page for the events on certain days, then link them to the $parts[0]. I am just not sure...
    SKILEASES.COM - FREE rental listings!
    WILDFIREBLOG.COM - Wildland Fire microblog!


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
  •