Jump to content

pizzipie

Members
  • Posts

    2
  • Joined

  • Last visited

pizzipie's Achievements

Newbie

Newbie (1/7)

0

Reputation

  1. Just trying to get the response function to show json data returned from DbaseBakup.php. I knew it might not work but I tend to develop my scripts a little at a time since I'm not very experienced with Javascript/jquery.
  2. <script type="text/javascript" > bakups.onchange=function () { var x=document.getElementById("bakups").selectedIndex; var mychoice=document.getElementsByTagName("option")[x].value var is_sure=window.confirm("Are you sure you want to bakup "+ mychoice); if (is_sure) { $.post("DbaseBakup.php", {'mybak': mychoice} , showData, "json"); showData(data) {alert(data)} // syntax error missing ; // showData(retdata) { // ditto// alert(retdata); // } //window.alert("OK, you backed up "+mychoice); return false; } else { alert("do something else"); return false; } }</script> The code above is what is causing me fits. Error is: Timestamp: 09/17/2013 03:35:27 PMError: SyntaxError: missing ; before statementSource File: http://localhost/DB-Web/testonly/DbaseRestoreTest.phpLine: 53, Column: 21Source Code: showData(retdata) { Any help apperciated. R
×
×
  • Create New...