onclick javascript event does not work on wamp 2.5
Posted by: lusena (---.virtua.com.br)
Date: November 29, 2014 04:07PM

When I moved my old wampserver to wampserver 2.5 the onclick javascript event stop to work.
Anybody could help me ?

The form is like:

<form action="delete.php" name="deletephoto" id="deletephoto" method="post">
This is my current photo
<img src=......... just an example>

<input type="hidden" value="{ID}" id="id" name="id" />
<input type="hidden" value="{FOTO}" id="foto" name="foto" />

<input type="submit" value="Delete" id="submit" name="operacao" onclick="return deletar(document.deletephoto.operacao.value = 'Delete')" />
<input type="submit" value="Back" id="submit" name="operacao" />
</form>

E the script is

function deletar() {
if (document.deletephoto.operacao.value == 'Delete')
return confirm('Delete Picture?');
}

When I press Delete button on form It does not open the alert window anymore, to answer yes or not.
Actually nothing heppens, but before wamp 2.5 it calls the function deletar() javascript

Options: ReplyQuote
Re: onclick javascript event does not work on wamp 2.5
Posted by: RiggsFolly (---.as43234.net)
Date: November 29, 2014 06:52PM

Can I just remind you that javascript runs in the browser and WAMPServer has nothing to do with what happens in the browser !!!

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.3.4 64bit) Aestan Tray Menu 3.2.5.4
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.23>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-

Options: ReplyQuote
Re: onclick javascript event does not work on wamp 2.5
Posted by: lusena (---.virtua.com.br)
Date: November 29, 2014 10:01PM

Yes, I know javascript is client side and not server side, but maybe the way it communicates (browser and server) could affect it.

Options: ReplyQuote
Re: onclick javascript event does not work on wamp 2.5
Posted by: RiggsFolly (---.as43234.net)
Date: November 29, 2014 11:23PM

I woudl think that the actual probelm is that you are calling a function that does not expect a parameter with a parameter.

i.e.

function deletar() {
    if (document.deletephoto.operacao.value == 'Delete')
        return confirm('Delete Picture?');
}
Does not have any paramteres

While when you call this function you pass a parameter

    onclick="return deletar(document.deletephoto.operacao.value = 'Delete')" />

What goes on there ?????

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.3.4 64bit) Aestan Tray Menu 3.2.5.4
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.23>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-

Options: ReplyQuote
Re: onclick javascript event does not work on wamp 2.5
Posted by: lusena (---.virtua.com.br)
Date: November 29, 2014 11:30PM

It does not call the function deletar() anymore.
I do not see the alert window with with the question " Delete Picture?" and the 2 option "yes" or "not".
It stop to work.

Options: ReplyQuote
Re: onclick javascript event does not work on wamp 2.5
Posted by: RiggsFolly (---.as43234.net)
Date: November 29, 2014 11:35PM

Well you had better show that actual code and not the code that it does not use anymore ! ! ! ! !

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.3.4 64bit) Aestan Tray Menu 3.2.5.4
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.23>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-

Options: ReplyQuote
Re: onclick javascript event does not work on wamp 2.5
Posted by: lusena (---.virtua.com.br)
Date: November 29, 2014 11:47PM

Sorry, I did not explain correctly.
The code is the same, the action is that does not happen anymore.
I call the function function deletar().
But in isntead of work correctly, it does not work anymore.
And I just moved to wampserver 2.5 because I was using an old one.

Options: ReplyQuote
Re: onclick javascript event does not work on wamp 2.5
Posted by: RiggsFolly (---.as43234.net)
Date: November 29, 2014 11:54PM

What else did you change.

What happens or does not happen in the browser ( javascript ) has nothing to do with WAMPServer.

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.3.4 64bit) Aestan Tray Menu 3.2.5.4
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.23>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-

Options: ReplyQuote
Re: onclick javascript event does not work on wamp 2.5
Posted by: lusena (---.virtua.com.br)
Date: November 30, 2014 12:03AM

The most important, I did not change nothing on code, only de wamp version.
On browser nothing happens, no error message, nothing, very strange ins't?

Options: ReplyQuote
Re: onclick javascript event does not work on wamp 2.5
Posted by: RiggsFolly (---.as43234.net)
Date: November 30, 2014 02:30AM

Have you debugged the javascript code in the browser?

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.3.4 64bit) Aestan Tray Menu 3.2.5.4
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.23>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-

Options: ReplyQuote
Re: onclick javascript event does not work on wamp 2.5
Posted by: lusena (---.virtua.com.br)
Date: November 30, 2014 05:02PM

Your suggestion sounds good, as I don't know how to debug it on firefox I will use my free time to study the debugging matter using internet.

Options: ReplyQuote


Sorry, only registered users may post in this forum.