FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » I am having some difficulties with Tooltip...
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
I am having some difficulties with Tooltip... [message #181803] Tue, 04 June 2013 04:14 Go to next message
khando Umpo is currently offline  khando Umpo
Messages: 4
Registered: June 2013
Karma: 0
Junior Member
I want a tooltip to be displayed when I move the mouse over edit/delete links. tooltip is worming fine with the delete option , but is not working for the edit link. below is a part of my code which is running partially....please help in php

<td align="center"><?php echo "<a class='tooltip' href=\"edituser.php?uid=".$row['uid']."\";> Edit<span>Edit user info</span></a>/ <a class='tooltip' href=\"deluser.php?uid=".$row['uid']."\">Delete<span>Delete This User</span></a>"?></td>


Looking forward to really helpful posts. Thanks.
Re: I am having some difficulties with Tooltip... [message #181804 is a reply to message #181803] Tue, 04 June 2013 04:50 Go to previous messageGo to next message
Jerry Stuckle is currently offline  Jerry Stuckle
Messages: 2598
Registered: September 2010
Karma: 0
Senior Member
On 6/4/2013 12:14 AM, khando Umpo wrote:
> I want a tooltip to be displayed when I move the mouse over edit/delete links. tooltip is worming fine with the delete option , but is not working for the edit link. below is a part of my code which is running partially....please help in php
>
> <td align="center"><?php echo "<a class='tooltip' href=\"edituser.php?uid=".$row['uid']."\";> Edit<span>Edit user info</span></a>/ <a class='tooltip' href=\"deluser.php?uid=".$row['uid']."\">Delete<span>Delete This User</span></a>"?></td>
>
>
> Looking forward to really helpful posts. Thanks.
>

Wrong newsgroup. PHP knows nothing about tool tips. Try alt.html.


--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex(at)attglobal(dot)net
==================
OT: I am having some difficulties with Tooltip... [message #181805 is a reply to message #181803] Tue, 04 June 2013 04:57 Go to previous messageGo to next message
J.O. Aho is currently offline  J.O. Aho
Messages: 194
Registered: September 2010
Karma: 0
Senior Member
On 04/06/13 06:14, khando Umpo wrote:
> I want a tooltip to be displayed when I move the mouse over edit/delete links. tooltip is worming fine with the delete option , but is not working for the edit link. below is a part of my code which is running partially....please help in php
>
> <td align="center"><?php echo "<a class='tooltip' href=\"edituser.php?uid=".$row['uid']."\";> Edit<span>Edit user info</span></a>/ <a class='tooltip' href=\"deluser.php?uid=".$row['uid']."\">Delete<span>Delete This User</span></a>"?></td>

This is really not PHP related, but about your formation of html and
css. One thing you can do is to use the same kind of quotations, I know
some close sourced browsers which has issues if you keep on mixing
single and double quotes. Also it could help to have a title for the item.

A PHP tips:

To make things more readable you can use



<a class="tooltip" href="edituser.php?uid=<?php echo $row['uid']; ?>">


or if you need to type a lot:

echo <<< EOF
<a class="tooltip" href="edituser.php?uid={$row['uid']}";>
EOF;

and as you see it's more readable than what you have done.

--

//Aho
Re: I am having some difficulties with Tooltip... [message #181806 is a reply to message #181804] Tue, 04 June 2013 04:58 Go to previous messageGo to next message
khando Umpo is currently offline  khando Umpo
Messages: 4
Registered: June 2013
Karma: 0
Junior Member
On Tuesday, June 4, 2013 10:20:19 AM UTC+5:30, Jerry Stuckle wrote:
> On 6/4/2013 12:14 AM, khando Umpo wrote:
>
>> I want a tooltip to be displayed when I move the mouse over edit/delete links. tooltip is worming fine with the delete option , but is not working for the edit link. below is a part of my code which is running partially....please help in php
>
>>
>
>> <td align="center"><?php echo "<a class='tooltip' href=\"edituser.php?uid=".$row['uid']."\";> Edit<span>Edit user info</span></a>/ <a class='tooltip' href=\"deluser.php?uid=".$row['uid']."\">Delete<span>Delete This User</span></a>"?></td>
>
>>
>
>>
>
>> Looking forward to really helpful posts. Thanks.
>
>>
>
>
>
> Wrong newsgroup. PHP knows nothing about tool tips. Try alt.html.
>
>
>
>
>
> --
>
> ==================
>
> Remove the "x" from my email address
>
> Jerry Stuckle
>
> JDS Computer Training Corp.
>
> jstucklex(at)attglobal(dot)net
>
> ==================

ya i mean in html...with php codes
the codes i have dotted above is in html with php and mysql server.
Re: OT: I am having some difficulties with Tooltip... [message #181807 is a reply to message #181805] Tue, 04 June 2013 05:35 Go to previous messageGo to next message
khando Umpo is currently offline  khando Umpo
Messages: 4
Registered: June 2013
Karma: 0
Junior Member
On Tuesday, June 4, 2013 10:27:35 AM UTC+5:30, J.O. Aho wrote:
> On 04/06/13 06:14, khando Umpo wrote:
>
>> I want a tooltip to be displayed when I move the mouse over edit/delete links. tooltip is worming fine with the delete option , but is not working for the edit link. below is a part of my code which is running partially....please help in php
>
>>
>
>> <td align="center"><?php echo "<a class='tooltip' href=\"edituser.php?uid=".$row['uid']."\";> Edit<span>Edit user info</span></a>/ <a class='tooltip' href=\"deluser.php?uid=".$row['uid']."\">Delete<span>Delete This User</span></a>"?></td>
>
>
>
> This is really not PHP related, but about your formation of html and
>
> css. One thing you can do is to use the same kind of quotations, I know
>
> some close sourced browsers which has issues if you keep on mixing
>
> single and double quotes. Also it could help to have a title for the item.
>
>
>
> A PHP tips:
>
>
>
> To make things more readable you can use
>
>
>
>
>
>
>
> <a class="tooltip" href="edituser.php?uid=<?php echo $row['uid']; ?>">
>
>
>
>
>
> or if you need to type a lot:
>
>
>
> echo <<< EOF
>
> <a class="tooltip" href="edituser.php?uid={$row['uid']}";>
>
> EOF;
>
>
>
> and as you see it's more readable than what you have done.
>
>
>
> --
>
>
>
> //Aho

Thanx a lot Aho...i wish if i cud send you a screen shot of my page...i did the way you have explained above, but its not working either...
Re: I am having some difficulties with Tooltip... [message #181808 is a reply to message #181806] Tue, 04 June 2013 05:42 Go to previous messageGo to next message
Jerry Stuckle is currently offline  Jerry Stuckle
Messages: 2598
Registered: September 2010
Karma: 0
Senior Member
On 6/4/2013 12:58 AM, khando Umpo wrote:
> On Tuesday, June 4, 2013 10:20:19 AM UTC+5:30, Jerry Stuckle wrote:
>> On 6/4/2013 12:14 AM, khando Umpo wrote:
>>
>>> I want a tooltip to be displayed when I move the mouse over edit/delete links. tooltip is worming fine with the delete option , but is not working for the edit link. below is a part of my code which is running partially....please help in php
>>
>>>
>>
>>> <td align="center"><?php echo "<a class='tooltip' href=\"edituser.php?uid=".$row['uid']."\";> Edit<span>Edit user info</span></a>/ <a class='tooltip' href=\"deluser.php?uid=".$row['uid']."\">Delete<span>Delete This User</span></a>"?></td>
>>
>>>
>>
>>>
>>
>>> Looking forward to really helpful posts. Thanks.
>>
>>>
>>
>>
>>
>> Wrong newsgroup. PHP knows nothing about tool tips. Try alt.html.
>>
>
> ya i mean in html...with php codes
> the codes i have dotted above is in html with php and mysql server.
>

Yes, but it's still not a PHP problem.

Get your page working with plain HTML first. Then add your PHP code in.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex(at)attglobal(dot)net
==================
Re: I am having some difficulties with Tooltip... [message #181809 is a reply to message #181808] Tue, 04 June 2013 06:05 Go to previous messageGo to next message
khando Umpo is currently offline  khando Umpo
Messages: 4
Registered: June 2013
Karma: 0
Junior Member
On Tuesday, June 4, 2013 11:12:52 AM UTC+5:30, Jerry Stuckle wrote:
> On 6/4/2013 12:58 AM, khando Umpo wrote:
>
>> On Tuesday, June 4, 2013 10:20:19 AM UTC+5:30, Jerry Stuckle wrote:
>
>>> On 6/4/2013 12:14 AM, khando Umpo wrote:
>
>>>
>
>>>> I want a tooltip to be displayed when I move the mouse over edit/delete links. tooltip is worming fine with the delete option , but is not working for the edit link. below is a part of my code which is running partially....please help in php
>
>>>
>
>>>>
>
>>>
>
>>>> <td align="center"><?php echo "<a class='tooltip' href=\"edituser.php?uid=".$row['uid']."\";> Edit<span>Edit user info</span></a>/ <a class='tooltip' href=\"deluser.php?uid=".$row['uid']."\">Delete<span>Delete This User</span></a>"?></td>
>
>>>
>
>>>>
>
>>>
>
>>>>
>
>>>
>
>>>> Looking forward to really helpful posts. Thanks.
>
>>>
>
>>>>
>
>>>
>
>>>
>
>>>
>
>>> Wrong newsgroup. PHP knows nothing about tool tips. Try alt.html.
>
>>>
>
>>
>
>> ya i mean in html...with php codes
>
>> the codes i have dotted above is in html with php and mysql server.
>
>>
>
>
>
> Yes, but it's still not a PHP problem.
>
>
>
> Get your page working with plain HTML first. Then add your PHP code in.
>
>
>
> --
>
> ==================
>
> Remove the "x" from my email address
>
> Jerry Stuckle
>
> JDS Computer Training Corp.
>
> jstucklex(at)attglobal(dot)net
>
> ==================
This is my file where am trying to use the tooltip. i am trying for long but am unable to sort out the problem....tooltip is working fine with delete, but is not working with edit. please try running the file and advise me the necessary steps to be done...



<?php session_start();
if(!isset($_SESSION['username']) || $_SESSION['type']!=0)
header("Location:index.php");
include_once("connection.php");
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style type="text/css">
a.tooltip
{
position: relative;
color: red;
}
a.tooltip span
{
margin-left: -2000px;
position: absolute;
left: 10px;
top: 10px;
width: 130px;
padding: 4px;
background-color: #E2E7FF;
border: 1px solid #003099;
text-decoration: none;
color: #000;
z-index: 999;
border-radius:5px;
}
a.tooltip:hover span
{
margin-left: 0px;
}
</style>
</head>

<body>
<div style=" color:white;position:absolute;background-color:rgba(1,1,1,0.7);left:0%;top: 0%;height:8%;width:100%;box-shadow:0px 5px 25px rgba(0,0,0,0.5);text-shadow:3px 3px 3px rgba(0,0,0,0.5)" >
<center><b><br />ABCD UNIVERSITY</b></center>
</div>
<div style=" color:white;position:absolute;background-color:#069;left:0%;top:8.2%;height :8%;width:100%;box-shadow:0px 5px 25px rgba(0,0,0,0.5);text-shadow:3px 3px 3px rgba(0,0,0,0.5)" >
<center><b><br />ONLINE STUDENT COURSE PRE-REGISTRATION SYSTEM</b></center>
</div>

<div style="color:#00C; position:absolute;background-color:#9C9;left:775px;right:40px;top:130px;wid th:300px;height:33px;border-radius:6px;text-decoration:none; ">

<form method="post" action="search.php">
<table>
<tr>
<td align="center">Search</td><td align="left"><input type="text" name="search"/></td><td align="center"><input type="submit" name="ok" value="Go" /></td>
</tr>
</table>

</form>
</div>

<centre>

</div>
<div style="color:white; position:absolute; background-color:#99F; top:230px; left:180px; border-radius:05px;">
<table width="900" height="49" border="1" cellpadding="0" cellspacing="0" align="center">
<?php if(isset($_SESSION['response']))
{ echo "<tr><td colspan=\"7\">".$_SESSION['response']."</td></tr>";unset($_SESSION['response']);} ?>
<tr align="center"; height="35">
<td width="15"><b><i><font size="+1">Option</font></i></b></td>
<td width="64"><b><i><font size="+1">UID</font></i></b></td>
<td width="15"><b><i><font size="+1">Name</font></i></b></td>
<td width="30"><b><i><font size="+1">Address</font></i></b></td>
<td width="64"><b><i><font size="+1">Password</font></i></b></td>
<td width="64"><b><i><font size="+1">Type</font></i></b></td>
</tr>
<?php

$result = mysql_query("select * from login order by type desc");
$numrows = mysql_num_rows($result);
if($numrows!=0)
{
while($row=mysql_fetch_array($result))
{

?>
<tr>
<td align="center"><?php echo "<a class='tooltip' href=\"edituser.php?uid=".$row['uid']."\" title="Edit user info"> Edit<span></span></a>/ <a class='tooltip' href=\"deluser.php?uid=".$row['uid']."\">Delete<span>Delete This User</span></a>"?></td>
<td align="center"><?php echo $row['uid']; ?></td>
<td align="center"><?php echo $row['name']; ?></td>
<td align="center"><?php echo $row['address']; ?></td>
<td align="center"><?php echo $row['password']; ?></td>
<td align="center"><?php if($row['type']==1)echo "Student"; else if($row['type']==2) echo "Faculty"; ?>
</td></tr>


<?php

}
}

else
{
die('Error: ' . mysql_error());
}
//mysqli_close($con);*/
?>
<tr><td colspan=7><center><a href="admin_main.php">Back</a></td></tr>
</table>
</centre>
<!--<br/> To enter more data <a href="admin.php"> Click Here </a>-->
</body>
</html>
Re: OT: I am having some difficulties with Tooltip... [message #181810 is a reply to message #181807] Tue, 04 June 2013 09:34 Go to previous messageGo to next message
Markus Grob is currently offline  Markus Grob
Messages: 9
Registered: September 2011
Karma: 0
Junior Member
khando Umpo wrote:

[Question about html]

> On Tuesday, June 4, 2013 10:27:35 AM UTC+5:30, J.O. Aho wrote:

[Answer about quoting]

> Thanx a lot Aho...i wish if i cud send you a screen shot of my page...i did the way you have explained above, but its not working either...

Yes, because he has only showed you, how to write better readable code.
The answer for your tool tip would be found, as described, in a html
newsgroup (alt.html).

Sincerely, Markus
Re: I am having some difficulties with Tooltip... [message #181811 is a reply to message #181809] Tue, 04 June 2013 11:01 Go to previous messageGo to next message
Doug Miller is currently offline  Doug Miller
Messages: 171
Registered: August 2011
Karma: 0
Senior Member
khando Umpo <khandoumpo(at)gmail(dot)com> wrote in
news:ce7b58ae-a27d-4143-a87e-d1b7dc600ffd(at)googlegroups(dot)com:

> This is my file where am trying to use the tooltip. i am trying
> for long but am unable to sort out the problem....

You still don't understand. This is NOT a PHP problem, it is an HTML problem.

> tooltip is
> working fine with delete, but is not working with edit.

Then there must be some difference in the HTML that you're generating for delete, and the
HTML that you're generating for edit, that is causing that to happen.

> please
> try running the file and advise me the necessary steps to be
> done...

No. YOU need to find and fix what's wrong with your HTML. This is NOT a PHP problem.
You should be posting in alt.html instead.
Re: I am having some difficulties with Tooltip... [message #181812 is a reply to message #181803] Tue, 04 June 2013 15:46 Go to previous messageGo to next message
Denis McMahon is currently offline  Denis McMahon
Messages: 634
Registered: September 2010
Karma: 0
Senior Member
On Mon, 03 Jun 2013 21:14:24 -0700, khando Umpo wrote:

> I want a tooltip to be displayed when I move the mouse over edit/delete
> links.

You have an html problem. You are not generating html that renders in the
browser the way you want it to. You need to generate valid html that
renders as you expect. Try asking in an html forum.

If you have a problem generating valid html using php string
manipulation, we can help you. However, if you don't know what the valid
html you're trying to generate should look like, that's not something we
can fix.

When you can give us an example of (a) the working html you are trying to
produce, (b) the php that you are trying to use to generate it, and (c)
some indication of where it's not generating the right output, we may be
able to help ... but at that point you may be able to see for yourself
what needs fixing.

So here is your solution:

(1) Write some html that does what you want (i.e. provides a tooltip when
the cursor is hovered over an element).

(2) Once you have that html working, if you wish to output it using php,
encapsulate it in a suitable and relevant php string manipulation
structures.

(3) If it doesn't work, show us (1) and (2), and ask for help.

--
Denis McMahon, denismfmcmahon(at)gmail(dot)com
Re: OT: I am having some difficulties with Tooltip... [message #181813 is a reply to message #181810] Tue, 04 June 2013 15:50 Go to previous message
Thomas 'PointedEars'  is currently offline  Thomas 'PointedEars'
Messages: 701
Registered: October 2010
Karma: 0
Senior Member
Markus Grob wrote:

> khando Umpo wrote:
>
> [Question about html]
>
>> On Tuesday, June 4, 2013 10:27:35 AM UTC+5:30, J.O. Aho wrote:
>
> [Answer about quoting]
>
>> Thanx a lot Aho...i wish if i cud send you a screen shot of my page...i
>> did the way you have explained above, but its not working either...
>
> Yes, because he has only showed you, how to write better readable code.
> The answer for your tool tip would be found, as described, in a html
> newsgroup (alt.html).

The corresponding Big 8 newsgroup is comp.infosystems.www.authoring.html.

OTOH, if they continue posting unreadably like that, alt.html might indeed
be the better choice.

See also: <http://www.catb.org/~esr/faqs/smart-questions.html>


PointedEars
--
Danny Goodman's books are out of date and teach practices that are
positively harmful for cross-browser scripting.
-- Richard Cornford, cljs, <cife6q$253$1$8300dec7(at)news(dot)demon(dot)co(dot)uk> (2004)
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: PDO Unit Tests
Next Topic: problem encrypting data (AES_ENCRYPT/AES_DECRYPT)
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Fri Sep 20 09:21:18 GMT 2024

Total time taken to generate the page: 0.02917 seconds