Prev: Is there a good tool to extract comments from a js file?
Next: Value from select into href's url ?
From: tdnnash25 on 12 May 2010 08:37 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?
From: Joe Nine on 12 May 2010 08:57 tdnnash25 wrote: > 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? 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.
From: Erwin Moller on 12 May 2010 09:08 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='';\" >> <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? 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
From: tdnnash25 on 12 May 2010 11:58 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?
From: Erwin Moller on 12 May 2010 13:32 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
|
Next
|
Last
Pages: 1 2 Prev: Is there a good tool to extract comments from a js file? Next: Value from select into href's url ? |