Thread: Resolved OnClick Popup Issue
View Single Post
Old 01-30-2013, 08:03 AM   PM User | #4
Ndogg
Regular Coder

 
Join Date: Jun 2009
Posts: 272
Thanks: 76
Thanked 2 Times in 2 Posts
Ndogg can only hope to improve
EDIT:

@sunfighter
After testing your solution, it got me to a point which showed that the problem is in a different part of my script. I added "+log" to the popup and it displayed Admin. So the issue was somewhere else... Thank you


Quote:
Originally Posted by m2244 View Post
Have you tried to simply get the echo to work?

Code:
<a onclick=<?php echo $log; ?>>
and then step forward from there until it doesn't work. Good luck.
Thanks for the suggestions, I have checked the echo and moved through the steps to see if I could figure it out. But all I could do was narrow down where the issue was... I think.

Quote:
Originally Posted by sunfighter View Post
When passing variables into a function, they must be a string or in quotes. This looks like a string. but it's not. You are missing a close tag also.
The line S/B:
Code:
<a onclick="Delete_All(<?php echo "'".$log."'"; ?>)">Click here to delete stuff</a>
In another part that is just "Delete", I also have <?php echo $row['id']; ?> which works fine. It is actually an integer but it is passed the same way, so that might mean your solution isn't correct here? I'm not sure, but adding the quotes like you said doesn't work for me. Although, now the script actually runs and creates a popup, but the $log doesn't get sent. So when redirecting it goes to the incorrect page.

Last edited by Ndogg; 01-30-2013 at 08:14 AM.. Reason: Possibly Found Solution
Ndogg is offline   Reply With Quote