0

I am creating a feed that displays event information. Each event has it's own modal. I am trying to create a unique url for each event's modal but am having trouble figuring out the links.

To my understanding, I should be able to go to the url:

mysite.com/feed.php?result=mymodal'eventid'

Which should automatically open that specific modal on page load. Correct?

I am new to all of this and may be missing something small or may be missing an entire element.

 ?>
      <div class="result">
        <div class="twelve columns">
          <h2><a href="#mymodal<?php echo $runrows['eventID']?>" data-reveal-id="myModal<?php echo $runrows['eventID']?>" class="event_title"><?php echo $runrows['title']; ?></a></h2>
          <div class="event_date"><?php echo $runrows['date']; ?><p class="rsvp_count">RSVP Count: <?php echo $runrows['rsvp_count']; ?></p></div>
        </div>
        <div class="twelve columns">
          <p class="event_headline"><?php echo $runrows['headline']; ?> (Click on event name to read more..)</p>
          <p class="event_location"><?php echo $runrows['location']; ?></p>
          <p class="event_terminal"><?php echo $runrows['terminal']; ?></p>
          <p class="rsvp_count"><?php echo $runrows['rsvp_count']; ?></p>
          <div class="event_share">
            <form style='margin: 0; padding: 0'>
                 <?php/*input class="button" style='display:inline;' name='RSVP' type='submit' value='RSVP'/>
                 <input class="button" style='display:inline;' name='Share' type='submit' value='Share'/>
                 <input type="hidden" name="eventID" value="1"*/?>
          </form>
            <button onclick="<?php echo 'RSVPSubmit('.$runrows['eventID'].', 0);'; ?>">RSVP</button><button>Share</button>
          </div>
        </div>
        <hr>
      </div>

        <div id="myModal<?php echo $runrows['eventID']?>"  class="reveal-modal">

  <div class="result">
        <div class="twelve columns">
          <h2><a href="#mymodal<?php $runrows['eventID']?>" data-reveal-id="myModal<?php echo $runrows['eventID']?>" class="event_title"><?php echo $runrows['title']; ?></a></h2>

          <div class="event_date"><?php echo $runrows['date']; ?></div>
        </div>
        <div class="twelve columns">
          <p class="event_headline"><?php echo $runrows['headline']; ?></p>
          <p class="event_description"><?php echo $runrows['description']; ?></p>

          <p class="event_location"><?php echo $runrows['location']; ?></p>
          <p class="rsvp_count"><?php echo $runrows['rsvp_count']; ?></p>

          <div class="event_share">
            <form style='margin: 0; padding: 0'>
                 <?php/*input class="button" style='display:inline;' name='RSVP' type='submit' value='RSVP'/>
                 <input class="button" style='display:inline;' name='Share' type='submit' value='Share'/>
                 <input type="hidden" name="eventID" value="1"*/?>
          </form>
            <button onclick="<?php echo 'RSVPSubmit('.$runrows['eventID'].', 0);'; ?>">RSVP</button><button>Share</button>
          </div>
        </div>
        <hr>
      </div>


  <a class="close-reveal-modal">&#215;</a>
</div>
4

1 回答 1

0

请参考Foundation modal 中的 php(我之前的回答)以了解Foundation Reveals的工作原理。

请检查您的代码并确保实际显示/模态</body>是(不包括)之前的元素<scripts>

于 2013-08-28T13:31:10.433 回答