jQuery Dialog - links not calling correct function
| From: | Don Wieland | Date: | Fri, 28 Mar 2014 20:38:08 +0000 |
| Subject: | jQuery Dialog - links not calling correct function | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-323123@lists.php.net to get a copy of this message | ||
I have this weird behavior going on - probably something simple (just learning jQuery):
Here is my javascript link:
http://rts.dwdataconcepts.com/rts1/js/edit_cau.js
In my PHP page I am calling the script:
<script src="js/edit_cau.js" type="text/javascript"></script>
Then I have a table whic has 2 <TD>s with LINKS to trigger the scripts:
<td align="center"><a class="text_link"
href="ajax/view_text.php?id=<?php echo $row2['cau_id'];
?>"><b>View</b></a></td>
This pops up a dialog to just read text
<td align="center"><a class="req_link"
href="ajax/edit_cau.php?id=<?php echo $row2['cau_id'];
?>"><b>Edit</b></a></td>
This pops up a dialog with a FORM in it.
Problem: When I add the second function:
$(function() {
var $div1 = $('.text_link');
$(".text_link").click(function() {
The first function "req_link" uses it instead of it's own function.
I must have something simple out of place or missing. Little help!
Don Wieland
donw@pointmade.net
http://www.pointmade.net