hide URL in status bar with onmouseover - help

T

tdnnash25

I have a submit button that is essentially a link to a page. When I
hover my mouse over the button/href I don't want the URL to show in
the status bar. But, I cannot seem to get it to work. I've tried
several things but here is the latest from that bit of code:

echo "<a href=\"http://mysite.com" onmouseover=
\"window.status='';return true;\" onMouseOut=\"window.status='';\"
<input type=\"submit\" name=\"submit\" id=\"submit\" value=\"Test\" /
"

I have the escapes " \ " because this is within php tags, so I must
escape the quotation marks until I'm done with the line.

Can someone tell me how to hide the URL in the status bar when someone
hovers their mouse over the button?
 
J

Joe Nine

tdnnash25 said:
I have a submit button that is essentially a link to a page. When I
hover my mouse over the button/href I don't want the URL to show in
the status bar. But, I cannot seem to get it to work. I've tried
several things but here is the latest from that bit of code:

echo "<a href=\"http://mysite.com" onmouseover=
\"window.status='';return true;\" onMouseOut=\"window.status='';\"

I have the escapes " \ " because this is within php tags, so I must
escape the quotation marks until I'm done with the line.

Can someone tell me how to hide the URL in the status bar when someone
hovers their mouse over the button?

Writing to window.status is disabled by default on the most popular
browsers now. The reason is to avoid web programmers doing what you're
trying to do. The browser makers want their users to not be cheated into
visiting a site they didn't plan to.
 
E

Erwin Moller

tdnnash25 schreef:
I have a submit button that is essentially a link to a page. When I
hover my mouse over the button/href I don't want the URL to show in
the status bar. But, I cannot seem to get it to work. I've tried
several things but here is the latest from that bit of code:

echo "<a href=\"http://mysite.com" onmouseover=
\"window.status='';return true;\" onMouseOut=\"window.status='';\"

I have the escapes " \ " because this is within php tags, so I must
escape the quotation marks until I'm done with the line.

Can someone tell me how to hide the URL in the status bar when someone
hovers their mouse over the button?


Hi,

First (simple) solution: You say you have a button that is essentially a
hyperlink.
Well, if it IS a button you won't see the hyperlink.
I am guessing now, but did you make a hyperlink and made that LOOK like
a button? If so, why not make it a real button?

Second: On some projects I needed some text to look like a hyperlink,
but it was actually just a span that looks like a hyperlink.
Compare:

<a href="whatever">This looks like a hyperlink because it is</a>

with

<span onClick="whatever" class="ahrefmimic">This is a span that want to
look like a hyperlink</span>

And then in some stylesheet define ahrefmimic any way you want, eg:

..ahrefmimic {text-decoration:none; color:#008ACA;}
..ahrefmimic:hover {text-decoration:underline; color:#E5352C;
cursor:pointer;}

That way you won't see the hyperlink in the status.

Hope that helps.

Regards,
Erwin Moller

--
"There are two ways of constructing a software design: One way is to
make it so simple that there are obviously no deficiencies, and the
other way is to make it so complicated that there are no obvious
deficiencies. The first method is far more difficult."
-- C.A.R. Hoare
 
T

tdnnash25

Erwin,

I'll try to make this simple to understand. I have a table with 10
rows, for example. Each row has 3 columns: column 1 is Type ID, column
2 is Type, and column 3 is a button called Remove.

1 | bananas | Remove
2 | apples | Remove
3 | pears | Remove ... etc

This table is essentially a mysql table...so the data in the table
within the browser is actually pulling from a mysql table. When I
click on Remove for a particular row, I want it to remove the row in
mysql. And, it does...this isn't the part that isn't working.

I've basically got it to work by using the anchor tag like this: <a
href="mysite.com/remove.php?remove_id=2"></a> ... so, when you click
on the button, it just goes to that URL so to speak and deletes the
row...then it redirects to the original page and now you no longer see
record number 2. Is there a way to hide the URL in the status bar so
that someone can't see what is happening and start removing records?
 
E

Evertjan.

tdnnash25 wrote on 12 mei 2010 in comp.lang.javascript:
Erwin,

I'll try to make this simple to understand. I have a table with 10
rows, for example. Each row has 3 columns: column 1 is Type ID, column
2 is Type, and column 3 is a button called Remove.

1 | bananas | Remove
2 | apples | Remove
3 | pears | Remove ... etc

This table is essentially a mysql table...so the data in the table
within the browser is actually pulling from a mysql table. When I
click on Remove for a particular row, I want it to remove the row in
mysql. And, it does...this isn't the part that isn't working.

I've basically got it to work by using the anchor tag like this: <a
href="mysite.com/remove.php?remove_id=2"></a> ... so, when you click
on the button, it just goes to that URL so to speak and deletes the
row...then it redirects to the original page and now you no longer see
record number 2. Is there a way to hide the URL in the status bar so
that someone can't see what is happening and start removing records?

Basically and essentially Usenet is not email,
so always quote what you are responding on.

Browsers do not "pull from mySql" they just ask and receive a bitstream,
basically containiong html, simply essentially.

You cannot click on a basical button and expect it to be essentially an
anchor.

You do not "just go to that URL so to speak" but request a stream from
the server by invoking the essential URL, this goes without speaking,
which could hold a redirect component in the header or in the html.

You cannot hide a anchor url from tha statusbar, since that could induce
malicious practises, and if you could it would prevent only the most
cyberfobic moron from deleting records if they wanted to do so. You
should have serverside basical defences for that.

However a real form button essentially does not show it's url on the
statusbar.
 
E

Erwin Moller

tdnnash25 schreef:
Erwin,

I'll try to make this simple to understand. I have a table with 10
rows, for example. Each row has 3 columns: column 1 is Type ID, column
2 is Type, and column 3 is a button called Remove.

1 | bananas | Remove
2 | apples | Remove
3 | pears | Remove ... etc

This table is essentially a mysql table...so the data in the table
within the browser is actually pulling from a mysql table. When I
click on Remove for a particular row, I want it to remove the row in
mysql. And, it does...this isn't the part that isn't working.

Ok, clear, but not relevant for your question.

I've basically got it to work by using the anchor tag like this: <a
href="mysite.com/remove.php?remove_id=2"></a> ... so, when you click
on the button, it just goes to that URL so to speak and deletes the
row...then it redirects to the original page and now you no longer see
record number 2.

All clear. Just basic database interaction.
But not relevant.
Is there a way to hide the URL in the status bar so
that someone can't see what is happening and start removing records?

Yes, that is your question.
The question I gave you 2 answers to in my original reply.
Was I unclear? Is my english that poor?
Or didn't you read my reply seriously?

In short:
1) Use a REAL button instead of a hyperlink to offer the delete
functionality.
2) Use a span with an onClick eventhandler that takes care of the delete
action. (That solution won't work by the way for users that have
JavaScript disabled.). In case you want your span to look like a
hyperlink, you can use the css suggestion I posted.

Regards,
Erwin Moller


--
"There are two ways of constructing a software design: One way is to
make it so simple that there are obviously no deficiencies, and the
other way is to make it so complicated that there are no obvious
deficiencies. The first method is far more difficult."
-- C.A.R. Hoare
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top