My partner and I have run into a brickl wall trying to find a solution to a problem we are experiencing. This problem ONLY occurs in Safari and all other browsers have no problem. Here is the code:
What we are doing is deleting a record from our database. $quotes['idquotes'] gives a unique number for the record which when submited is then run against our delete query. The problem we face is that it works in every browser other than safari. We feel it must be something with our code and would appreciate any suggestions.
<th class="bannerTextRed" id='<?php echo $quotes['idquotes']?>' align="center" onclick="
document.getElementById('deleteQuote<?php echo $quotes['idquotes']?>').submit();
Also, I have searched everywhere and have not found a reasonable solution to this problem.
Offhand I'd say the single quotes in this line need to either be escaped, or the outer pair made double like the rest of your code.
id='<?php echo $quotes['idquotes']?>'
May not be the issue but it's the 1st thing I'd try.
We have tried this to no avail.
Whats happening is the action posts to this form:
The problem is that the hidden variable is not being posted to the page. And we have proved that by outputting something if the variable was set and nothing was output in Safari. But IE FF output the variable.
<FORM id="deleteQuote<?php echo $quotes['idquotes']?>" name="deleteQuote<?php echo $quotes['idquotes']?>" method="post" action="ratingmain.php">
<input type="text" style="display:none">
<input type='hidden' name='idquotesDelete' id='idquotesDelete' value="<?php echo $quotes['idquotes'];?>">
Just to narrow things down, do you get the same issue with google chrome? It uses the same rendering engine, so it would help to know if it's a browser issue or something to do with the OS itself.
I have just tested this in Chrome and it also does not work.
Any ideas why?
No, not yet. Unfortunately someone else will have to pick this up because I'm about to be traveling for the next 30 hrs or so. Sorry
What is the result of that code when in the browser? I think it may be much clearer what the problem is once we eliminate the PHP as the source of the trouble (we should be able to eliminate the PHP code as the root problem since the code works in at least one browser).
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)