Hey Guys,
For the last couple of days i've been stumped on this jquery modal that I have been using. The problem i have come across involves passing variables to a jQuery modal dialogue upon a user clicking a link.
At the moment i am running a mysql_query that gets all the fixtures from the database. The results of these are then displayed on a page called schedule.php. Next to each fixture, a user can click the a link called 'edit lineup' which would then open up a modal window(lineup.php).
The link 'edit lineup' on schedule.php has a variable within the url (id). Like this:
Code:
<div id='basic-modal'><a href="schedule.php?id=<?php echo $id; ?>" class='basic'>Edit Lineup</a></div>
What i want to do is pass this id value into the modal window once the user clicks the link. Obviously this is different because the page is not being refreshed.
This is the javascript that opens the modal if it helps.
Code:
jQuery(function ($) {
// Load dialog on click
$('#basic-modal .basic').click(function (e) {
$('#content-one').modal({
overlayClose:true,
opacity:40
});
});
return false;
});
If anyone could help me out that would be much appreciated.
Cheers
tebrown