Return from Javascript is incorrect

Discuss how to use and promote Web standards with the Mozilla Gecko engine.
Post Reply
wiffer
Posts: 1
Joined: June 17th, 2014, 12:12 pm

Return from Javascript is incorrect

Post by wiffer »

The HTML code invokes a small JavaScript function when a button is clicked. The JavaScript function sets a $_SESSION variable and changes the icon image of the HTML button, then just returns by using the JavaScript "return;" function. The code works perfectly in Internet Explorer. It just returns to the displayed page with the modified button. In Firefox, it wants to return to the beginning of the PHP program which originally created the HTML script and page. Since the PHP script processes a number of things prior to creating and displaying the HTML/page, including receiving an execution parameter (e.g. ?Parm=DoThis) from the module which previously called it, the code naturally fails. I've eliminated the JavaScript return; hoping it would just stop after changing the icon but it still wants to initiate a call to the originating PHP module. I'm using Firefox 30.
User avatar
DanRaisch
Moderator
Posts: 127187
Joined: September 23rd, 2004, 8:57 pm
Location: Somewhere on the right coast

Re: Return from Javascript is incorrect

Post by DanRaisch »

Moving to Web Development.
Post Reply