|
|||
Dear all,
please help me!!! because i cant get the values from the functin i pass value... sample code here : <html> <HEAD> <script type="text/javascript"> // no right-click function clickIE() { if (document.all) { }} function clickNS(e) { if (document.layers||(document.getElementById&&!docum ent.all)) { if (e.which==2||e.which==3) {}}} if (document.layers) { document.captureEvents(Event.MOUSEDOWN);document.o nmousedown=clickNS; } else { document.onmouseup=clickNS;document.oncontextmenu= clickIE; } document.oncontextmenu=new Function("return false") // popup menu var menuskin = "skin1"; var display_url = 1; function showmenuie5(getid) { var rowid=getid; var rightedge = document.body.clientWidth-event.clientX; var bottomedge = document.body.clientHeight-event.clientY; if (rightedge < ie5menu.offsetWidth) ie5menu.style.left = document.body.scrollLeft + event.clientX - ie5menu.offsetWidth; else ie5menu.style.left = document.body.scrollLeft + event.clientX; if (bottomedge < ie5menu.offsetHeight) ie5menu.style.top = document.body.scrollTop + event.clientY - ie5menu.offsetHeight; else ie5menu.style.top = document.body.scrollTop + event.clientY; ie5menu.style.visibility = "visible"; return false; } function hidemenuie5() { ie5menu.style.visibility = "hidden"; } function highlightie5() { if (event.srcElement.className == "menuitems") { event.srcElement.style.backgroundColor = "highlight"; event.srcElement.style.color = "white"; if (display_url) window.status = event.srcElement.url; } } function lowlightie5() { if (event.srcElement.className == "menuitems") { event.srcElement.style.backgroundColor = ""; event.srcElement.style.color = "black"; window.status = ""; } } function jumptoie5() { if (event.srcElement.className == "menuitems") { if (event.srcElement.getAttribute("target") != null) window.open(event.srcElement.url, event.srcElement.getAttribute("target")); else window.location = event.srcElement.url; } } </SCRIPT> <div id="ie5menu" class="skin0" onMouseover="highlightie5()" onMouseout="lowlightie5()" onClick="jumptoie5();"> <div class='menuitems' url='View.php?id=+rowid+'>View</div> <div class='menuitems' url='Edit.php?id='+rowid+''>Edit</div> <div class='menuitems' url='Delete.php?id='+rowid+''>Delete</div> <div class='menuitems' url='Add.php?id='+rowid+''>Add New Record</div> </div> <style type="text/css"> <!-- .skin1 { cursor:default; font:menutext; position:absolute; text-align:left; font-family: Arial, Helvetica, sans-serif; font-size: 10pt; width:120px; background-color:menu; border:1 solid buttonface; visibility:hidden; border:2 outset buttonhighlight; } .menuitems { padding-left:15px; padding-top:5px; padding-bottom:5px; padding-right:10px; } --> </style> </HEAD> <body> <script language="JavaScript1.2"> if (document.all && window.print) { ie5menu.className = menuskin; document.body.onclick = hidemenuie5; } </script> <?php $ConnDB = mysql_pconnect ("localhost", "root" )or die("Could not connect."); if(!$ConnDB) die("no database"); if(!mysql_select_db("try",$ConnDB)) die("No database selected."); extract($_POST); extract($_GET); $query="select * from Info order by id ASC"; $result=mysql_query($query) ; $num=mysql_num_rows($result); ?> <? if($num>0){ for($j=1;$j<=$num;$j++) { $row=mysql_fetch_array($result); ?> <TABLE> <tr onmousedown="if(window.event.button==2){ showmenuie5('<? echo $row[id] ?>'); }" onMouseOver="this.bgColor = '#C0C0C0'" onMouseOut ="this.bgColor = '#FFFFFF'" bgcolor="#FFFFFF"> <td><? echo "$row[F1]"; ?></td> <td><? echo "$row[F2]"; ?></td> <td><? echo "$row[F3]"; ?></td> <td><? echo "$row[F4]"; ?></td> </tr> </table> <? } } ?> </body> </html> |
|
|||
From what i see, there're plenty of errors in your code...at least to me it seems so.. Here is the cleaner version of your code after tabulation...
PHP Code:
</SCRIPT> <div id="ie5menu" class="skin0" onMouseover="highlightie5()" onMouseout="lowlightie5()" onClick="jumptoie5();"> <div class='menuitems' url='View.php?id=+rowid+'>View</div> <div class='menuitems' url='Edit.php?id='+rowid+''>Edit</div> <div class='menuitems' url='Delete.php?id='+rowid+''>Delete</div> <div class='menuitems' url='Add.php?id='+rowid+''>Add New Record</div> What does the 'rowid' means ? If it's a php variable, you should probably wrap a php start and close tag around it : PHP Code:
Then I saw the last few lines : PHP Code:
PHP Code:
![]() |
![]() |
«
Previous Thread
|
Next Thread
»
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| sending infor without pass to server? | calvynlee | Website Design | 7 | 20-11-2006 11:42 AM |
| How to pass value from JSP scriptlet to JSP Tag? | lcf | Website Programming | 3 | 11-06-2004 06:25 PM |
All times are GMT +8. The time now is 01:52 PM.
Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO 3.1.0 vBulletin skin by ForumMonkeys.com.
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO 3.1.0 vBulletin skin by ForumMonkeys.com.














Linear Mode

