Don Wieland
2014-03-28 20:38:08 UTC
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
***@pointmade.net
http://www.pointmade.net
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
***@pointmade.net
http://www.pointmade.net
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php