Jump to content

darkfox

Members
  • Posts

    10
  • Joined

  • Last visited

darkfox's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. hey guys! i need help! i want to make the pages prompt an alert if the user tried to leave the page/textbox that he is currently editing. i want to make it like the facebook type, like if you type something in the post section of facebook then tried to leave or click the back button in the browser.. please help me guys.. can it be done by PHP or Javascript? please let me know and please help me! thanks guys! cheers..
  2. hi guys, i have a problem hope you can help me.. i have a site that uses an iframe to autorefresh the table inside it. i used an <a href> tag to redirect the page, but instead of redirecting the whole page to another site, it only reloads inside the iframe.. here is my code: from my parent page: </div> <Iframe src="tabs/constable.php" width="990" height="600"></Iframe> </div> from my constable.php file inside the iframe: <head> <script type="text/javascript"> function followLink(o) { var a = o.getElementsByTagName('a'); if (a.length > 0) { document.location = a[0].href; } } </script> </head> <table id="table"> <thead> <tr> <th scope="col" class="idnumber">ID Number</th> <th scope="col" class="name">Name</th> <th scope="col" class="gender">Gender</th> <th scope="col" class="timedate">Date of Consultation</th> <th scope="col" class="type">Student/Employee</th> <th scope="col" class="type">annual/walkin</th> </tr></thead><tbody><tr> <tfoot> <tr> <td colspan="6"></td> </tr> </tfoot> <?php $min = 0; include '../init.php'; $quey1="//somequery here"; $result=mysql_query($quey1); mysql_close($connect); $row1 = mysql_num_rows($result); while($row=mysql_fetch_array($result)) { $dd = "../info.php?pid=".$row['idnumbers']."&&nid=".$row['idnurse']."&&type=".$row['type']; echo "<tr><td onclick='followLink(this);'><a href='".$dd."'></a>{$row['idnumbers']}</td> <td onclick='followLink(this);'><a href='".$dd."'></a>{$row['name']}</td> <td onclick='followLink(this);'><a href='".$dd."'></a>{$row['Sex']}</td> <td onclick='followLink(this);'><a href='".$dd."'></a>{$row['date']}</td> <td onclick='followLink(this);'><a href='".$dd."'></a>{$row['Occupation']}</td> <td onclick='followLink(this);'><a href='".$dd."'></a>{$row['type']}</td></tr>"; } echo' </table></br></br>'; include '../init.php'; $quey2="select count(*) from nurse where status = 'notdone'"; $res=mysql_query($quey2); mysql_close($connect); $rowcounter; while($row=mysql_fetch_array($res)) { $rowcounter = $row['count(*)']; } if($rowcounter > 10) { echo '<form action = "next.php" method = "POST">'; echo ' <input type = "image" src="images/Next.png" name = "next" value = "Next">'; echo ' <input type = "hidden" name = "xx" value = "'.$min.'">'; echo ' <input type = "hidden" name = "gg" value = "patientonqueue">'; echo ' <input type = "hidden" name = "num" value = "'.$rowcounter.'">'; echo '</form>'; } $eto = $rowcounter + 10; if($rowcounter >= 10) { echo "<label name = 'dd'> 10 out of ".$rowcounter."</label>"; } ?> hope you guys understand my code and my problem.. thanks in advance!
  3. oh.. ok sir, now that make sense! thanks alot sir! i owe you one and sir btw, how can i make it as a javascript code? coz i made an onclick function on <tr> so that i will not be using the '<a>' link to make it more presentable and make all columns clickable sir , do you have any idea? sorry for lots of questions sir.. thanks again )
  4. sir my main problem is that, i cant get the product id that was clicked by the user..
  5. ahm from my database sir.. ahm i am using MySQL..
  6. ahm sir can you elaborate further? i dont really get it.. sorry im still newbie in web programming
  7. this is the table it self, product id product name quantity amount 50 mouse 3 1000 50 cpu 45 800 50 sticker 5 50 50 keyboard 3 200 so how can i get the product id that was clicked? thank you sir
  8. so this is the scenario, i am creating an admin page using php and html and i do have an HTML table that is being populated dynamically, so what i want to do is, when i click the table row, i will be redirected to another page and print the details of the product i clicked from the table. i really got lost here.. i dont really need the whole code/answer, i just need to know how to extract the text that is clicked from the table thanks in advance guys!
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.