combining JavaScript and PHP
I have decleared a function by Javascript before body of my page:
Code:
<script type="text/javascript"> PHP Code:
I am quite new to Javascript so excuse me if it was a stupid question |
It is that extra >"; you have in your else statement.
|
thank you very much. I should have been more careful about that.
my new problem is that when I press ok or cancel i got to update.php and cancel button doesn't do anything in this page |
If you're using Firefox, you can use its built-in Javascript console to help you spot things like this.
Assuming you've got it set up the way I have, you should find the Javascript console option in the tools menu; any JS errors will show up in there, with their line numbers and error message. It would probably have helped you a lot in this case. Other browsers also have features that do the same thing, but Firefox is the best for debugging JS, IMHO. |
Here is the error which is written in Javascript console of Firefox:
Error: Expected ':' but found '='. Declaration dropped. Source File: http://mohi/change.php Line: 0 Everything seems correct :( |
I run this simple html file which contains javascript. but it doesn't show anything on my firefox webbrowser.even JavaScript console doesn't show anything
Quote:
|
Quote:
|
All times are GMT -5. The time now is 05:50 PM. |